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
24 #include "netdev-provider.h"
25 #include "ovs-thread.h"
30 /* Protects all members below. */
31 struct ovs_mutex mutex;
33 struct eth_addr etheraddr;
34 struct netdev_stats stats;
37 struct netdev_tunnel_config tnl_cfg;
38 char egress_iface[IFNAMSIZ];
45 int netdev_vport_construct(struct netdev *);
48 is_vport_class(const struct netdev_class *class)
50 return class->construct == netdev_vport_construct;
53 static inline struct netdev_vport *
54 netdev_vport_cast(const struct netdev *netdev)
56 ovs_assert(is_vport_class(netdev_get_class(netdev)));
57 return CONTAINER_OF(netdev, struct netdev_vport, up);