FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
nat_ipfix_logging.c File Reference
+ Include dependency graph for nat_ipfix_logging.c:

Go to the source code of this file.

Data Structures

struct  snat_ipfix_logging_nat44_ses_args_t
 
struct  snat_ipfix_logging_addr_exhausted_args_t
 
struct  snat_ipfix_logging_max_entries_per_user_args_t
 
struct  nat_ipfix_logging_max_sessions_args_t
 
struct  nat_ipfix_logging_max_bibs_args_t
 
struct  nat_ipfix_logging_max_frags_ip4_args_t
 
struct  nat_ipfix_logging_max_frags_ip6_args_t
 
struct  nat_ipfix_logging_nat64_ses_args_t
 
struct  nat_ipfix_logging_nat64_bib_args_t
 

Macros

#define NAT44_SESSION_CREATE_LEN   26
 
#define NAT_ADDRESSES_EXHAUTED_LEN   13
 
#define MAX_ENTRIES_PER_USER_LEN   21
 
#define MAX_SESSIONS_LEN   17
 
#define MAX_BIBS_LEN   17
 
#define MAX_FRAGMENTS_IP4_LEN   21
 
#define MAX_FRAGMENTS_IP6_LEN   33
 
#define NAT64_BIB_LEN   38
 
#define NAT64_SES_LEN   62
 
#define NAT44_SESSION_CREATE_FIELD_COUNT   8
 
#define NAT_ADDRESSES_EXHAUTED_FIELD_COUNT   3
 
#define MAX_ENTRIES_PER_USER_FIELD_COUNT   5
 
#define MAX_SESSIONS_FIELD_COUNT   4
 
#define MAX_BIBS_FIELD_COUNT   4
 
#define MAX_FRAGMENTS_FIELD_COUNT   5
 
#define NAT64_BIB_FIELD_COUNT   8
 
#define NAT64_SES_FIELD_COUNT   12
 
#define skip_if_disabled()
 

Functions

static u8snat_template_rewrite (flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, nat_event_t event, quota_exceed_event_t quota_event)
 Create an IPFIX template packet rewrite string. More...
 
u8snat_template_rewrite_addr_exhausted (flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)
 
u8snat_template_rewrite_nat44_session (flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)
 
u8snat_template_rewrite_max_entries_per_usr (flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)
 
u8nat_template_rewrite_max_sessions (flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)
 
u8nat_template_rewrite_max_bibs (flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)
 
u8nat_template_rewrite_max_frags_ip4 (flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)
 
u8nat_template_rewrite_max_frags_ip6 (flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)
 
u8nat_template_rewrite_nat64_bib (flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)
 
u8nat_template_rewrite_nat64_session (flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)
 
static void snat_ipfix_header_create (flow_report_main_t *frm, vlib_buffer_t *b0, u32 *offset)
 
static void snat_ipfix_send (flow_report_main_t *frm, vlib_frame_t *f, vlib_buffer_t *b0, u16 template_id)
 
static void snat_ipfix_logging_nat44_ses (u8 nat_event, u32 src_ip, u32 nat_src_ip, snat_protocol_t snat_proto, u16 src_port, u16 nat_src_port, u32 vrf_id, int do_flush)
 
static void snat_ipfix_logging_addr_exhausted (u32 pool_id, int do_flush)
 
static void snat_ipfix_logging_max_entries_per_usr (u32 limit, u32 src_ip, int do_flush)
 
static void nat_ipfix_logging_max_ses (u32 limit, int do_flush)
 
static void nat_ipfix_logging_max_bib (u32 limit, int do_flush)
 
static void nat_ipfix_logging_max_frag_ip4 (u32 limit, u32 src, int do_flush)
 
static void nat_ipfix_logging_max_frag_ip6 (u32 limit, ip6_address_t *src, int do_flush)
 
static void nat_ipfix_logging_nat64_bibe (u8 nat_event, ip6_address_t *src_ip, u32 nat_src_ip, u8 proto, u16 src_port, u16 nat_src_port, u32 vrf_id, int do_flush)
 
static void nat_ipfix_logging_nat64_ses (u8 nat_event, ip6_address_t *src_ip, u32 nat_src_ip, u8 proto, u16 src_port, u16 nat_src_port, ip6_address_t *dst_ip, u32 nat_dst_ip, u16 dst_port, u16 nat_dst_port, u32 vrf_id, int do_flush)
 
static void snat_ipfix_logging_nat44_ses_rpc_cb (snat_ipfix_logging_nat44_ses_args_t *a)
 
void snat_ipfix_logging_nat44_ses_create (u32 src_ip, u32 nat_src_ip, snat_protocol_t snat_proto, u16 src_port, u16 nat_src_port, u32 vrf_id)
 Generate NAT44 session create event. More...
 
void snat_ipfix_logging_nat44_ses_delete (u32 src_ip, u32 nat_src_ip, snat_protocol_t snat_proto, u16 src_port, u16 nat_src_port, u32 vrf_id)
 Generate NAT44 session delete event. More...
 
vlib_frame_tsnat_data_callback_nat44_session (flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
 
static void snat_ipfix_logging_addr_exhausted_rpc_cb (snat_ipfix_logging_addr_exhausted_args_t *a)
 
void snat_ipfix_logging_addresses_exhausted (u32 pool_id)
 Generate NAT addresses exhausted event. More...
 
vlib_frame_tsnat_data_callback_addr_exhausted (flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
 
static void snat_ipfix_logging_max_entries_per_usr_rpc_cb (snat_ipfix_logging_max_entries_per_user_args_t *a)
 
void snat_ipfix_logging_max_entries_per_user (u32 limit, u32 src_ip)
 Generate maximum entries per user exceeded event. More...
 
vlib_frame_tsnat_data_callback_max_entries_per_usr (flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
 
static void nat_ipfix_logging_max_ses_rpc_cb (nat_ipfix_logging_max_sessions_args_t *a)
 
void nat_ipfix_logging_max_sessions (u32 limit)
 Generate maximum session entries exceeded event. More...
 
vlib_frame_tnat_data_callback_max_sessions (flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
 
static void nat_ipfix_logging_max_bib_rpc_cb (nat_ipfix_logging_max_bibs_args_t *a)
 
void nat_ipfix_logging_max_bibs (u32 limit)
 Generate maximum BIB entries exceeded event. More...
 
vlib_frame_tnat_data_callback_max_bibs (flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
 
static void nat_ipfix_logging_max_frag_ip4_rpc_cb (nat_ipfix_logging_max_frags_ip4_args_t *a)
 
void nat_ipfix_logging_max_fragments_ip4 (u32 limit, ip4_address_t *src)
 Generate maximum IPv4 fragments pending reassembly exceeded event. More...
 
vlib_frame_tnat_data_callback_max_frags_ip4 (flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
 
static void nat_ipfix_logging_max_frag_ip6_rpc_cb (nat_ipfix_logging_max_frags_ip6_args_t *a)
 
void nat_ipfix_logging_max_fragments_ip6 (u32 limit, ip6_address_t *src)
 Generate maximum IPv6 fragments pending reassembly exceeded event. More...
 
vlib_frame_tnat_data_callback_max_frags_ip6 (flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
 
static void nat_ipfix_logging_nat64_bib_rpc_cb (nat_ipfix_logging_nat64_bib_args_t *a)
 
void nat_ipfix_logging_nat64_bib (ip6_address_t *src_ip, ip4_address_t *nat_src_ip, u8 proto, u16 src_port, u16 nat_src_port, u32 vrf_id, u8 is_create)
 Generate NAT64 BIB create and delete events. More...
 
vlib_frame_tnat_data_callback_nat64_bib (flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
 
static void nat_ipfix_logging_nat64_ses_rpc_cb (nat_ipfix_logging_nat64_ses_args_t *a)
 
void nat_ipfix_logging_nat64_session (ip6_address_t *src_ip, ip4_address_t *nat_src_ip, u8 proto, u16 src_port, u16 nat_src_port, ip6_address_t *dst_ip, ip4_address_t *nat_dst_ip, u16 dst_port, u16 nat_dst_port, u32 vrf_id, u8 is_create)
 Generate NAT64 session create and delete events. More...
 
vlib_frame_tnat_data_callback_nat64_session (flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
 
int snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
 Enable/disable NAT plugin IPFIX logging. More...
 
void snat_ipfix_logging_init (vlib_main_t *vm)
 Initialize NAT plugin IPFIX logging. More...
 

Variables

snat_ipfix_logging_main_t snat_ipfix_logging_main
 

Macro Definition Documentation

#define MAX_BIBS_FIELD_COUNT   4

Definition at line 39 of file nat_ipfix_logging.c.

#define MAX_BIBS_LEN   17

Definition at line 29 of file nat_ipfix_logging.c.

#define MAX_ENTRIES_PER_USER_FIELD_COUNT   5

Definition at line 37 of file nat_ipfix_logging.c.

#define MAX_ENTRIES_PER_USER_LEN   21

Definition at line 27 of file nat_ipfix_logging.c.

#define MAX_FRAGMENTS_FIELD_COUNT   5

Definition at line 40 of file nat_ipfix_logging.c.

#define MAX_FRAGMENTS_IP4_LEN   21

Definition at line 30 of file nat_ipfix_logging.c.

#define MAX_FRAGMENTS_IP6_LEN   33

Definition at line 31 of file nat_ipfix_logging.c.

#define MAX_SESSIONS_FIELD_COUNT   4

Definition at line 38 of file nat_ipfix_logging.c.

#define MAX_SESSIONS_LEN   17

Definition at line 28 of file nat_ipfix_logging.c.

#define NAT44_SESSION_CREATE_FIELD_COUNT   8

Definition at line 35 of file nat_ipfix_logging.c.

#define NAT44_SESSION_CREATE_LEN   26

Definition at line 25 of file nat_ipfix_logging.c.

#define NAT64_BIB_FIELD_COUNT   8

Definition at line 41 of file nat_ipfix_logging.c.

#define NAT64_BIB_LEN   38

Definition at line 32 of file nat_ipfix_logging.c.

#define NAT64_SES_FIELD_COUNT   12

Definition at line 42 of file nat_ipfix_logging.c.

#define NAT64_SES_LEN   62

Definition at line 33 of file nat_ipfix_logging.c.

#define NAT_ADDRESSES_EXHAUTED_FIELD_COUNT   3

Definition at line 36 of file nat_ipfix_logging.c.

#define NAT_ADDRESSES_EXHAUTED_LEN   13

Definition at line 26 of file nat_ipfix_logging.c.

#define skip_if_disabled ( )
Value:
do { \
snat_ipfix_logging_main_t *silm = &snat_ipfix_logging_main; \
if (PREDICT_TRUE (!silm->enabled)) \
return; \
} while (0)
#define PREDICT_TRUE(x)
Definition: clib.h:106
snat_ipfix_logging_main_t snat_ipfix_logging_main

Definition at line 114 of file nat_ipfix_logging.c.

Function Documentation

vlib_frame_t* nat_data_callback_max_bibs ( flow_report_main_t frm,
flow_report_t fr,
vlib_frame_t f,
u32 to_next,
u32  node_index 
)

Definition at line 1697 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vlib_frame_t* nat_data_callback_max_frags_ip4 ( flow_report_main_t frm,
flow_report_t fr,
vlib_frame_t f,
u32 to_next,
u32  node_index 
)

Definition at line 1734 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vlib_frame_t* nat_data_callback_max_frags_ip6 ( flow_report_main_t frm,
flow_report_t fr,
vlib_frame_t f,
u32 to_next,
u32  node_index 
)

Definition at line 1775 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vlib_frame_t* nat_data_callback_max_sessions ( flow_report_main_t frm,
flow_report_t fr,
vlib_frame_t f,
u32 to_next,
u32  node_index 
)

Definition at line 1662 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vlib_frame_t* nat_data_callback_nat64_bib ( flow_report_main_t frm,
flow_report_t fr,
vlib_frame_t f,
u32 to_next,
u32  node_index 
)

Definition at line 1830 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vlib_frame_t* nat_data_callback_nat64_session ( flow_report_main_t frm,
flow_report_t fr,
vlib_frame_t f,
u32 to_next,
u32  node_index 
)

Definition at line 1899 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_max_bib ( u32  limit,
int  do_flush 
)
static

Definition at line 985 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_max_bib_rpc_cb ( nat_ipfix_logging_max_bibs_args_t a)
static

Definition at line 1672 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nat_ipfix_logging_max_bibs ( u32  limit)

Generate maximum BIB entries exceeded event.

Parameters
limitconfigured limit

Definition at line 1683 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_max_frag_ip4 ( u32  limit,
u32  src,
int  do_flush 
)
static

Definition at line 1075 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_max_frag_ip4_rpc_cb ( nat_ipfix_logging_max_frags_ip4_args_t a)
static

Definition at line 1707 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_max_frag_ip6 ( u32  limit,
ip6_address_t src,
int  do_flush 
)
static

Definition at line 1168 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_max_frag_ip6_rpc_cb ( nat_ipfix_logging_max_frags_ip6_args_t a)
static

Definition at line 1744 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nat_ipfix_logging_max_fragments_ip4 ( u32  limit,
ip4_address_t src 
)

Generate maximum IPv4 fragments pending reassembly exceeded event.

Parameters
limitconfigured limit
srcsource IPv4 address

Definition at line 1719 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nat_ipfix_logging_max_fragments_ip6 ( u32  limit,
ip6_address_t src 
)

Generate maximum IPv6 fragments pending reassembly exceeded event.

Parameters
limitconfigured limit
srcsource IPv6 address

Definition at line 1759 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_max_ses ( u32  limit,
int  do_flush 
)
static

Definition at line 895 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_max_ses_rpc_cb ( nat_ipfix_logging_max_sessions_args_t a)
static

Definition at line 1637 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nat_ipfix_logging_max_sessions ( u32  limit)

Generate maximum session entries exceeded event.

Parameters
limitconfigured limit

Definition at line 1648 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nat_ipfix_logging_nat64_bib ( ip6_address_t src_ip,
ip4_address_t nat_src_ip,
u8  proto,
u16  src_port,
u16  nat_src_port,
u32  vrf_id,
u8  is_create 
)

Generate NAT64 BIB create and delete events.

Parameters
src_ipsource IPv6 address
nat_src_iptransaltes source IPv4 address
protoL4 protocol
src_portsource port
nat_src_porttranslated source port
vrf_idVRF ID
is_createnon-zero value if create event otherwise delete event

Definition at line 1807 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_nat64_bib_rpc_cb ( nat_ipfix_logging_nat64_bib_args_t a)
static

Definition at line 1785 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_nat64_bibe ( u8  nat_event,
ip6_address_t src_ip,
u32  nat_src_ip,
u8  proto,
u16  src_port,
u16  nat_src_port,
u32  vrf_id,
int  do_flush 
)
static

Definition at line 1261 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_nat64_ses ( u8  nat_event,
ip6_address_t src_ip,
u32  nat_src_ip,
u8  proto,
u16  src_port,
u16  nat_src_port,
ip6_address_t dst_ip,
u32  nat_dst_ip,
u16  dst_port,
u16  nat_dst_port,
u32  vrf_id,
int  do_flush 
)
static

Definition at line 1363 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_ipfix_logging_nat64_ses_rpc_cb ( nat_ipfix_logging_nat64_ses_args_t a)
static

Definition at line 1840 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nat_ipfix_logging_nat64_session ( ip6_address_t src_ip,
ip4_address_t nat_src_ip,
u8  proto,
u16  src_port,
u16  nat_src_port,
ip6_address_t dst_ip,
ip4_address_t nat_dst_ip,
u16  dst_port,
u16  nat_dst_port,
u32  vrf_id,
u8  is_create 
)

Generate NAT64 session create and delete events.

Parameters
src_ipsource IPv6 address
nat_src_iptransaltes source IPv4 address
protoL4 protocol
src_portsource port
nat_src_porttranslated source port
dst_ipdestination IPv6 address
nat_dst_ipdestination IPv4 address
dst_portdestination port
nat_dst_porttranslated destination port
vrf_idVRF ID
is_createnon-zero value if create event otherwise delete event

Definition at line 1869 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* nat_template_rewrite_max_bibs ( flow_report_main_t frm,
flow_report_t fr,
ip4_address_t collector_address,
ip4_address_t src_address,
u16  collector_port,
ipfix_report_element_t elts,
u32  n_elts,
u32 stream_index 
)

Definition at line 457 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* nat_template_rewrite_max_frags_ip4 ( flow_report_main_t frm,
flow_report_t fr,
ip4_address_t collector_address,
ip4_address_t src_address,
u16  collector_port,
ipfix_report_element_t elts,
u32  n_elts,
u32 stream_index 
)

Definition at line 471 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* nat_template_rewrite_max_frags_ip6 ( flow_report_main_t frm,
flow_report_t fr,
ip4_address_t collector_address,
ip4_address_t src_address,
u16  collector_port,
ipfix_report_element_t elts,
u32  n_elts,
u32 stream_index 
)

Definition at line 485 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* nat_template_rewrite_max_sessions ( flow_report_main_t frm,
flow_report_t fr,
ip4_address_t collector_address,
ip4_address_t src_address,
u16  collector_port,
ipfix_report_element_t elts,
u32  n_elts,
u32 stream_index 
)

Definition at line 443 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* nat_template_rewrite_nat64_bib ( flow_report_main_t frm,
flow_report_t fr,
ip4_address_t collector_address,
ip4_address_t src_address,
u16  collector_port,
ipfix_report_element_t elts,
u32  n_elts,
u32 stream_index 
)

Definition at line 499 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* nat_template_rewrite_nat64_session ( flow_report_main_t frm,
flow_report_t fr,
ip4_address_t collector_address,
ip4_address_t src_address,
u16  collector_port,
ipfix_report_element_t elts,
u32  n_elts,
u32 stream_index 
)

Definition at line 512 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vlib_frame_t* snat_data_callback_addr_exhausted ( flow_report_main_t frm,
flow_report_t fr,
vlib_frame_t f,
u32 to_next,
u32  node_index 
)

Definition at line 1589 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vlib_frame_t* snat_data_callback_max_entries_per_usr ( flow_report_main_t frm,
flow_report_t fr,
vlib_frame_t f,
u32 to_next,
u32  node_index 
)

Definition at line 1627 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vlib_frame_t* snat_data_callback_nat44_session ( flow_report_main_t frm,
flow_report_t fr,
vlib_frame_t f,
u32 to_next,
u32  node_index 
)

Definition at line 1553 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void snat_ipfix_header_create ( flow_report_main_t frm,
vlib_buffer_t b0,
u32 offset 
)
inlinestatic

Definition at line 525 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void snat_ipfix_logging_addr_exhausted ( u32  pool_id,
int  do_flush 
)
static

Definition at line 716 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void snat_ipfix_logging_addr_exhausted_rpc_cb ( snat_ipfix_logging_addr_exhausted_args_t a)
static

Definition at line 1564 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void snat_ipfix_logging_addresses_exhausted ( u32  pool_id)

Generate NAT addresses exhausted event.

Parameters
pool_idNAT pool ID

Definition at line 1575 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int snat_ipfix_logging_enable_disable ( int  enable,
u32  domain_id,
u16  src_port 
)

Enable/disable NAT plugin IPFIX logging.

Parameters
enable1 if enable, 0 if disable
domain_idobservation domain ID
src_portsource port number
Returns
0 if success

Definition at line 1918 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void snat_ipfix_logging_init ( vlib_main_t vm)

Initialize NAT plugin IPFIX logging.

Parameters
vmvlib main

Definition at line 2041 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void snat_ipfix_logging_max_entries_per_user ( u32  limit,
u32  src_ip 
)

Generate maximum entries per user exceeded event.

Parameters
limitmaximum NAT entries that can be created per user
src_ipsource IPv4 address

Definition at line 1612 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void snat_ipfix_logging_max_entries_per_usr ( u32  limit,
u32  src_ip,
int  do_flush 
)
static

Definition at line 802 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void snat_ipfix_logging_max_entries_per_usr_rpc_cb ( snat_ipfix_logging_max_entries_per_user_args_t a)
static

Definition at line 1600 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void snat_ipfix_logging_nat44_ses ( u8  nat_event,
u32  src_ip,
u32  nat_src_ip,
snat_protocol_t  snat_proto,
u16  src_port,
u16  nat_src_port,
u32  vrf_id,
int  do_flush 
)
static

Definition at line 611 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void snat_ipfix_logging_nat44_ses_create ( u32  src_ip,
u32  nat_src_ip,
snat_protocol_t  snat_proto,
u16  src_port,
u16  nat_src_port,
u32  vrf_id 
)

Generate NAT44 session create event.

Parameters
src_ipsource IPv4 address
nat_src_iptransaltes source IPv4 address
snat_protoNAT transport protocol
src_portsource port
nat_src_porttranslated source port
vrf_idVRF ID

Definition at line 1497 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void snat_ipfix_logging_nat44_ses_delete ( u32  src_ip,
u32  nat_src_ip,
snat_protocol_t  snat_proto,
u16  src_port,
u16  nat_src_port,
u32  vrf_id 
)

Generate NAT44 session delete event.

Parameters
src_ipsource IPv4 address
nat_src_iptransaltes source IPv4 address
snat_protoNAT transport protocol
src_portsource port
nat_src_porttranslated source port
vrf_idVRF ID

Definition at line 1530 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void snat_ipfix_logging_nat44_ses_rpc_cb ( snat_ipfix_logging_nat44_ses_args_t a)
static

Definition at line 1479 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void snat_ipfix_send ( flow_report_main_t frm,
vlib_frame_t f,
vlib_buffer_t b0,
u16  template_id 
)
inlinestatic

Definition at line 571 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* snat_template_rewrite ( flow_report_main_t frm,
flow_report_t fr,
ip4_address_t collector_address,
ip4_address_t src_address,
u16  collector_port,
nat_event_t  event,
quota_exceed_event_t  quota_event 
)
inlinestatic

Create an IPFIX template packet rewrite string.

Parameters
frmflow report main
frflow report
collector_addresscollector address
src_addresssource address
collector_portcollector
eventNAT event ID
quota_eventNAT quota exceeded event ID
Returns
template packet

Definition at line 135 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* snat_template_rewrite_addr_exhausted ( flow_report_main_t frm,
flow_report_t fr,
ip4_address_t collector_address,
ip4_address_t src_address,
u16  collector_port,
ipfix_report_element_t elts,
u32  n_elts,
u32 stream_index 
)

Definition at line 403 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* snat_template_rewrite_max_entries_per_usr ( flow_report_main_t frm,
flow_report_t fr,
ip4_address_t collector_address,
ip4_address_t src_address,
u16  collector_port,
ipfix_report_element_t elts,
u32  n_elts,
u32 stream_index 
)

Definition at line 429 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* snat_template_rewrite_nat44_session ( flow_report_main_t frm,
flow_report_t fr,
ip4_address_t collector_address,
ip4_address_t src_address,
u16  collector_port,
ipfix_report_element_t elts,
u32  n_elts,
u32 stream_index 
)

Definition at line 416 of file nat_ipfix_logging.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

snat_ipfix_logging_main_t snat_ipfix_logging_main

Definition at line 23 of file nat_ipfix_logging.c.