FD.io VPP  v17.07-30-g839fa73
Vector Packet Processing
snat_ipfix_logging.h
Go to the documentation of this file.
1 /*
2  * snat_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_snat_ipfix_logging_h__
18 #define __included_snat_ipfix_logging_h__
19 
20 typedef enum {
26 } nat_event_t;
27 
28 typedef enum {
31 
32 typedef struct {
33  /** S-NAT IPFIX logging enabled */
35 
36  /** ipfix buffers under construction */
40 
41  /** frames containing ipfix buffers */
45 
46  /** next record offset */
50 
51  /** Time reference pair */
54 
55  /** template IDs */
59 
60  /** stream index */
63 
65 
67 int snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port);
68 void snat_ipfix_logging_nat44_ses_create (u32 src_ip, u32 nat_src_ip,
69  snat_protocol_t snat_proto,
70  u16 src_port, u16 nat_src_port,
71  u32 vrf_id);
72 void snat_ipfix_logging_nat44_ses_delete (u32 src_ip, u32 nat_src_ip,
73  snat_protocol_t snat_proto,
74  u16 src_port, u16 nat_src_port,
75  u32 vrf_id);
78 
79 #endif /* __included_snat_ipfix_logging_h__ */
vlib_frame_t * max_entries_per_user_frame
vlib_frame_t * addr_exhausted_frame
u8 enabled
S-NAT IPFIX logging enabled.
quota_exceed_event_t
unsigned long u64
Definition: types.h:89
void snat_ipfix_logging_addresses_exhausted(u32 pool_id)
Generate NAT addresses exhausted event.
vlib_frame_t * nat44_session_frame
frames containing ipfix buffers
u64 milisecond_time_0
Time reference pair.
vlib_buffer_t * nat44_session_buffer
ipfix buffers under construction
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.
int snat_ipfix_logging_enable_disable(int enable, u32 domain_id, u16 src_port)
Enable/disable SNAT IPFIX logging.
snat_ipfix_logging_main_t snat_ipfix_logging_main
u16 nat44_session_template_id
template IDs
void snat_ipfix_logging_max_entries_per_user(u32 src_ip)
Generate maximum entries per user exceeded event.
snat_protocol_t
Definition: snat.h:98
unsigned int u32
Definition: types.h:88
vlib_buffer_t * addr_exhausted_buffer
unsigned short u16
Definition: types.h:57
double f64
Definition: types.h:142
unsigned char u8
Definition: types.h:56
vlib_buffer_t * max_entries_per_user_buffer
nat_event_t
void snat_ipfix_logging_init(vlib_main_t *vm)
Initialize SNAT IPFIX logging.
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.
u32 nat44_session_next_record_offset
next record offset