]> git.proxmox.com Git - ovs.git/blame - lib/dpif-linux.h
dpif-linux: Replace 'minor' by 'dp_idx'.
[ovs.git] / lib / dpif-linux.h
CommitLineData
9fe3b9a2 1/*
c19e6535 2 * Copyright (c) 2010, 2011 Nicira Networks.
9fe3b9a2
BP
3 *
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:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17#ifndef DPIF_LINUX_H
18#define DPIF_LINUX_H 1
19
20#include <stdbool.h>
f0fef760 21#include <stdint.h>
c19e6535
BP
22#include "openvswitch/datapath-protocol.h"
23
24struct ofpbuf;
25
26struct dpif_linux_vport {
f0fef760
BP
27 /* Generic Netlink header. */
28 uint8_t cmd;
c19e6535
BP
29
30 /* odp_vport header. */
31 uint32_t dp_idx;
32 uint32_t port_no; /* UINT32_MAX if unknown. */
33 enum odp_vport_type type;
34
35 /* Attributes. */
36 const char *name; /* ODP_VPORT_ATTR_NAME. */
37 const struct rtnl_link_stats64 *stats; /* ODP_VPORT_ATTR_STATS. */
38 const uint8_t *address; /* ODP_VPORT_ATTR_ADDRESS. */
39 int mtu; /* ODP_VPORT_ATTR_MTU. */
40 const struct nlattr *options; /* ODP_VPORT_ATTR_OPTIONS. */
41 size_t options_len;
42 int ifindex; /* ODP_VPORT_ATTR_IFINDEX. */
43 int iflink; /* ODP_VPORT_ATTR_IFLINK. */
44};
45
46void dpif_linux_vport_init(struct dpif_linux_vport *);
47
48int dpif_linux_vport_transact(const struct dpif_linux_vport *request,
49 struct dpif_linux_vport *reply,
50 struct ofpbuf **bufp);
51int dpif_linux_vport_get(const char *name, struct dpif_linux_vport *reply,
52 struct ofpbuf **bufp);
9fe3b9a2
BP
53
54bool dpif_linux_is_internal_device(const char *name);
55
56#endif /* dpif-linux.h */