Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ipv4_nat.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright 2026 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
21
22#ifndef ZEPHYR_INCLUDE_NET_IPV4_NAT_H_
23#define ZEPHYR_INCLUDE_NET_IPV4_NAT_H_
24
25#include <zephyr/kernel.h>
26#include <zephyr/types.h>
27#include <stdbool.h>
28
29#include <zephyr/net/net_core.h>
30#include <zephyr/net/net_if.h>
31#include <zephyr/net/net_ip.h>
32#include <zephyr/net/net_pkt.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
66
74
81
88
89#ifdef __cplusplus
90}
91#endif
92
96
97#endif /* ZEPHYR_INCLUDE_NET_IPV4_NAT_H_ */
#define NET_IPV4_ADDR_SIZE
Binary size of the IPv4 address.
Definition net_ip.h:166
net_ip_protocol
Protocol numbers from IANA/BSD.
Definition net_ip.h:64
void net_ipv4_table_rule_del(int idx)
Remove an iptable rule by index.
int net_ipv4_table_rule_add(struct net_iptable_rule_params *param)
Add a new iptable rule.
void net_ipv4_nat_init(void)
Initialize IPv4 NAT subsystem.
Public kernel APIs.
Network core definitions.
Public API for network interface.
IPv6 and IPv4 definitions.
Network packet buffer descriptor API.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Parameters to define an iptable rule.
Definition ipv4_nat.h:44
uint8_t dst_mask[NET_IPV4_ADDR_SIZE]
Destination IPv4 mask.
Definition ipv4_nat.h:56
uint8_t priority
Rule's match priority (higher value is higher priority).
Definition ipv4_nat.h:60
uint8_t src_mask[NET_IPV4_ADDR_SIZE]
Source IPv4 mask.
Definition ipv4_nat.h:52
uint8_t src[NET_IPV4_ADDR_SIZE]
Source IPv4 address.
Definition ipv4_nat.h:50
int unreply_timeout
Unreplied timeout in seconds; 0: use default, -1: never expires.
Definition ipv4_nat.h:62
int reply_timeout
Replied timeout in seconds; 0: use default, -1: never expires.
Definition ipv4_nat.h:64
uint8_t dst[NET_IPV4_ADDR_SIZE]
Destination IPv4 address.
Definition ipv4_nat.h:54
int output_iface_idx
Output interface index.
Definition ipv4_nat.h:48
int input_iface_idx
Input interface index.
Definition ipv4_nat.h:46
enum net_ip_protocol proto
Protocol number (e.g., IPPROTO_TCP, IPPROTO_UDP).
Definition ipv4_nat.h:58