libnl: /data/src/libnl3/include/netlink/route/act/nat.h Source File

libnl 3.7.0

nat.h
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3 * Copyright (c) 2016 Magnus Öberg <magnus.oberg@westermo.se>
4 */
5
6 #ifndef NETLINK_NAT_H_
7 #define NETLINK_NAT_H_
8
9 #include <netlink/netlink.h>
10 #include <netlink/cache.h>
11 #include <netlink/route/action.h>
12 #include <linux/tc_act/tc_nat.h>
13
14 #include <netinet/in.h>
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 extern int rtnl_nat_set_old_addr(struct rtnl_act *act, in_addr_t addr);
21 extern int rtnl_nat_get_old_addr(struct rtnl_act *act, in_addr_t *addr);
22 extern int rtnl_nat_set_new_addr(struct rtnl_act *act, in_addr_t addr);
23 extern int rtnl_nat_get_new_addr(struct rtnl_act *act, in_addr_t *addr);
24 extern int rtnl_nat_set_mask(struct rtnl_act *act, in_addr_t bitmask);
25 extern int rtnl_nat_get_mask(struct rtnl_act *act, in_addr_t *bitmask);
26 extern int rtnl_nat_set_flags(struct rtnl_act *act, uint32_t flags);
27 extern int rtnl_nat_get_flags(struct rtnl_act *act, uint32_t *flags);
28 extern int rtnl_nat_set_action(struct rtnl_act *act, int action);
29 extern int rtnl_nat_get_action(struct rtnl_act *act, int *action);
30
31 #ifdef __cplusplus
32 }
33 #endif
34
35 #endif /* NETLINK_NAT_H */
rtnl_nat_set_new_addr
int rtnl_nat_set_new_addr(struct rtnl_act *act, in_addr_t addr)
Set new IPv4 address on a netlink NAT action object.
Definition: nat.c:143
rtnl_nat_set_flags
int rtnl_nat_set_flags(struct rtnl_act *act, uint32_t flags)
Set flags for a netlink NAT action object.
Definition: nat.c:208
rtnl_nat_set_old_addr
int rtnl_nat_set_old_addr(struct rtnl_act *act, in_addr_t addr)
Set old IPv4 address on a netlink NAT action object.
Definition: nat.c:112
rtnl_nat_set_mask
int rtnl_nat_set_mask(struct rtnl_act *act, in_addr_t bitmask)
Set IPv4 address mask on a netlink NAT action object.
Definition: nat.c:174