[Patches] [ python-Patches-1381398 ] bind() for netlink sockets

SourceForge.net noreply at sourceforge.net
Thu Dec 15 10:23:41 CET 2005


Patches item #1381398, was opened at 2005-12-15 11:23
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1381398&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Modules
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Timo Metsälä (metsala)
Assigned to: Nobody/Anonymous (nobody)
Summary: bind() for netlink sockets

Initial Comment:
Support for netlink sockets in Linux (AF_NETLINK)
doesn't currently include bind()ing to a local address.
The attached patch adds this functionality (local
address of a netlink socket consists of process id
and/or group bitmask).

Example use:

def get_bound_nl_sock(netlink_family):
    net_fd = socket.socket(socket.AF_NETLINK,
                           socket.SOCK_RAW,           
     
                           netlink_family)
        
    net_fd.bind((os.getpid(),0))
    return net_fd

Patch made against Python 2.4.2, tested in Linux
2.4.20-8 (Red Hat 9)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1381398&group_id=5470


More information about the Patches mailing list