I want to use netlink for communication between an application and kernel space. My version of the Linux kernel is 2.6.28, and the following code is incorrect.
nf_sock=netlink_kernel_create(NL_PROTO,0,nl_user_skb,THIS_MODULE);
Short error message:
error: too few arguments to function 'netlink_kernel_create'
In the <linux/netlink.h> the netlink_kernel_create() function is defined as
extern struct sock *netlink_kernel_create(struct net *net,int unit,unsigned int groups,void (*input)(struct sk_buff *skb),struct mutex *cb_mutex,struct module *module)
I do not understand what to use for the first argument, net . Can someone explain what I should use here?
source share