#include #include "../netlink_api/libnetlink_k.h" static int trace_rcv_policy(struct sk_buff *skb, struct nlmsghdr *nlh) { printk(KERN_DEBUG"trace recv policy1111"); return 0; } static int __init trace_init(void) { printk(KERN_DEBUG"trace recv policy"); cfg_msgtype_register(0x12, trace_rcv_policy, NULL, NULL); return 0; } static void __exit trace_exit(void) { cfg_msgtype_unregister(0x12); } module_init(trace_init); module_exit(trace_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Trace process module"); MODULE_AUTHOR("zhangtao");