forked from jbenc/plotnetcfg
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompat.h
More file actions
56 lines (45 loc) · 1.32 KB
/
compat.h
File metadata and controls
56 lines (45 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* This file is a part of plotnetcfg, a tool to visualize network config.
* Copyright (C) 2015 Red Hat, Inc. -- Jiri Benc <jbenc@redhat.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _COMPAT_H
#define _COMPAT_H
#define IFLA_LINK_NETNSID 37
#if IFLA_MAX < IFLA_LINK_NETNSID
#undef IFLA_MAX
#define IFLA_MAX IFLA_LINK_NETNSID
#endif
#define NETNSA_NSID 1
#define NETNSA_FD 3
#if NETNSA_MAX < NETNSA_FD
#undef NETNSA_MAX
#define NETNSA_MAX NETNSA_FD
#endif
#ifndef RTM_GETNSID
#define RTM_GETNSID 90
#endif
#if RTM_MAX < RTM_GETNSID
#undef RTM_MAX
#define RTM_MAX (((RTM_GETNSID + 4) & ~3) - 1)
#endif
#ifndef NETNS_RTA
#define NETNS_RTA(r) \
((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtgenmsg))))
#endif
#define OVS_VPORT_FAMILY "ovs_vport"
#define OVS_VPORT_CMD_GET 3
#define OVS_VPORT_ATTR_NAME 3
struct ovs_header {
int dp_ifindex;
};
#endif