Aditya Pande wrote:
>
> Hi everyone,
>
> Imagine a setup where on the same computer (running Red Hat Linux 6.2),
> i install 3 ethernet cards, all connected to routers (which may or may
> not be in the same home domain).
> To bring everything down to the IP layer, let's say i'm using raw
> sockets, and framing my own I packets (carrying say, ICMP). The usual
> way to send the packet is to call the sendto() function. However, i
> don't get any option of specifying which interface to send the packet
> on.
Check out bind...you can bind to a specific interface... Could have
one socket per port you want to send on...
>
> Another question i had was, how does one modify the kernel routing
> table?
Check out ifconfig or the ip command. If you want to do it from within
a program, then look at the source for these two commands. I've had good
luck using a system call to a perl script to adjust the routing and so
with the 'ip' command, ie: system("foo.pl cfg-file.txt");
>
> Any info/link will be appreciated.
>
> Sunny days,
> Aditya
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to [EMAIL PROTECTED]
--
Ben Greear ([EMAIL PROTECTED]) http://www.candelatech.com
Author of ScryMUD: scry.wanfear.com 4444 (Released under GPL)
http://scry.wanfear.com http://scry.wanfear.com/~greear
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]