Prepare Open vSwitch 1.1.2 release.
[sliver-openvswitch.git] / datapath / vport-netdev.h
1 /*
2  * Copyright (c) 2010 Nicira Networks.
3  * Distributed under the terms of the GNU GPL version 2.
4  *
5  * Significant portions of this file may be copied from parts of the Linux
6  * kernel, by Linus Torvalds and others.
7  */
8
9 #ifndef VPORT_NETDEV_H
10 #define VPORT_NETDEV_H 1
11
12 #include <linux/netdevice.h>
13
14 #include "vport.h"
15
16 struct vport *netdev_get_vport(struct net_device *dev);
17
18 struct netdev_vport {
19         struct net_device *dev;
20 };
21
22 static inline struct netdev_vport *
23 netdev_vport_priv(const struct vport *vport)
24 {
25         return vport_priv(vport);
26 }
27
28 int netdev_set_mtu(struct vport *, int mtu);
29 int netdev_set_addr(struct vport *, const unsigned char *addr);
30 const char *netdev_get_name(const struct vport *);
31 const unsigned char *netdev_get_addr(const struct vport *);
32 const char *netdev_get_config(const struct vport *);
33 struct kobject *netdev_get_kobj(const struct vport *);
34 int netdev_get_stats(const struct vport *, struct rtnl_link_stats64 *);
35 unsigned netdev_get_dev_flags(const struct vport *);
36 int netdev_is_running(const struct vport *);
37 unsigned char netdev_get_operstate(const struct vport *);
38 int netdev_get_ifindex(const struct vport *);
39 int netdev_get_iflink(const struct vport *);
40 int netdev_get_mtu(const struct vport *);
41
42 #endif /* vport_netdev.h */