question about version of generic netlink header

Thomas Graf tgraf at suug.ch
Fri Sep 20 16:47:51 EDT 2013


On 09/08/13 at 02:08pm, Kevin Wilson wrote:
> Hello, libnl developers,
> 
> 
> I have this question about version of generic netlink header, if I may:
> 
> we have this definition in the libnl linux/genetlink.h header, and
> also in the kernel in include/uapi/linux/genetlink.h:
> 
> 
> struct genlmsghdr {
> 
>    __u8    cmd;
>    __u8    version;
>   __u16    reserved;
> 
> };
> 
> My question is about the version: what is it for ? it seems to me that
> it is always 1; is it indeed so ? are there cases when it is not 1 ?

It's up to you as interface designer to define what the version field
is used for. You are free to not use it.

_If_ you break your interface for some reason which is something I
would never suggest you can use the interface field to iterate your
definition.



More information about the libnl mailing list