libnl 3.12.0
nexthop-encap.h
1#ifndef NETLINK_NEXTHOP_ENCAP_H_
2#define NETLINK_NEXTHOP_ENCAP_H_
3
4struct rtnl_nh_encap;
5
7 uint16_t encap_type;
8
9 int (*build_msg)(struct nl_msg *msg, void *priv);
10 int (*parse_msg)(struct nlattr *nla, struct rtnl_nh_encap **encap_out);
11
12 int (*compare)(void *a, void *b);
13 void *(*clone)(void *priv);
14
15 void (*dump)(void *priv, struct nl_dump_params *dp);
16 void (*destructor)(void *priv);
17};
18
19/*
20 * generic nexthop encap
21 */
22int nh_encap_parse_msg(struct nlattr *encap, struct nlattr *encap_type,
23 struct rtnl_nh_encap **encap_out);
24int nh_encap_build_msg(struct nl_msg *msg, struct rtnl_nh_encap *rtnh_encap);
25
26void nh_encap_dump(struct rtnl_nh_encap *rtnh_encap, struct nl_dump_params *dp);
27
28int nh_encap_compare(struct rtnl_nh_encap *a, struct rtnl_nh_encap *b);
29
30void *nh_encap_check_and_get_priv(struct rtnl_nh_encap *nh_encap,
31 uint16_t encap_type);
32
33/*
34 * MPLS encap
35 */
36extern const struct nh_encap_ops mpls_encap_ops;
37
38/*
39 * IPv6 encap
40 */
41extern const struct nh_encap_ops ip6_encap_ops;
42
43/*
44 * IPv4 encap
45 */
46extern const struct nh_encap_ops ip_encap_ops;
47
48/*
49 * ILA encap
50 */
51extern const struct nh_encap_ops ila_encap_ops;
52#endif
Dumping parameters.
Definition types.h:32