tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Outbound interface


   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:


   (No route between the networks)

   .. and a program which sets up sockets:

   s1 = socket()
   s2 = socket()

   .. and later does:

   sendto(s1, "Hello",

   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