1.netdevice.h(/include/linux/)
新版本内核:struct net_device *dev_get_by_name(struct net *net, const char *name)
老版本内核:struct net_device *dev_get_by_name(const char *name)
在老版本内核下编译通过的协议在新版内核上编译需要修改为dev_get_by_name(&init_net, const char *name)
2.skbuff.h(/include/linux/)
老版本内核:struct sk_buff结构体 ,h中包含传输层报文头,nh中包含网络层的报文头,mac中包含链路层报文头
新版本内核:修改对应关系如下
h-->transport_header;
nh-->network_header;
mac-->mac_header
3.Linux/include/linux/netlink.h
extern struct sock *netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len));
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);