6#ifndef NETLINK_ROUTE_NEXTHOP_H_
7#define NETLINK_ROUTE_NEXTHOP_H_
9#include <netlink/netlink.h>
10#include <netlink/addr.h>
19 NH_DUMP_FROM_ONELINE = -2,
20 NH_DUMP_FROM_DETAILS = -1,
25extern struct rtnl_nexthop * rtnl_route_nh_alloc(
void);
26extern struct rtnl_nexthop * rtnl_route_nh_clone(
struct rtnl_nexthop *);
27extern void rtnl_route_nh_free(
struct rtnl_nexthop *);
29extern int rtnl_route_nh_compare(
struct rtnl_nexthop *,
30 struct rtnl_nexthop *,
33extern void rtnl_route_nh_dump(
struct rtnl_nexthop *,
36extern void rtnl_route_nh_set_weight(
struct rtnl_nexthop *, uint8_t);
37extern uint8_t rtnl_route_nh_get_weight(
struct rtnl_nexthop *);
38extern void rtnl_route_nh_set_ifindex(
struct rtnl_nexthop *,
int);
39extern int rtnl_route_nh_get_ifindex(
struct rtnl_nexthop *);
40extern void rtnl_route_nh_set_gateway(
struct rtnl_nexthop *,
42extern struct nl_addr * rtnl_route_nh_get_gateway(
struct rtnl_nexthop *);
43extern void rtnl_route_nh_set_flags(
struct rtnl_nexthop *,
45extern void rtnl_route_nh_unset_flags(
struct rtnl_nexthop *,
47extern unsigned int rtnl_route_nh_get_flags(
struct rtnl_nexthop *);
48extern void rtnl_route_nh_set_realms(
struct rtnl_nexthop *,
50extern uint32_t rtnl_route_nh_get_realms(
struct rtnl_nexthop *);
52extern int rtnl_route_nh_set_newdst(
struct rtnl_nexthop *,
54extern struct nl_addr * rtnl_route_nh_get_newdst(
struct rtnl_nexthop *);
55extern int rtnl_route_nh_set_via(
struct rtnl_nexthop *,
57extern struct nl_addr * rtnl_route_nh_get_via(
struct rtnl_nexthop *);
58extern char * rtnl_route_nh_flags2str(
int,
char *,
size_t);
59extern int rtnl_route_nh_str2flags(
const char *);
64extern int rtnl_route_nh_encap_mpls(
struct rtnl_nexthop *nh,
67extern struct nl_addr * rtnl_route_nh_get_encap_mpls_dst(
struct rtnl_nexthop *);
68extern uint8_t rtnl_route_nh_get_encap_mpls_ttl(
struct rtnl_nexthop *);