]>
git.proxmox.com Git - mirror_ovs.git/blob - lib/dpif-netlink.h
2 * Copyright (c) 2010, 2011, 2014 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 DPIF_NETLINK_H
18 #define DPIF_NETLINK_H 1
23 #include "odp-netlink.h"
29 struct dpif_netlink_vport
{
30 /* Generic Netlink header. */
33 /* ovs_vport header. */
35 int netnsid
; /* Network Namespace ID. */
36 odp_port_t port_no
; /* ODPP_NONE if unknown. */
37 enum ovs_vport_type type
;
41 * The 'stats' member points to 64-bit data that might only be aligned on
42 * 32-bit boundaries, so use get_unaligned_u64() to access its values.
44 const char *name
; /* OVS_VPORT_ATTR_NAME. */
45 uint32_t n_upcall_pids
;
46 const uint32_t *upcall_pids
; /* OVS_VPORT_ATTR_UPCALL_PID. */
47 const struct ovs_vport_stats
*stats
; /* OVS_VPORT_ATTR_STATS. */
48 const struct nlattr
*options
; /* OVS_VPORT_ATTR_OPTIONS. */
52 void dpif_netlink_vport_init(struct dpif_netlink_vport
*);
54 int dpif_netlink_vport_transact(const struct dpif_netlink_vport
*request
,
55 struct dpif_netlink_vport
*reply
,
56 struct ofpbuf
**bufp
);
57 int dpif_netlink_vport_get(const char *name
, struct dpif_netlink_vport
*reply
,
58 struct ofpbuf
**bufp
);
60 bool dpif_netlink_is_internal_device(const char *name
);
62 enum ovs_vport_type
netdev_to_ovs_vport_type(const char *type
);
64 #endif /* dpif-netlink.h */