Networking Forums

Networking Forums > Computer Networking > Linux Networking > Impact of bind() on recvfrom() and sendto()

Reply
Thread Tools Display Modes

Impact of bind() on recvfrom() and sendto()

 
 
maruk2@hotmail.com
Guest
Posts: n/a

 
      03-17-2007, 05:33 AM
Assume a UDP socket S on a machine with more than one interface card,
let's say two interface cards with IP addresses IP1 and IP2.
Also assume that you bind the socket S to IP1 and port P1.

Does it mean that recvfrom() on socket S will not receive any data
that came in
on interface card with IP2 for port P1?

Does it mean that sendto() will send all datagrams through interface
card with IP1
regardless of the target address? What if this conflicts with the
route table?

 
Reply With Quote
 
 
 
 
Rick Jones
Guest
Posts: n/a

 
      03-19-2007, 04:30 PM
(E-Mail Removed) <(E-Mail Removed)> wrote:
> Assume a UDP socket S on a machine with more than one interface
> card, let's say two interface cards with IP addresses IP1 and IP2.
> Also assume that you bind the socket S to IP1 and port P1.


> Does it mean that recvfrom() on socket S will not receive any data
> that came in on interface card with IP2 for port P1?


When a UDP datagram arrives, it will be handed to the UDP endpoint
with the closest match on local/remote IP, local/remote port -
_without_ any conflicting fields.

> Does it mean that sendto() will send all datagrams through interface
> card with IP1 regardless of the target address? What if this
> conflicts with the route table?


All it does in this context is specify the source IP.

rick jones
--
The glass is neither half-empty nor half-full. The glass has a leak.
The real question is "Can it be patched?"
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Socket: recvfrom sathya Linux Networking 1 05-07-2009 01:08 PM
recvfrom() unblocking.. how to do it? manu Linux Networking 4 04-21-2006 08:12 PM
Impact of WEP on connectivity Gav Wireless Internet 7 12-17-2003 08:49 AM
Help with sendto() B.r.K.o.N.j.A. Linux Networking 0 12-11-2003 09:07 PM
WEP performance impact Fredrik Wireless Internet 14 09-01-2003 07:35 PM



1 2 3 4 5 6 7 8 9 10 11