- 论坛徽章:
- 0
|
代码如下,在模块初始化的时候,创建netlink失败。是什么原因造成的呢?
我的内核是2.6.22的。
static int __init netl_init(void)
{
printk("<1> netlink module init!\n");
sk = netlink_kernel_create(NETLINK_GENERIC, 0,recv_handler, NULL, THIS_MODULE);
if(!sk) {
printk("<1> failed to create netlink socket\n");
return -1;
}
kernel_thread(process_message_thread, NULL, CLONE_KERNEL);
return 0;
} |
|
|