
Hello, I am studying some code involving NETLINK sockets. The code involves a call to socket: sock_fd = socket (AF_NETLINK, SOCK_RAW, 31) looking at NETLINK(7) or '/usr/include/bits/socket.h' I can't find any documentation for netlink_family=31 Could you point me to some answers. Thanks

Hi Jacques, Without having access to the code you're looking at, I can only assume that the family 31 is defined somewhere in the software. See http://www.linuxfoundation.org/collaborate/workgroups/networking/genericnetl... for details of how to define a netlink family. It's also indicative that this has been done because 32 seem to be the max number of families ( /usr/include/linux/netlink.h ) kind regards, Andreas On Tue, 2012-09-11 at 15:54 +0200, LIBCHABER, JACQUES (JACQUES) wrote:
Hello, I am studying some code involving NETLINK sockets. The code involves a call to socket: sock_fd = socket (AF_NETLINK, SOCK_RAW, 31) looking at NETLINK(7) or '/usr/include/bits/socket.h' I can't find any documentation for netlink_family=31 Could you point me to some answers. Thanks
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug

On Fedora $less /usr/bi/bits/socket.h ... "#define PF_BLUETOOTH 31 /* Bluetooth sockets. */" ... Bluetooth socket maybe? On Wed, 2012-09-12 at 09:50 +1200, Andreas Löf wrote:
Hi Jacques,
Without having access to the code you're looking at, I can only assume that the family 31 is defined somewhere in the software.
See http://www.linuxfoundation.org/collaborate/workgroups/networking/genericnetl... for details of how to define a netlink family. It's also indicative that this has been done because 32 seem to be the max number of families ( /usr/include/linux/netlink.h )
kind regards,
Andreas
On Tue, 2012-09-11 at 15:54 +0200, LIBCHABER, JACQUES (JACQUES) wrote:
Hello, I am studying some code involving NETLINK sockets. The code involves a call to socket: sock_fd = socket (AF_NETLINK, SOCK_RAW, 31) looking at NETLINK(7) or '/usr/include/bits/socket.h' I can't find any documentation for netlink_family=31 Could you point me to some answers. Thanks
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug

That's a packet family, which is not the same as a netlink family. See "man 7 netlink" for details. Kind regards, Andreas On Wed, 2012-09-12 at 10:16 +1200, GJB wrote:
On Fedora
$less /usr/bi/bits/socket.h ... "#define PF_BLUETOOTH 31 /* Bluetooth sockets. */" ...
Bluetooth socket maybe?
On Wed, 2012-09-12 at 09:50 +1200, Andreas Löf wrote:
Hi Jacques,
Without having access to the code you're looking at, I can only assume that the family 31 is defined somewhere in the software.
See http://www.linuxfoundation.org/collaborate/workgroups/networking/genericnetl... for details of how to define a netlink family. It's also indicative that this has been done because 32 seem to be the max number of families ( /usr/include/linux/netlink.h )
kind regards,
Andreas
On Tue, 2012-09-11 at 15:54 +0200, LIBCHABER, JACQUES (JACQUES) wrote:
Hello, I am studying some code involving NETLINK sockets. The code involves a call to socket: sock_fd = socket (AF_NETLINK, SOCK_RAW, 31) looking at NETLINK(7) or '/usr/include/bits/socket.h' I can't find any documentation for netlink_family=31 Could you point me to some answers. Thanks
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
participants (3)
-
Andreas Löf
-
GJB
-
LIBCHABER, JACQUES (JACQUES)