[Ns-bugs] [Bug 51] Allow UDP sockets to receive broadcast

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Sun Jul 15 16:09:53 PDT 2007


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





------- Comment #1 from gjcarneiro at gmail.com  2007-07-15 19:09 -------
Created an attachment (id=29)
 --> (http://www.nsnam.org/bugzilla/attachment.cgi?id=29&action=view)
a sample python program

The point of this (python, but python sockets API is exactly the same as in
C/unix) program is to demonstrate that in a real system sockets can send
broadcast packets, although it does require the line:

    s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)

In addition, multiple sockets can be bound to the same port, although it
requires a socket option:

    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

Afterwards, we can have multiple sockets listening on the same port and they
will all receive a copy of the same packets.


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


More information about the Ns-bugs mailing list