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
17extern "C" {
18#endif
19
20extern int rtnl_nat_set_old_addr(struct rtnl_act *act, in_addr_t addr);
21extern int rtnl_nat_get_old_addr(struct rtnl_act *act, in_addr_t *addr);
22extern int rtnl_nat_set_new_addr(struct rtnl_act *act, in_addr_t addr);
23extern int rtnl_nat_get_new_addr(struct rtnl_act *act, in_addr_t *addr);
24extern int rtnl_nat_set_mask(struct rtnl_act *act, in_addr_t bitmask);
25extern int rtnl_nat_get_mask(struct rtnl_act *act, in_addr_t *bitmask);
26extern int rtnl_nat_set_flags(struct rtnl_act *act, uint32_t flags);
27extern int rtnl_nat_get_flags(struct rtnl_act *act, uint32_t *flags);
28extern int rtnl_nat_set_action(struct rtnl_act *act, int action);
29extern int rtnl_nat_get_action(struct rtnl_act *act, int *action);
30
31#ifdef __cplusplus
32}
33#endif
34
35#endif /* NETLINK_NAT_H */
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
int rtnl_nat_set_flags(struct rtnl_act *act, uint32_t flags)
Set flags for a netlink NAT action object.
Definition: nat.c:208
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
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