X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fsnat%2Fsnat_ipfix_logging.h;h=45c1a7bf8e1731646c5cf1e4e5973b07caee4c87;hb=2f2db1c2021c5aae564d2783a33366527afb5fce;hp=b968ee21e9ca99e8e96f3c1ce049b8de9c3000e0;hpb=5fec1e8b2282f4d3d1d02556020254a84c3b6e3d;p=vpp.git diff --git a/src/plugins/snat/snat_ipfix_logging.h b/src/plugins/snat/snat_ipfix_logging.h index b968ee21e9c..45c1a7bf8e1 100644 --- a/src/plugins/snat/snat_ipfix_logging.h +++ b/src/plugins/snat/snat_ipfix_logging.h @@ -22,8 +22,13 @@ typedef enum { NAT44_SESSION_CREATE = 4, NAT44_SESSION_DELETE = 5, NAT_PORTS_EXHAUSTED = 12, + QUOTA_EXCEEDED = 13, } nat_event_t; +typedef enum { + MAX_ENTRIES_PER_USER = 3, +} quota_exceed_event_t; + typedef struct { /** S-NAT IPFIX logging enabled */ u8 enabled; @@ -31,14 +36,17 @@ typedef struct { /** ipfix buffers under construction */ vlib_buffer_t *nat44_session_buffer; vlib_buffer_t *addr_exhausted_buffer; + vlib_buffer_t *max_entries_per_user_buffer; /** frames containing ipfix buffers */ vlib_frame_t *nat44_session_frame; vlib_frame_t *addr_exhausted_frame; + vlib_frame_t *max_entries_per_user_frame; /** next record offset */ u32 nat44_session_next_record_offset; u32 addr_exhausted_next_record_offset; + u32 max_entries_per_user_next_record_offset; /** Time reference pair */ u64 milisecond_time_0; @@ -47,6 +55,7 @@ typedef struct { /** template IDs */ u16 nat44_session_template_id; u16 addr_exhausted_template_id; + u16 max_entries_per_user_template_id; /** stream index */ u32 stream_index; @@ -65,4 +74,6 @@ void snat_ipfix_logging_nat44_ses_delete (u32 src_ip, u32 nat_src_ip, u16 src_port, u16 nat_src_port, u32 vrf_id); void snat_ipfix_logging_addresses_exhausted(u32 pool_id); +void snat_ipfix_logging_max_entries_per_user(u32 src_ip); + #endif /* __included_snat_ipfix_logging_h__ */