6#ifndef NETLINK_ROUTE_NEXTHOP2_H_
7#define NETLINK_ROUTE_NEXTHOP2_H_
9#include <netlink/netlink.h>
10#include <netlink/addr.h>
26 nl_nh_group_info_t *entries;
29extern int rtnl_nh_alloc_cache(
struct nl_sock *sk,
int family,
30 struct nl_cache **result);
31extern struct rtnl_nh *rtnl_nh_alloc(
void);
32extern int rtnl_nh_add(
struct nl_sock *sk,
struct rtnl_nh *nh,
int flags);
33extern void rtnl_nh_put(
struct rtnl_nh *);
35extern struct rtnl_nh *rtnl_nh_get(
struct nl_cache *cache,
int nhid);
37extern int rtnl_nh_set_gateway(
struct rtnl_nh *,
struct nl_addr *);
38extern struct nl_addr *rtnl_nh_get_gateway(
struct rtnl_nh *);
40extern int rtnl_nh_set_fdb(
struct rtnl_nh *,
int value);
41extern int rtnl_nh_get_fdb(
struct rtnl_nh *);
43extern int rtnl_nh_get_group_entry(
struct rtnl_nh *,
int n);
44extern int rtnl_nh_get_group_size(
struct rtnl_nh *);
46extern int rtnl_nh_set_group(
struct rtnl_nh *,
47 const nl_nh_group_info_t *entries,
unsigned size);
49extern int rtnl_nh_set_id(
struct rtnl_nh *, uint32_t
id);
50extern int rtnl_nh_get_id(
struct rtnl_nh *);
51extern int rtnl_nh_set_oif(
struct rtnl_nh *, uint32_t ifindex);
52extern int rtnl_nh_get_oif(
struct rtnl_nh *);
54extern int rtnl_nh_set_family(
struct rtnl_nh *, uint8_t family);
55extern int rtnl_nh_get_family(
struct rtnl_nh *);
57extern int rtnl_nh_set_group_type(
struct rtnl_nh *, uint16_t group_type);
58extern int rtnl_nh_get_group_type(
struct rtnl_nh *);
61extern int rtnl_nh_set_res_group_bucket_size(
struct rtnl_nh *,
63extern int rtnl_nh_get_res_group_bucket_size(
struct rtnl_nh *);
65extern int rtnl_nh_set_res_group_idle_timer(
struct rtnl_nh *,
67extern int rtnl_nh_get_res_group_idle_timer(
struct rtnl_nh *,
70extern int rtnl_nh_set_res_group_unbalanced_timer(
struct rtnl_nh *,
71 uint32_t unbalanced_timer);
72extern int rtnl_nh_get_res_group_unbalanced_timer(
struct rtnl_nh *,
77extern int rtnl_nh_set_encap(
struct rtnl_nh *,
struct rtnl_nh_encap *);
78extern struct rtnl_nh_encap *rtnl_nh_get_encap(
struct rtnl_nh *);