Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(v1): http://lists.infradead.org/pipermail/libnl/2017-April/002308.html http://lists.infradead.org/pipermail/libnl/2017-May/002316.html Signed-off-by: Thomas Haller <thaller@redhat.com>
- Loading branch information
Showing
8 changed files
with
745 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef __LINUX_NETCONF_H_ | ||
#define __LINUX_NETCONF_H_ | ||
|
||
#include <linux/types.h> | ||
#include <linux/netlink.h> | ||
|
||
struct netconfmsg { | ||
__u8 ncm_family; | ||
}; | ||
|
||
enum { | ||
NETCONFA_UNSPEC, | ||
NETCONFA_IFINDEX, | ||
NETCONFA_FORWARDING, | ||
NETCONFA_RP_FILTER, | ||
NETCONFA_MC_FORWARDING, | ||
NETCONFA_PROXY_NEIGH, | ||
NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN, | ||
NETCONFA_INPUT, | ||
__NETCONFA_MAX | ||
}; | ||
#define NETCONFA_MAX (__NETCONFA_MAX - 1) | ||
#define NETCONFA_ALL -1 | ||
|
||
#define NETCONFA_IFINDEX_ALL -1 | ||
#define NETCONFA_IFINDEX_DEFAULT -2 | ||
|
||
#endif /* __LINUX_NETCONF_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,4 +47,8 @@ typedef unsigned short sa_family_t; | |
#define AF_LLC 26 | ||
#endif | ||
|
||
#ifndef AF_MPLS | ||
#define AF_MPLS 28 | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* netlink/route/netconf.h rtnetlink netconf layer | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation version 2.1 | ||
* of the License. | ||
* | ||
* Copyright (c) 2017 David Ahern <dsa@cumulusnetworks.com> | ||
*/ | ||
|
||
#ifndef NETCONF_H_ | ||
#define NETCONF_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
struct rtnl_netconf; | ||
|
||
int rtnl_netconf_alloc_cache(struct nl_sock *sk, struct nl_cache **result); | ||
|
||
struct rtnl_netconf *rtnl_netconf_get_by_idx(struct nl_cache *cache, int family, | ||
int ifindex); | ||
struct rtnl_netconf *rtnl_netconf_get_all(struct nl_cache *cache, | ||
int family); | ||
struct rtnl_netconf *rtnl_netconf_get_default(struct nl_cache *cache, | ||
int family); | ||
void rtnl_netconf_put(struct rtnl_netconf *nc); | ||
|
||
int rtnl_netconf_get_family(struct rtnl_netconf *nc, int *val); | ||
int rtnl_netconf_get_ifindex(struct rtnl_netconf *nc, int *val); | ||
int rtnl_netconf_get_forwarding(struct rtnl_netconf *nc, int *val); | ||
int rtnl_netconf_get_mc_forwarding(struct rtnl_netconf *nc, int *val); | ||
int rtnl_netconf_get_rp_filter(struct rtnl_netconf *nc, int *val); | ||
int rtnl_netconf_get_proxy_neigh(struct rtnl_netconf *nc, int *val); | ||
int rtnl_netconf_get_ignore_routes_linkdown(struct rtnl_netconf *nc, int *val); | ||
int rtnl_netconf_get_input(struct rtnl_netconf *nc, int *val); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
Oops, something went wrong.