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