[Ns-bugs] [Bug 742] Implementation of SO_BINDTODEVICE

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Wed Nov 18 03:37:26 PST 2009


http://www.nsnam.org/bugzilla/show_bug.cgi?id=742


Antti Mäkelä <zarhan at cc.hut.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #661 is|0                           |1
           obsolete|                            |




--- Comment #8 from Antti Mäkelä <zarhan at cc.hut.fi>  2009-11-18 06:37:25 EDT ---
Created an attachment (id=663)
 --> (http://www.nsnam.org/bugzilla/attachment.cgi?id=663)
SO_BINDTODEVICE socket option, now supports UDP and TCP in Ipv4 mode

Here's TCP functionality included - however, it's completely UNTESTED as of
now. Since the socket-impl itself only checks routes during connect(), I had to
add support to tcp-l4-protocol's Send() and SendPacket() functions by including
an additional Ptr<NetDevice> parameter which I'm defaulting to zero in case
something else uses this. 

Also, I haven't tested this yet, but right now it SHOULD mean that you can
change your bound interface on the fly with TCP too. 

RAW sockets don't have concept of "endpoints" so not sure how to go there - I
simply changed the call in SendTo to RouteOutput reflecting the current status
so sending works, but I'm not actually sure how receiving even works with Raw
sockets - doesn't seem to go through demuxer and endpoint processing at least.

-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Ns-bugs mailing list