Xenomai  3.0.8
rtmac_vnic.h
1 /* include/rtmac/rtmac_vnic.h
2  *
3  * rtmac - real-time networking media access control subsystem
4  * Copyright (C) 2002 Marc Kleine-Budde <kleine-budde@gmx.de>,
5  * 2003 Jan Kiszka <Jan.Kiszka@web.de>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21 
22 #ifndef __RTMAC_VNIC_H_
23 #define __RTMAC_VNIC_H_
24 
25 #ifdef __KERNEL__
26 
27 #include <linux/init.h>
28 #include <linux/netdevice.h>
29 
30 #include <rtmac/rtmac_disc.h>
31 
32 #define DEFAULT_VNIC_RTSKBS 32
33 
34 
35 int rtmac_vnic_rx(struct rtskb *skb, u16 type);
36 
37 int rtmac_vnic_xmit(struct sk_buff *skb, struct net_device *dev);
38 
39 void rtmac_vnic_set_max_mtu(struct rtnet_device *rtdev, unsigned int max_mtu);
40 
41 int rtmac_vnic_add(struct rtnet_device *rtdev, vnic_xmit_handler vnic_xmit);
42 int rtmac_vnic_unregister(struct rtnet_device *rtdev);
43 
44 static inline void rtmac_vnic_cleanup(struct rtnet_device *rtdev)
45 {
46  struct rtmac_priv *mac_priv = rtdev->mac_priv;
47 
48  rtskb_pool_release(&mac_priv->vnic_skb_pool);
49 }
50 
51 #ifdef CONFIG_XENO_OPT_VFILE
52 int rtnet_rtmac_vnics_show(struct xnvfile_regular_iterator *it, void *data);
53 #endif
54 
55 int __init rtmac_vnic_module_init(void);
56 void rtmac_vnic_module_cleanup(void);
57 
58 
59 #endif /* __KERNEL__ */
60 
61 #endif /* __RTMAC_VNIC_H_ */
Regular vfile iterator.
Definition: vfile.h:269