FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
nat_ipfix_logging.h
Go to the documentation of this file.
1 /*
2  * nat_ipfix_logging.h - NAT Events IPFIX logging
3  *
4  * Copyright (c) 2016 Cisco and/or its affiliates.
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef __included_nat_ipfix_logging_h__
18 #define __included_nat_ipfix_logging_h__
19 
20 #include <nat/nat.h>
21 
22 typedef enum {
32 } nat_event_t;
33 
34 typedef enum {
41 
42 typedef struct {
43  /** NAT plugin IPFIX logging enabled */
45 
46  /** ipfix buffers under construction */
56 
57  /** frames containing ipfix buffers */
67 
68  /** next record offset */
78 
79  /** Time reference pair */
82 
83  /** template IDs */
93 
94  /** stream index */
97 
99 
101 int snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port);
102 void snat_ipfix_logging_nat44_ses_create (u32 src_ip, u32 nat_src_ip,
103  snat_protocol_t snat_proto,
104  u16 src_port, u16 nat_src_port,
105  u32 vrf_id);
106 void snat_ipfix_logging_nat44_ses_delete (u32 src_ip, u32 nat_src_ip,
107  snat_protocol_t snat_proto,
108  u16 src_port, u16 nat_src_port,
109  u32 vrf_id);
113 void nat_ipfix_logging_max_bibs(u32 limit);
117  ip4_address_t * nat_src_ip, u8 proto,
118  u16 src_port, u16 nat_src_port,
119  ip6_address_t * dst_ip,
120  ip4_address_t * nat_dst_ip,
121  u16 dst_port, u16 nat_dst_port,
122  u32 vrf_id, u8 is_create);
124  ip4_address_t * nat_src_ip, u8 proto,
125  u16 src_port, u16 nat_src_port,
126  u32 vrf_id, u8 is_create);
127 
128 #endif /* __included_nat_ipfix_logging_h__ */
vlib_frame_t * max_frags_ip4_frame
vlib_frame_t * max_entries_per_user_frame
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.
unsigned long u64
Definition: types.h:89
vlib_frame_t * addr_exhausted_frame
void snat_ipfix_logging_init(vlib_main_t *vm)
Initialize NAT plugin IPFIX logging.
u8 enabled
NAT plugin IPFIX logging enabled.
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.
unsigned char u8
Definition: types.h:56
double f64
Definition: types.h:142
void nat_ipfix_logging_max_fragments_ip6(u32 limit, ip6_address_t *src)
Generate maximum IPv6 fragments pending reassembly exceeded event.
void nat_ipfix_logging_max_bibs(u32 limit)
Generate maximum BIB entries exceeded event.
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.
unsigned int u32
Definition: types.h:88
snat_ipfix_logging_main_t snat_ipfix_logging_main
vlib_buffer_t * nat64_ses_buffer
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.
quota_exceed_event_t
vlib_frame_t * max_frags_ip6_frame
vlib_frame_t * nat44_session_frame
frames containing ipfix buffers
vlib_buffer_t * max_sessions_buffer
unsigned short u16
Definition: types.h:57
void snat_ipfix_logging_max_entries_per_user(u32 limit, u32 src_ip)
Generate maximum entries per user exceeded event.
u32 stream_index
stream index
u64 milisecond_time_0
Time reference pair.
vlib_main_t * vm
Definition: buffer.c:294
vlib_buffer_t * max_frags_ip6_buffer
vlib_buffer_t * nat44_session_buffer
ipfix buffers under construction
void snat_ipfix_logging_addresses_exhausted(u32 pool_id)
Generate NAT addresses exhausted event.
u16 nat44_session_template_id
template IDs
vlib_buffer_t * max_bibs_buffer
vlib_buffer_t * addr_exhausted_buffer
void nat_ipfix_logging_max_fragments_ip4(u32 limit, ip4_address_t *src)
Generate maximum IPv4 fragments pending reassembly exceeded event.
int snat_ipfix_logging_enable_disable(int enable, u32 domain_id, u16 src_port)
Enable/disable NAT plugin IPFIX logging.
vlib_frame_t * max_sessions_frame
vlib_buffer_t * nat64_bib_buffer
nat_event_t
vlib_buffer_t * max_frags_ip4_buffer
snat_protocol_t
Definition: nat.h:107
vlib_buffer_t * max_entries_per_user_buffer
void nat_ipfix_logging_max_sessions(u32 limit)
Generate maximum session entries exceeded event.
u32 nat44_session_next_record_offset
next record offset