📄 dev.h
字号:
/* dev.h * linqianghe@163.com * 2006-09-18 */#ifndef INCLUDED_DEV_H#define INCLUDED_DEV_H#include <linux/skbuff.h>#include <asm/percpu.h>#include <linux/netdevice.h>#define HARD_TX_LOCK(dev, cpu) { \ if ((dev->features & NETIF_F_LLTX) == 0) { \ spin_lock(&dev->xmit_lock); \ dev->xmit_lock_owner = cpu; \ } \}#define HARD_TX_UNLOCK(dev) { \ if ((dev->features & NETIF_F_LLTX) == 0) { \ dev->xmit_lock_owner = -1; \ spin_unlock(&dev->xmit_lock); \ } \}DECLARE_PER_CPU( struct softnet_data, mysoftnet_data );DECLARE_PER_CPU(struct netif_rx_stats, mynetdev_rx_stat);#define MYNET_TX_SOFTIRQ 30#define MYNET_RX_SOFTIRQ 31int mydev_ioctl(unsigned int cmd, void __user *arg);int myregister_gifconf( unsigned int family, gifconf_func_t * gifconf );static inline int myunregister_gifconf(unsigned int family){ return myregister_gifconf(family, NULL);}int mynetif_rx(struct sk_buff *skb);void mydev_add_pack(struct packet_type *pt);void mydev_remove_pack(struct packet_type *pt);int mydev_queue_xmit(struct sk_buff *skb);int __init mynet_dev_init(void);void __exit mynet_dev_exit(void);#endif //INCLUDED_DEV_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -