diff options
Diffstat (limited to 'include/netlink/route')
-rw-r--r-- | include/netlink/route/link/bonding.h | 6 | ||||
-rw-r--r-- | include/netlink/route/link/bridge_info.h | 35 | ||||
-rw-r--r-- | include/netlink/route/link/can.h | 3 | ||||
-rw-r--r-- | include/netlink/route/link/inet.h | 1 | ||||
-rw-r--r-- | include/netlink/route/link/inet6.h | 5 | ||||
-rw-r--r-- | include/netlink/route/neighbour.h | 3 | ||||
-rw-r--r-- | include/netlink/route/netconf.h | 2 | ||||
-rw-r--r-- | include/netlink/route/nh.h | 52 | ||||
-rw-r--r-- | include/netlink/route/qdisc/red.h | 9 |
9 files changed, 116 insertions, 0 deletions
diff --git a/include/netlink/route/link/bonding.h b/include/netlink/route/link/bonding.h index 09d495eb..e12d8a52 100644 --- a/include/netlink/route/link/bonding.h +++ b/include/netlink/route/link/bonding.h @@ -25,6 +25,12 @@ extern int rtnl_link_bond_enslave(struct nl_sock *, struct rtnl_link *, extern int rtnl_link_bond_release_ifindex(struct nl_sock *, int); extern int rtnl_link_bond_release(struct nl_sock *, struct rtnl_link *); +extern void rtnl_link_bond_set_mode(struct rtnl_link *link, uint8_t mode); +extern void rtnl_link_bond_set_activeslave(struct rtnl_link *link, int active_slave); +extern void rtnl_link_bond_set_hashing_type (struct rtnl_link *link, uint8_t type); +extern void rtnl_link_bond_set_miimon (struct rtnl_link *link, uint32_t miimon); +extern void rtnl_link_bond_set_min_links (struct rtnl_link *link, uint32_t min_links); + #ifdef __cplusplus } #endif diff --git a/include/netlink/route/link/bridge_info.h b/include/netlink/route/link/bridge_info.h new file mode 100644 index 00000000..09689b32 --- /dev/null +++ b/include/netlink/route/link/bridge_info.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * Copyright (c) 2022 MaxLinear, Inc. + */ + +#ifndef NETLINK_LINK_BRIDGE_INFO_H_ +#define NETLINK_LINK_BRIDGE_INFO_H_ + +#include <netlink/netlink.h> +#include <netlink/route/link.h> + +#ifdef __cplusplus +extern "C" { +#endif + +extern void rtnl_link_bridge_set_vlan_filtering(struct rtnl_link *link, + uint8_t vlan_filtering); +extern int rtnl_link_bridge_get_vlan_filtering(struct rtnl_link *link, + uint8_t *vlan_filtering); + +extern void rtnl_link_bridge_set_vlan_protocol(struct rtnl_link *link, + uint16_t vlan_protocol); +extern int rtnl_link_bridge_get_vlan_protocol(struct rtnl_link *link, + uint16_t *vlan_protocol); + +extern void rtnl_link_bridge_set_vlan_stats_enabled(struct rtnl_link *link, + uint8_t vlan_stats_enabled); +extern int rtnl_link_bridge_get_vlan_stats_enabled(struct rtnl_link *link, + uint8_t *vlan_stats_enabled); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/netlink/route/link/can.h b/include/netlink/route/link/can.h index 7df50e3d..1c23660a 100644 --- a/include/netlink/route/link/can.h +++ b/include/netlink/route/link/can.h @@ -60,6 +60,9 @@ extern int rtnl_link_can_get_data_bittiming(struct rtnl_link *, extern int rtnl_link_can_set_data_bittiming(struct rtnl_link *, const struct can_bittiming *); +extern int rtnl_link_can_get_device_stats(struct rtnl_link *, + struct can_device_stats *); + #ifdef __cplusplus } #endif diff --git a/include/netlink/route/link/inet.h b/include/netlink/route/link/inet.h index 2e93cc5b..b1318d18 100644 --- a/include/netlink/route/link/inet.h +++ b/include/netlink/route/link/inet.h @@ -7,6 +7,7 @@ #define NETLINK_LINK_INET_H_ #include <netlink/netlink.h> +#include <netlink/route/link.h> #ifdef __cplusplus extern "C" { diff --git a/include/netlink/route/link/inet6.h b/include/netlink/route/link/inet6.h index cf257ca0..89394276 100644 --- a/include/netlink/route/link/inet6.h +++ b/include/netlink/route/link/inet6.h @@ -7,6 +7,7 @@ #define NETLINK_LINK_INET6_H_ #include <netlink/netlink.h> +#include <netlink/route/link.h> #ifdef __cplusplus extern "C" { @@ -36,6 +37,10 @@ extern int rtnl_link_inet6_get_flags(struct rtnl_link *, extern int rtnl_link_inet6_set_flags(struct rtnl_link *, uint32_t); +extern int rtnl_link_inet6_get_conf(struct rtnl_link *, + unsigned int, + uint32_t *); + /* Link Flags Translations */ extern char * rtnl_link_inet6_flags2str(int, char *, size_t); extern int rtnl_link_inet6_str2flags(const char *); diff --git a/include/netlink/route/neighbour.h b/include/netlink/route/neighbour.h index 37604149..657db535 100644 --- a/include/netlink/route/neighbour.h +++ b/include/netlink/route/neighbour.h @@ -79,6 +79,9 @@ extern int rtnl_neigh_get_vlan(struct rtnl_neigh *); extern void rtnl_neigh_set_master(struct rtnl_neigh *, int); extern int rtnl_neigh_get_master(struct rtnl_neigh *); +extern void rtnl_neigh_set_nhid(struct rtnl_neigh *, uint32_t); +extern int rtnl_neigh_get_nhid(struct rtnl_neigh *, uint32_t *); + #ifdef __cplusplus } #endif diff --git a/include/netlink/route/netconf.h b/include/netlink/route/netconf.h index 7006c6ee..a6b1f89f 100644 --- a/include/netlink/route/netconf.h +++ b/include/netlink/route/netconf.h @@ -10,6 +10,8 @@ extern "C" { #endif +struct nl_sock; +struct nl_cache; struct rtnl_netconf; int rtnl_netconf_alloc_cache(struct nl_sock *sk, struct nl_cache **result); diff --git a/include/netlink/route/nh.h b/include/netlink/route/nh.h new file mode 100644 index 00000000..3edbad7d --- /dev/null +++ b/include/netlink/route/nh.h @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * Copyright (c) 2022 Stanislav Zaikin <zstaseg@gmail.com> + */ + +#ifndef NETLINK_ROUTE_NEXTHOP2_H_ +#define NETLINK_ROUTE_NEXTHOP2_H_ + +#include <netlink/netlink.h> +#include <netlink/addr.h> + +#ifdef __cplusplus +extern "C" { +#endif + +struct rtnl_nh; + +typedef struct nl_nh_group_info { + uint32_t nh_id; /*!< nexthop id */ + uint8_t weight; /*!< weight in nexthop group */ +} nl_nh_group_info_t; + +typedef struct nl_nh_group { + int ce_refcnt; + unsigned size; + nl_nh_group_info_t *entries; +} nl_nh_group_t; + +extern int rtnl_nh_alloc_cache(struct nl_sock *sk, int family, + struct nl_cache **result); +extern struct rtnl_nh *rtnl_nh_alloc(void); +extern void rtnl_nh_put(struct rtnl_nh *); + +extern struct rtnl_nh *rtnl_nh_get(struct nl_cache *cache, int nhid); + +extern int rtnl_nh_set_gateway(struct rtnl_nh *, struct nl_addr *); +extern struct nl_addr *rtnl_nh_get_gateway(struct rtnl_nh *); + +extern int rtnl_nh_set_fdb(struct rtnl_nh *, int value); +extern int rtnl_nh_get_fdb(struct rtnl_nh *); + +extern int rtnl_nh_get_group_entry(struct rtnl_nh *, int n); +extern int rtnl_nh_get_group_size(struct rtnl_nh *); + +extern int rtnl_nh_get_id(struct rtnl_nh *); +extern int rtnl_nh_get_oif(struct rtnl_nh *); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/netlink/route/qdisc/red.h b/include/netlink/route/qdisc/red.h index 51d38ed7..f74ad807 100644 --- a/include/netlink/route/qdisc/red.h +++ b/include/netlink/route/qdisc/red.h @@ -7,8 +7,17 @@ #define NETLINK_RED_H_ #include <netlink/netlink.h> +#include <netlink/route/qdisc.h> + +#ifdef __cplusplus +extern "C" { +#endif extern void rtnl_red_set_limit(struct rtnl_qdisc *qdisc, int limit); extern int rtnl_red_get_limit(struct rtnl_qdisc *qdisc); +#ifdef __cplusplus +} +#endif + #endif |