FD.io VPP  v21.01.1
Vector Packet Processing
ipfix_logging.h File Reference
+ Include dependency graph for ipfix_logging.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  nat_ipfix_per_thread_data_t
 
struct  nat_ipfix_logging_main_t
 

Enumerations

enum  nat_event_t {
  NAT_ADDRESSES_EXHAUTED = 3, NAT44_SESSION_CREATE = 4, NAT44_SESSION_DELETE = 5, NAT64_SESSION_CREATE = 6,
  NAT64_SESSION_DELETE = 7, NAT64_BIB_CREATE = 10, NAT64_BIB_DELETE = 11, NAT_PORTS_EXHAUSTED = 12,
  QUOTA_EXCEEDED = 13
}
 
enum  quota_exceed_event_t { MAX_SESSION_ENTRIES = 1, MAX_BIB_ENTRIES = 2, MAX_ENTRIES_PER_USER = 3 }
 

Functions

int nat_ipfix_logging_enabled ()
 
void nat_ipfix_logging_init (vlib_main_t *vm)
 Initialize NAT plugin IPFIX logging. More...
 
int nat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
 Enable/disable NAT plugin IPFIX logging. More...
 
void nat_ipfix_logging_nat44_ses_create (u32 thread_index, u32 src_ip, u32 nat_src_ip, nat_protocol_t nat_proto, u16 src_port, u16 nat_src_port, u32 fib_index)
 Generate NAT44 session create event. More...
 
void nat_ipfix_logging_nat44_ses_delete (u32 thread_index, u32 src_ip, u32 nat_src_ip, nat_protocol_t nat_proto, u16 src_port, u16 nat_src_port, u32 fib_index)
 Generate NAT44 session delete event. More...
 
void nat_ipfix_logging_addresses_exhausted (u32 thread_index, u32 pool_id)
 Generate NAT addresses exhausted event. More...
 
void nat_ipfix_logging_max_entries_per_user (u32 thread_index, u32 limit, u32 src_ip)
 Generate maximum entries per user exceeded event. More...
 
void nat_ipfix_logging_max_sessions (u32 thread_index, u32 limit)
 Generate maximum session entries exceeded event. More...
 
void nat_ipfix_logging_max_bibs (u32 thread_index, u32 limit)
 Generate maximum BIB entries exceeded event. More...
 
void nat_ipfix_logging_nat64_session (u32 thread_index, 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...
 
void nat_ipfix_logging_nat64_bib (u32 thread_index, 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...
 

Variables

nat_ipfix_logging_main_t nat_ipfix_logging_main
 

Enumeration Type Documentation

◆ nat_event_t

Enumerator
NAT_ADDRESSES_EXHAUTED 
NAT44_SESSION_CREATE 
NAT44_SESSION_DELETE 
NAT64_SESSION_CREATE 
NAT64_SESSION_DELETE 
NAT64_BIB_CREATE 
NAT64_BIB_DELETE 
NAT_PORTS_EXHAUSTED 
QUOTA_EXCEEDED 

Definition at line 25 of file ipfix_logging.h.

◆ quota_exceed_event_t

Enumerator
MAX_SESSION_ENTRIES 
MAX_BIB_ENTRIES 
MAX_ENTRIES_PER_USER 

Definition at line 37 of file ipfix_logging.h.

Function Documentation

◆ nat_ipfix_logging_addresses_exhausted()

void nat_ipfix_logging_addresses_exhausted ( u32  thread_index,
u32  pool_id 
)

Generate NAT addresses exhausted event.

Parameters
thread_indexthread index
pool_idNAT pool ID

Definition at line 1371 of file ipfix_logging.c.

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

◆ nat_ipfix_logging_enable_disable()

int nat_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 1528 of file ipfix_logging.c.

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

◆ nat_ipfix_logging_enabled()

int nat_ipfix_logging_enabled ( )

Definition at line 1273 of file ipfix_logging.c.

+ Here is the caller graph for this function:

◆ nat_ipfix_logging_init()

void nat_ipfix_logging_init ( vlib_main_t vm)

Initialize NAT plugin IPFIX logging.

Parameters
vmvlib main

Definition at line 1613 of file ipfix_logging.c.

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

◆ nat_ipfix_logging_max_bibs()

void nat_ipfix_logging_max_bibs ( u32  thread_index,
u32  limit 
)

Generate maximum BIB entries exceeded event.

Parameters
thread_indexthread index
limitconfigured limit

Definition at line 1429 of file ipfix_logging.c.

+ Here is the call graph for this function:

◆ nat_ipfix_logging_max_entries_per_user()

void nat_ipfix_logging_max_entries_per_user ( u32  thread_index,
u32  limit,
u32  src_ip 
)

Generate maximum entries per user exceeded event.

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

Definition at line 1387 of file ipfix_logging.c.

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

◆ nat_ipfix_logging_max_sessions()

void nat_ipfix_logging_max_sessions ( u32  thread_index,
u32  limit 
)

Generate maximum session entries exceeded event.

Parameters
thread_indexthread index
limitconfigured limit

Definition at line 1414 of file ipfix_logging.c.

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

◆ nat_ipfix_logging_nat44_ses_create()

void nat_ipfix_logging_nat44_ses_create ( u32  thread_index,
u32  src_ip,
u32  nat_src_ip,
nat_protocol_t  nat_proto,
u16  src_port,
u16  nat_src_port,
u32  fib_index 
)

Generate NAT44 session create event.

Parameters
thread_indexthread index
src_ipsource IPv4 address
nat_src_iptransaltes source IPv4 address
nat_protoNAT transport protocol
src_portsource port
nat_src_porttranslated source port
vrf_idVRF ID

Definition at line 1324 of file ipfix_logging.c.

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

◆ nat_ipfix_logging_nat44_ses_delete()

void nat_ipfix_logging_nat44_ses_delete ( u32  thread_index,
u32  src_ip,
u32  nat_src_ip,
nat_protocol_t  nat_proto,
u16  src_port,
u16  nat_src_port,
u32  fib_index 
)

Generate NAT44 session delete event.

Parameters
thread_indexthread index
src_ipsource IPv4 address
nat_src_iptransaltes source IPv4 address
nat_protoNAT transport protocol
src_portsource port
nat_src_porttranslated source port
vrf_idVRF ID

Definition at line 1350 of file ipfix_logging.c.

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

◆ nat_ipfix_logging_nat64_bib()

void nat_ipfix_logging_nat64_bib ( u32  thread_index,
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
thread_indexthread index
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 1450 of file ipfix_logging.c.

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

◆ nat_ipfix_logging_nat64_session()

void nat_ipfix_logging_nat64_session ( u32  thread_index,
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
thread_indexthread index
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 1483 of file ipfix_logging.c.

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

Variable Documentation

◆ nat_ipfix_logging_main

nat_ipfix_logging_main_t nat_ipfix_logging_main

Definition at line 28 of file ipfix_logging.c.