2 * Copyright (c) 2010, 2011, 2013, 2015 Nicira, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef NETDEV_VPORT_PRIVATE_H
18 #define NETDEV_VPORT_PRAVITE_H 1
23 #include "ovs-thread.h"
28 /* Protects all members below. */
29 struct ovs_mutex mutex;
31 struct eth_addr etheraddr;
32 struct netdev_stats stats;
35 struct netdev_tunnel_config tnl_cfg;
36 char egress_iface[IFNAMSIZ];
43 int netdev_vport_construct(struct netdev *);
46 is_vport_class(const struct netdev_class *class)
48 return class->construct == netdev_vport_construct;
51 static inline struct netdev_vport *
52 netdev_vport_cast(const struct netdev *netdev)
54 ovs_assert(is_vport_class(netdev_get_class(netdev)));
55 return CONTAINER_OF(netdev, struct netdev_vport, up);