aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/vnet_all_api_h.h
blob: 06b76a5e926922f559386010d165046f90296f7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
 * ------------------------------------------------------------------
 * vl_memory_api_h.h - memory API headers, in a specific order.
 *
 * Copyright (c) 2009-2010 Cisco and/or its affiliates. Licensed under the
 * Apache License, Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of the
 * License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 * ------------------------------------------------------------------
 */

/*
 * Add to the bottom of the #include list, or elves will steal your keyboard
 * in the middle of the night!
 *
 * Include current layer (2) last, or an artistic disagreement about message
 * numbering will occur
 */

#ifndef included_from_layer_3
#include <vlibmemory/vl_memory_api_h.h>
#endif /* included_from_layer_3 */

#include <vnet/bonding/bond.api.h>
#include <vnet/devices/af_packet/af_packet.api.h>
#include <vnet/devices/netmap/netmap.api.h>
#include <vnet/devices/virtio/vhost_user.api.h>
#include <vnet/devices/tap/tapv2.api.h>
#include <vnet/gre/gre.api.h>
#include <vnet/ipip/ipip.api.h>
#include <vnet/interface.api.h>
#include <vnet/l2/l2.api.h>
#include <vnet/l2tp/l2tp.api.h>
#include <vnet/span/span.api.h>
#include <vnet/ip/ip.api.h>
#include <vnet/ip/rd_cp.api.h>
#include <vnet/unix/tap.api.h>
#include <vnet/vxlan/vxlan.api.h>
#include <vnet/geneve/geneve.api.h>
#include <vnet/lldp/lldp.api.h>
#include <vnet/vxlan-gpe/vxlan_gpe.api.h>
#include <vnet/bfd/bfd.api.h>
#include <vnet/ipsec/ipsec.api.h>
#include <vnet/ipsec-gre/ipsec_gre.api.h>
#include <vnet/lisp-cp/lisp.api.h>
#include <vnet/lisp-gpe/lisp_gpe.api.h>
#include <vnet/lisp-cp/one.api.h>
#include <vnet/session/session.api.h>
#include <vnet/mpls/mpls.api.h>
#include <vnet/srv6/sr.api.h>
#include <vnet/srmpls/sr_mpls.api.h>
#include <vnet/classify/classify.api.h>
#include <vnet/ipfix-export/ipfix_export.api.h>
#include <vnet/dhcp/dhcp.api.h>
#include <vnet/cop/cop.api.h>
#include <vnet/policer/policer.api.h>
#include <vnet/ethernet/p2p_ethernet.api.h>
#include <vnet/tcp/tcp.api.h>
#include <vnet/dns/dns.api.h>
#include <vnet/udp/udp.api.h>
#include <vnet/bier/bier.api.h>
#include <vnet/ip/punt.api.h>
#include <vnet/pg/pg.api.h>
#include <vnet/feature/feature.api.h>
#include <vnet/sctp/sctp.api.h>
#include <vnet/qos/qos.api.h>
#include <vnet/dhcp/dhcp6_pd_client_cp.api.h>
#include <vnet/dhcp/dhcp6_ia_na_client_cp.api.h>

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables: eval: (c-set-style "gnu") End:
 */
lass="o">*nat64_ses_frame; /** next record offset */ u32 nat44_session_next_record_offset; u32 addr_exhausted_next_record_offset; u32 max_entries_per_user_next_record_offset; u32 max_sessions_next_record_offset; u32 max_bibs_next_record_offset; u32 max_frags_ip4_next_record_offset; u32 max_frags_ip6_next_record_offset; u32 nat64_bib_next_record_offset; u32 nat64_ses_next_record_offset; } snat_ipfix_per_thread_data_t; typedef struct { /** NAT plugin IPFIX logging enabled */ u8 enabled; /** Time reference pair */ u64 milisecond_time_0; f64 vlib_time_0; /* Per thread data */ snat_ipfix_per_thread_data_t *per_thread_data; /** template IDs */ u16 nat44_session_template_id; u16 addr_exhausted_template_id; u16 max_entries_per_user_template_id; u16 max_sessions_template_id; u16 max_bibs_template_id; u16 max_frags_ip4_template_id; u16 max_frags_ip6_template_id; u16 nat64_bib_template_id; u16 nat64_ses_template_id; /** stream index */ u32 stream_index; /** vector of worker vlib mains */ vlib_main_t **worker_vms; /** nat data callbacks call counter */ u16 call_counter; } snat_ipfix_logging_main_t; extern snat_ipfix_logging_main_t snat_ipfix_logging_main; void snat_ipfix_logging_init (vlib_main_t * vm); int snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port); void snat_ipfix_logging_nat44_ses_create (u32 thread_index, u32 src_ip, u32 nat_src_ip, snat_protocol_t snat_proto, u16 src_port, u16 nat_src_port, u32 vrf_id); void snat_ipfix_logging_nat44_ses_delete (u32 thread_index, u32 src_ip, u32 nat_src_ip, snat_protocol_t snat_proto, u16 src_port, u16 nat_src_port, u32 vrf_id); void snat_ipfix_logging_addresses_exhausted(u32 thread_index, u32 pool_id); void snat_ipfix_logging_max_entries_per_user(u32 thread_index, u32 limit, u32 src_ip); void nat_ipfix_logging_max_sessions(u32 thread_index, u32 limit); void nat_ipfix_logging_max_bibs(u32 thread_index, u32 limit); void nat_ipfix_logging_max_fragments_ip4(u32 thread_index, u32 limit, ip4_address_t * src); void nat_ipfix_logging_max_fragments_ip6(u32 thread_index, u32 limit, ip6_address_t * src); 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); 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); #endif /* __included_nat_ipfix_logging_h__ */