tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Outbound interface
Hello,
Is it entirely up to the routing to determine which interface/wire to
send out a packet on?
Say we have the following network configuration:
bge0: 192.168.1.42
bge1: 10.0.0.13
(No route between the networks)
.. and a program which sets up sockets:
s1 = socket()
s2 = socket()
bind(s1, 192.168.1.42)
bind(s2, 10.0.0.13)
.. and later does:
sendto(s1, "Hello", 10.0.0.17)
Can one assume that this packet will leave through bge1, even though
it's is "bound" to the "name" of bge0?
I must admit that I would have guessed that bind():ing would have
some kind of bearing on outbound interface, but from what I'm reading,
sendto() simply chucks the packet further down the network stack and
then it's up to the routing code to sort out where to pass it on
(ignoring the actual socket handle from which it came). So bind is
essentially only used to stamp the source-field (in the case of sending)
before pushing packets out the door?
--
Kind regards,
Jan Danielsson
Home |
Main Index |
Thread Index |
Old Index