| 1 |
/* SPDX-License-Identifier: LGPL-2.1-only */ |
| 2 |
/* |
| 3 |
* Copyright (c) 2016 Magnus Öberg <[email protected]> |
| 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 */ |