RE: Generic Netlink Sockets

From: NP, Simha (STSD)
Date: Tue Apr 10 2007 - 09:00:25 EST

No I have added a new family and new operations using
genl_register_family and genl_register_ops which would fall under
Since the ID in the family structure is generated dynamically, I
need that ID to interact with my NEW family that I have defined. Do I
have a way of querying the generic netlink interface which would fetch
me the ID for a given family name?

Also, I dont see any API's in the libnl library for generic
netlink operations. Any specific pointers?


-----Original Message-----
From: Hagen Paul Pfeifer [mailto:hagen@xxxxxxxx]
Sent: Tuesday, April 10, 2007 6:23 PM
To: NP, Simha (STSD)
Cc: linux-net@xxxxxxxxxxxxxxx
Subject: Re: Generic Netlink Sockets

On 2007.04.10 NP, Simha (STSD) pressed the following keys:

> I wanted to add a new family under NETLINK_GENERIC.
>I have registered the family and the operations in the kernel code. I
>wonder how I will get to know the family id in the user space.

1) netdev is a better place for thinks like that.

2) If I understand you correctly, you didn't use the generic netlink
- you add your own family (after NETLINK_SCSITRANSPORT )!?

If that is true, than you can't utilize an library - you must include
netlink.h in your source code.

On the other side: if you utilize NETLINK_GENERIC, than libnl[1] is



PS: often the generic netlink interface is a better choice!


"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at