netlink_kernel_create() always returns NULL
Hi everybody,
I am programming a kernel module using netfilter to monitor the traffic. However, whenever I call the netlink_kernel_create like this: nl_sk = netlink_kernel_create(&init_net,NETLINK_TEST,0, testFunction,NULL, THIS_MODULE), I always get a NULL. I have defined the NETLINK_TEST in the netlink.h. And the testFunction is supposed to be correct (I tested it on a sample kernel module which only sends and receives msg from user space). I don't have the code by my hand right now (may be provided later today if necessary), but if anybody can give some opinions e.g on what are the usual reasons for such failure, or how to track the reason of it (normally I only see the program doing it so that only prints an error message saying the creation of the socket has failed and then just returns) it would be great. Any thoughts will be appreciated. Thanks!