FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
nat64_out2in.c File Reference

NAT64 IPv4 to IPv6 translation (otside to inside network) More...

+ Include dependency graph for nat64_out2in.c:

Go to the source code of this file.

Data Structures

struct  nat64_out2in_trace_t
 
struct  nat64_out2in_reass_trace_t
 
struct  nat64_out2in_set_ctx_t_
 
struct  nat64_out2in_frag_set_ctx_t_
 
struct  nat64_out2in_handoff_trace_t
 

Macros

#define foreach_nat64_out2in_error
 
#define foreach_nat64_out2in_handoff_error
 

Typedefs

typedef struct nat64_out2in_set_ctx_t_ nat64_out2in_set_ctx_t
 
typedef struct nat64_out2in_frag_set_ctx_t_ nat64_out2in_frag_set_ctx_t
 

Enumerations

enum  nat64_out2in_error_t { NAT64_OUT2IN_N_ERROR }
 
enum  nat64_out2in_next_t {
  NAT64_OUT2IN_NEXT_IP6_LOOKUP, NAT64_OUT2IN_NEXT_IP4_LOOKUP, NAT64_OUT2IN_NEXT_DROP, NAT64_OUT2IN_NEXT_REASS,
  NAT64_OUT2IN_N_NEXT
}
 
enum  nat64_out2in_handoff_error_t { NAT64_OUT2IN_HANDOFF_N_ERROR }
 

Functions

static u8format_nat64_out2in_trace (u8 *s, va_list *args)
 
static u8format_nat64_out2in_reass_trace (u8 *s, va_list *args)
 
static int nat64_out2in_tcp_udp_set_cb (ip4_header_t *ip4, ip6_header_t *ip6, void *arg)
 
static int nat64_out2in_icmp_set_cb (ip4_header_t *ip4, ip6_header_t *ip6, void *arg)
 
static int nat64_out2in_inner_icmp_set_cb (ip4_header_t *ip4, ip6_header_t *ip6, void *arg)
 
static int nat64_out2in_unk_proto_set_cb (ip4_header_t *ip4, ip6_header_t *ip6, void *arg)
 
static uword nat64_out2in_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat64_out2in_node, nat64_out2in_node_fn)
 
static int nat64_out2in_frag_set_cb (ip4_header_t *ip4, ip6_header_t *ip6, void *arg)
 
static uword nat64_out2in_reass_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat64_out2in_reass_node, nat64_out2in_reass_node_fn)
 
static u8format_nat64_out2in_handoff_trace (u8 *s, va_list *args)
 
static uword nat64_out2in_handoff_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat64_out2in_handoff_node, nat64_out2in_handoff_node_fn)
 

Variables

vlib_node_registration_t nat64_out2in_node
 (constructor) VLIB_REGISTER_NODE (nat64_out2in_node) More...
 
vlib_node_registration_t nat64_out2in_reass_node
 (constructor) VLIB_REGISTER_NODE (nat64_out2in_reass_node) More...
 
vlib_node_registration_t nat64_out2in_handoff_node
 (constructor) VLIB_REGISTER_NODE (nat64_out2in_handoff_node) More...
 
static char * nat64_out2in_error_strings []
 
static char * nat64_out2in_handoff_error_strings []
 

Detailed Description

NAT64 IPv4 to IPv6 translation (otside to inside network)

Definition in file nat64_out2in.c.

Macro Definition Documentation

◆ foreach_nat64_out2in_error

#define foreach_nat64_out2in_error
Value:
_(UNSUPPORTED_PROTOCOL, "unsupported protocol") \
_(OUT2IN_PACKETS, "good out2in packets processed") \
_(NO_TRANSLATION, "no translation") \
_(UNKNOWN, "unknown") \
_(DROP_FRAGMENT, "drop fragment") \
_(MAX_REASS, "maximum reassemblies exceeded") \
_(MAX_FRAG, "maximum fragments per reassembly exceeded") \
_(TCP_PACKETS, "TCP packets") \
_(UDP_PACKETS, "UDP packets") \
_(ICMP_PACKETS, "ICMP packets") \
_(OTHER_PACKETS, "other protocol packets") \
_(FRAGMENTS, "fragments") \
_(CACHED_FRAGMENTS, "cached fragments") \
_(PROCESSED_FRAGMENTS, "processed fragments")

Definition at line 74 of file nat64_out2in.c.

◆ foreach_nat64_out2in_handoff_error

#define foreach_nat64_out2in_handoff_error
Value:
_(CONGESTION_DROP, "congestion drop") \
_(SAME_WORKER, "same worker") \
_(DO_HANDOFF, "do handoff")

Definition at line 954 of file nat64_out2in.c.

Typedef Documentation

◆ nat64_out2in_frag_set_ctx_t

◆ nat64_out2in_set_ctx_t

Enumeration Type Documentation

◆ nat64_out2in_error_t

Enumerator
NAT64_OUT2IN_N_ERROR 

Definition at line 91 of file nat64_out2in.c.

◆ nat64_out2in_handoff_error_t

Enumerator
NAT64_OUT2IN_HANDOFF_N_ERROR 

Definition at line 959 of file nat64_out2in.c.

◆ nat64_out2in_next_t

Enumerator
NAT64_OUT2IN_NEXT_IP6_LOOKUP 
NAT64_OUT2IN_NEXT_IP4_LOOKUP 
NAT64_OUT2IN_NEXT_DROP 
NAT64_OUT2IN_NEXT_REASS 
NAT64_OUT2IN_N_NEXT 

Definition at line 105 of file nat64_out2in.c.

Function Documentation

◆ format_nat64_out2in_handoff_trace()

static u8* format_nat64_out2in_handoff_trace ( u8 s,
va_list *  args 
)
static

Definition at line 979 of file nat64_out2in.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_nat64_out2in_reass_trace()

static u8* format_nat64_out2in_reass_trace ( u8 s,
va_list *  args 
)
static

Definition at line 55 of file nat64_out2in.c.

+ Here is the call graph for this function:

◆ format_nat64_out2in_trace()

static u8* format_nat64_out2in_trace ( u8 s,
va_list *  args 
)
static

Definition at line 34 of file nat64_out2in.c.

+ Here is the call graph for this function:

◆ nat64_out2in_frag_set_cb()

static int nat64_out2in_frag_set_cb ( ip4_header_t ip4,
ip6_header_t ip6,
void *  arg 
)
static

Definition at line 608 of file nat64_out2in.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat64_out2in_handoff_node_fn()

static uword nat64_out2in_handoff_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
inlinestatic

Definition at line 993 of file nat64_out2in.c.

+ Here is the call graph for this function:

◆ nat64_out2in_icmp_set_cb()

static int nat64_out2in_icmp_set_cb ( ip4_header_t ip4,
ip6_header_t ip6,
void *  arg 
)
static

Definition at line 203 of file nat64_out2in.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat64_out2in_inner_icmp_set_cb()

static int nat64_out2in_inner_icmp_set_cb ( ip4_header_t ip4,
ip6_header_t ip6,
void *  arg 
)
static

Definition at line 282 of file nat64_out2in.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat64_out2in_node_fn()

static uword nat64_out2in_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 434 of file nat64_out2in.c.

+ Here is the call graph for this function:

◆ nat64_out2in_reass_node_fn()

static uword nat64_out2in_reass_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 696 of file nat64_out2in.c.

+ Here is the call graph for this function:

◆ nat64_out2in_tcp_udp_set_cb()

static int nat64_out2in_tcp_udp_set_cb ( ip4_header_t ip4,
ip6_header_t ip6,
void *  arg 
)
static

Definition at line 122 of file nat64_out2in.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat64_out2in_unk_proto_set_cb()

static int nat64_out2in_unk_proto_set_cb ( ip4_header_t ip4,
ip6_header_t ip6,
void *  arg 
)
static

Definition at line 374 of file nat64_out2in.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VLIB_NODE_FUNCTION_MULTIARCH() [1/3]

VLIB_NODE_FUNCTION_MULTIARCH ( nat64_out2in_node  ,
nat64_out2in_node_fn   
)
+ Here is the caller graph for this function:

◆ VLIB_NODE_FUNCTION_MULTIARCH() [2/3]

VLIB_NODE_FUNCTION_MULTIARCH ( nat64_out2in_reass_node  ,
nat64_out2in_reass_node_fn   
)

◆ VLIB_NODE_FUNCTION_MULTIARCH() [3/3]

VLIB_NODE_FUNCTION_MULTIARCH ( nat64_out2in_handoff_node  ,
nat64_out2in_handoff_node_fn   
)

Variable Documentation

◆ nat64_out2in_error_strings

char* nat64_out2in_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_nat64_out2in_error
Definition: nat64_out2in.c:74

Definition at line 99 of file nat64_out2in.c.

◆ nat64_out2in_handoff_error_strings

char* nat64_out2in_handoff_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_nat64_out2in_handoff_error
Definition: nat64_out2in.c:954

Definition at line 967 of file nat64_out2in.c.

◆ nat64_out2in_handoff_node

vlib_node_registration_t nat64_out2in_handoff_node
Initial value:
= {
.name = "nat64-out2in-handoff",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
static char * nat64_out2in_handoff_error_strings[]
Definition: nat64_out2in.c:967
static uword nat64_out2in_handoff_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: nat64_out2in.c:993
static u8 * format_nat64_out2in_handoff_trace(u8 *s, va_list *args)
Definition: nat64_out2in.c:979
#define ARRAY_LEN(x)
Definition: clib.h:62

(constructor) VLIB_REGISTER_NODE (nat64_out2in_handoff_node)

Definition at line 72 of file nat64_out2in.c.

◆ nat64_out2in_node

vlib_node_registration_t nat64_out2in_node
Initial value:
= {
.function = nat64_out2in_node_fn,
.name = "nat64-out2in",
.vector_size = sizeof (u32),
.format_trace = format_nat64_out2in_trace,
.error_strings = nat64_out2in_error_strings,
.n_next_nodes = NAT64_OUT2IN_N_NEXT,
.next_nodes = {
[NAT64_OUT2IN_NEXT_DROP] = "error-drop",
[NAT64_OUT2IN_NEXT_IP6_LOOKUP] = "ip6-lookup",
[NAT64_OUT2IN_NEXT_IP4_LOOKUP] = "ip4-lookup",
[NAT64_OUT2IN_NEXT_REASS] = "nat64-out2in-reass",
},
}
static char * nat64_out2in_error_strings[]
Definition: nat64_out2in.c:99
unsigned int u32
Definition: types.h:88
static u8 * format_nat64_out2in_trace(u8 *s, va_list *args)
Definition: nat64_out2in.c:34
#define ARRAY_LEN(x)
Definition: clib.h:62
static uword nat64_out2in_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: nat64_out2in.c:434

(constructor) VLIB_REGISTER_NODE (nat64_out2in_node)

Definition at line 70 of file nat64_out2in.c.

◆ nat64_out2in_reass_node

vlib_node_registration_t nat64_out2in_reass_node
Initial value:
= {
.name = "nat64-out2in-reass",
.vector_size = sizeof (u32),
.error_strings = nat64_out2in_error_strings,
.n_next_nodes = NAT64_OUT2IN_N_NEXT,
.next_nodes = {
[NAT64_OUT2IN_NEXT_DROP] = "error-drop",
[NAT64_OUT2IN_NEXT_IP6_LOOKUP] = "ip6-lookup",
[NAT64_OUT2IN_NEXT_IP4_LOOKUP] = "ip4-lookup",
[NAT64_OUT2IN_NEXT_REASS] = "nat64-out2in-reass",
},
}
static char * nat64_out2in_error_strings[]
Definition: nat64_out2in.c:99
static u8 * format_nat64_out2in_reass_trace(u8 *s, va_list *args)
Definition: nat64_out2in.c:55
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:62
static uword nat64_out2in_reass_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: nat64_out2in.c:696

(constructor) VLIB_REGISTER_NODE (nat64_out2in_reass_node)

Definition at line 71 of file nat64_out2in.c.