I have two ethernet card(NIC)im my computer .Their
characteristics are:

name:rl0
ip:128.128.64.235
netmask:255.255.0.0
broadcast:128.128.255.255

name:rl1
ip:128.128.65.235
netmask:255.255.0.0
broadcast:128.128.255.255

Both of them is up when i use ifconfig command.
I want develop a program that can use rl0 and rl1 for
data communication.My code is similar as flow:

main(){
...
 for(i=0;i<3,i++){
   sd[i]=socket(...);//create DGRAM sockets
   if (sd[i]==-1) return -1;
 }
 bind(sd[0],...);//bind sd0 to ip address of rl0
 bind(sd[1],...);//bind sd1 to ip address of rl0
 bind(sd[2],...);//bind sd2 to ip address of rl1
 bind(sd[3],...);//bind sd3 to ip address of rl1
 sendto(sd[0],...);//send form rl0 to remout host1
 sendto(sd[2],...);//send from rl1 to remout host2
 recvfrom(sd[1],...);//receive in rl0
 recvfrom(sd[3],...);//receive in rl1
return 1;
}
In the first time when i executed my program all data
sent form rl0 ,in other word packets of rl1 and
packets of rl0 were sent by rl0;
So i use the route command as flow:
#route add [remout host2]-interface rl1
 In this case data of rl1 weren't sent by rl0 but 
 rl1 didn't send data too.
please guide me .Thanks.  






__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to