FD.io VPP  v21.01.1
Vector Packet Processing
lib.h File Reference

NAT port/address allocation lib. More...

+ Include dependency graph for lib.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  nat_timeouts_t
 

Macros

#define foreach_nat_config_flag
 
#define foreach_nat_counter   _ (tcp) _ (udp) _ (icmp) _ (other) _ (drops)
 
#define foreach_nat_error
 
#define foreach_nat_protocol
 
#define NAT_UDP_TIMEOUT   300
 
#define NAT_TCP_TRANSITORY_TIMEOUT   240
 
#define NAT_TCP_ESTABLISHED_TIMEOUT   7440
 
#define NAT_ICMP_TIMEOUT   60
 

Typedefs

typedef enum nat_config_flags_t_ nat_config_flags_t
 

Enumerations

enum  nat_config_flags_t_ { foreach_nat_config_flag }
 
enum  nat_error_t { foreach_nat_error }
 
enum  nat_protocol_t { foreach_nat_protocol }
 

Functions

static_always_inline void nat_reset_timeouts (nat_timeouts_t *timeouts)
 

Detailed Description

NAT port/address allocation lib.

Definition in file lib.h.

Macro Definition Documentation

◆ foreach_nat_config_flag

#define foreach_nat_config_flag
Value:
_(0x01, IS_TWICE_NAT) \
_(0x02, IS_SELF_TWICE_NAT) \
_(0x04, IS_OUT2IN_ONLY) \
_(0x08, IS_ADDR_ONLY) \
_(0x10, IS_OUTSIDE) \
_(0x20, IS_INSIDE) \
_(0x40, IS_STATIC) \
_(0x80, IS_EXT_HOST_VALID)

Definition at line 25 of file lib.h.

◆ foreach_nat_counter

#define foreach_nat_counter   _ (tcp) _ (udp) _ (icmp) _ (other) _ (drops)

Definition at line 42 of file lib.h.

◆ foreach_nat_error

#define foreach_nat_error
Value:
_ (VALUE_EXIST, -1, "Value already exists") \
_ (NO_SUCH_ENTRY, -2, "No such entry") \
_ (UNKNOWN_PROTOCOL, -3, "Unknown protocol") \
_ (OUT_OF_TRANSLATIONS, -4, "Out of translations")

Definition at line 44 of file lib.h.

◆ foreach_nat_protocol

#define foreach_nat_protocol
Value:
_ (OTHER, 0, other, "other") \
_ (UDP, 1, udp, "udp") \
_ (TCP, 2, tcp, "tcp") \
_ (ICMP, 3, icmp, "icmp")
icmp
Definition: map.api:387
description unable to translate ICMP
Definition: map.api:391

Definition at line 57 of file lib.h.

◆ NAT_ICMP_TIMEOUT

#define NAT_ICMP_TIMEOUT   60

Definition at line 74 of file lib.h.

◆ NAT_TCP_ESTABLISHED_TIMEOUT

#define NAT_TCP_ESTABLISHED_TIMEOUT   7440

Definition at line 73 of file lib.h.

◆ NAT_TCP_TRANSITORY_TIMEOUT

#define NAT_TCP_TRANSITORY_TIMEOUT   240

Definition at line 72 of file lib.h.

◆ NAT_UDP_TIMEOUT

#define NAT_UDP_TIMEOUT   300

Definition at line 71 of file lib.h.

Typedef Documentation

◆ nat_config_flags_t

Enumeration Type Documentation

◆ nat_config_flags_t_

Enumerator
foreach_nat_config_flag 

Definition at line 35 of file lib.h.

◆ nat_error_t

Enumerator
foreach_nat_error 

Definition at line 50 of file lib.h.

◆ nat_protocol_t

Enumerator
foreach_nat_protocol 

Definition at line 63 of file lib.h.

Function Documentation

◆ nat_reset_timeouts()

static_always_inline void nat_reset_timeouts ( nat_timeouts_t timeouts)

Definition at line 90 of file lib.h.

+ Here is the caller graph for this function: