Xenomai  3.1
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 int rtmac_vnic_rx(struct rtskb *skb, u16 type);
35 
36 int rtmac_vnic_xmit(struct sk_buff *skb, struct net_device *dev);
37 
38 void rtmac_vnic_set_max_mtu(struct rtnet_device *rtdev, unsigned int max_mtu);
39 
40 int rtmac_vnic_add(struct rtnet_device *rtdev, vnic_xmit_handler vnic_xmit);
41 int rtmac_vnic_unregister(struct rtnet_device *rtdev);
42 
43 static inline void rtmac_vnic_cleanup(struct rtnet_device *rtdev)
44 {
45  struct rtmac_priv *mac_priv = rtdev->mac_priv;
46 
47  rtskb_pool_release(&mac_priv->vnic_skb_pool);
48 }
49 
50 #ifdef CONFIG_XENO_OPT_VFILE
51 int rtnet_rtmac_vnics_show(struct xnvfile_regular_iterator *it, void *data);
52 #endif
53 
54 int __init rtmac_vnic_module_init(void);
55 void rtmac_vnic_module_cleanup(void);
56 
57 #endif /* __KERNEL__ */
58 
59 #endif /* __RTMAC_VNIC_H_ */
Regular vfile iterator.
Definition: vfile.h:269