Per command callback

Dima Kukulniak dima.ky at gmail.com
Fri Nov 5 05:22:07 EDT 2010


> 
> Currently I have to figure out the intended command based on the 
> containing attributes. There must be also an easier way to figure out 
> the command in my generic receive method. How can that be achieved?
> 

I think you can extract the command id from gen netlink header of a
netlink message which is

struct genlmsghdr {
	__u8	cmd;
	__u8	version;
	__u16	reserved;
};

And the rest can be organised in call back for a valid message.



More information about the libnl mailing list