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> 35 #define RTMAC_NO_VNIC NULL 36 #define RTMAC_DEFAULT_VNIC rtmac_vnic_xmit 38 typedef int (*vnic_xmit_handler)(
struct sk_buff *skb,
struct net_device *dev);
41 int (*orig_start_xmit)(
struct rtskb *skb,
struct rtnet_device *dev);
42 struct net_device *vnic;
43 struct net_device_stats vnic_stats;
44 struct rtskb_pool vnic_skb_pool;
45 unsigned int vnic_max_mtu;
47 u8 disc_priv[0] __attribute__ ((aligned(16)));
50 struct rtmac_proc_entry {
53 struct xnvfile_regular vfile;
57 struct list_head list;
60 unsigned int priv_size;
63 int (*packet_rx)(
struct rtskb *skb);
65 int (*rt_packet_tx)(
struct rtskb *skb,
66 struct rtnet_device *dev);
67 int (*nrt_packet_tx)(
struct rtskb *skb);
69 unsigned int (*get_mtu)(
struct rtnet_device *rtdev,
70 unsigned int priority);
72 vnic_xmit_handler vnic_xmit;
74 int (*attach)(
struct rtnet_device *rtdev,
void *disc_priv);
75 int (*detach)(
struct rtnet_device *rtdev,
void *disc_priv);
77 struct rtnet_ioctls ioctls;
79 struct rtmac_proc_entry *proc_entries;
80 unsigned nr_proc_entries;
86 int rtmac_disc_attach(
struct rtnet_device *rtdev,
struct rtmac_disc *disc);
87 int rtmac_disc_detach(
struct rtnet_device *rtdev);
89 int __rtmac_disc_register(
struct rtmac_disc *disc,
struct module *module);
90 #define rtmac_disc_register(disc) __rtmac_disc_register(disc, THIS_MODULE) 92 void rtmac_disc_deregister(
struct rtmac_disc *disc);
94 #ifdef CONFIG_XENO_OPT_VFILE Regular vfile iterator.
Definition: vfile.h:269