From 2f2db1c2021c5aae564d2783a33366527afb5fce Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Tue, 18 Apr 2017 05:29:59 -0700 Subject: CGN: IPFIX logging maximum entries per user exceeded event Change-Id: Ie35d7f40f55001e2ef4a38f934f176594f25b189 Signed-off-by: Matus Fabian --- src/plugins/snat/snat_ipfix_logging.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/plugins/snat/snat_ipfix_logging.h') 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__ */ -- cgit 1.2.3-korg