libnl 3.5.0

xfrmi.h
1 /*
2 * netlink/route/link/xfrmi.h XFRMI interface
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation version 2.1
7 * of the License.
8 *
9 * Copyright (c) 2019 Eyal Birger <eyal.birger@gmail.com>
10 *
11 * Based on netlink/route/link/ipvti.h
12 */
13
14 #ifndef NETLINK_LINK_XFRMI_H_
15 #define NETLINK_LINK_XFRMI_H_
16
17 #include <netlink/netlink.h>
18 #include <netlink/route/link.h>
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 extern struct rtnl_link *rtnl_link_xfrmi_alloc(void);
24
25 extern int rtnl_link_is_xfrmi(struct rtnl_link *link);
26
27 extern int rtnl_link_xfrmi_set_link(struct rtnl_link *link, uint32_t index);
28 extern int rtnl_link_xfrmi_get_link(struct rtnl_link *link, uint32_t *out_link);
29
30 extern int rtnl_link_xfrmi_set_if_id(struct rtnl_link *link, uint32_t if_id);
31 extern int rtnl_link_xfrmi_get_if_id(struct rtnl_link *link, uint32_t *out_if_id);
32
33 #ifdef __cplusplus
34 }
35 #endif
36
37 #endif
rtnl_link_is_xfrmi
int rtnl_link_is_xfrmi(struct rtnl_link *link)
Check if link is a XFRMI link.
Definition: xfrmi.c:227
rtnl_link_xfrmi_set_link
int rtnl_link_xfrmi_set_link(struct rtnl_link *link, uint32_t index)
Set XFRMI link interface index.
Definition: xfrmi.c:240
rtnl_link
Link object.
rtnl_link_xfrmi_set_if_id
int rtnl_link_xfrmi_set_if_id(struct rtnl_link *link, uint32_t if_id)
Set XFRMI if_id.
Definition: xfrmi.c:279
rtnl_link_xfrmi_get_if_id
int rtnl_link_xfrmi_get_if_id(struct rtnl_link *link, uint32_t *out_if_id)
Get XFRMI if_id.
Definition: xfrmi.c:298
rtnl_link_xfrmi_get_link
int rtnl_link_xfrmi_get_link(struct rtnl_link *link, uint32_t *out_link)
Get XFRMI link interface index.
Definition: xfrmi.c:259