25 #ifndef __RTMAC_DISC_H_ 26 #define __RTMAC_DISC_H_ 28 #include <linux/list.h> 29 #include <linux/netdevice.h> 32 #include <rtnet_chrdev.h> 34 #define RTMAC_NO_VNIC NULL 35 #define RTMAC_DEFAULT_VNIC rtmac_vnic_xmit 37 typedef int (*vnic_xmit_handler)(
struct sk_buff *skb,
struct net_device *dev);
40 int (*orig_start_xmit)(
struct rtskb *skb,
struct rtnet_device *dev);
41 struct net_device *vnic;
42 struct net_device_stats vnic_stats;
43 struct rtskb_pool vnic_skb_pool;
44 unsigned int vnic_max_mtu;
49 struct rtmac_proc_entry {
52 struct xnvfile_regular vfile;
56 struct list_head list;
59 unsigned int priv_size;
62 int (*packet_rx)(
struct rtskb *skb);
64 int (*rt_packet_tx)(
struct rtskb *skb,
struct rtnet_device *dev);
65 int (*nrt_packet_tx)(
struct rtskb *skb);
67 unsigned int (*get_mtu)(
struct rtnet_device *rtdev,
68 unsigned int priority);
70 vnic_xmit_handler vnic_xmit;
72 int (*attach)(
struct rtnet_device *rtdev,
void *disc_priv);
73 int (*detach)(
struct rtnet_device *rtdev,
void *disc_priv);
75 struct rtnet_ioctls ioctls;
77 struct rtmac_proc_entry *proc_entries;
78 unsigned nr_proc_entries;
83 int rtmac_disc_attach(
struct rtnet_device *rtdev,
struct rtmac_disc *disc);
84 int rtmac_disc_detach(
struct rtnet_device *rtdev);
86 int __rtmac_disc_register(
struct rtmac_disc *disc,
struct module *module);
87 #define rtmac_disc_register(disc) __rtmac_disc_register(disc, THIS_MODULE) 89 void rtmac_disc_deregister(
struct rtmac_disc *disc);
91 #ifdef CONFIG_XENO_OPT_VFILE Regular vfile iterator.
Definition: vfile.h:269
static int __attribute__((cold))
Test if a mutex structure contains a valid autoinitializer.
Definition: mutex.c:177