FD.io VPP  v16.06
Vector Packet Processing
flow_report.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef __included_vnet_flow_report_h__
16 #define __included_vnet_flow_report_h__
17 
18 #include <vlib/vlib.h>
19 #include <vnet/vnet.h>
20 #include <vnet/pg/pg.h>
21 #include <vnet/ethernet/ethernet.h>
22 #include <vnet/ethernet/packet.h>
23 #include <vnet/ip/ip_packet.h>
24 #include <vnet/ip/ip4_packet.h>
25 #include <vnet/ip/ip6_packet.h>
26 #include <vnet/ip/udp.h>
27 #include <vlib/cli.h>
28 #include <vppinfra/error.h>
29 #include <vppinfra/hash.h>
30 #include <vppinfra/cache.h>
31 
32 #include <vnet/flow/ipfix_packet.h>
33 
34 /* Used to build the rewrite */
35 typedef struct {
40 
41 struct flow_report_main;
42 struct flow_report;
43 
45  struct flow_report *,
46  ip4_address_t *,
47  ip4_address_t *);
48 
50  struct flow_report *,
51  vlib_frame_t *, u32 *,
52  u32);
53 typedef struct flow_report {
54  /* ipfix rewrite, set by callback */
60 
61  /* Bitmap of fields to send */
63 
64  /* Opaque data */
65  void * opaque;
66 
67  /* build-the-rewrite callback */
69 
70  /* Send-flow-data callback */
73 
74 typedef struct flow_report_main {
76 
77  /* ipfix collector, our ip address */
80 
81  /* time scale transform. Joy. */
84 
85  /* convenience variables */
89 
91 
93 
94 int vnet_flow_report_enable_disable (u32 sw_if_index, u32 table_index,
95  int enable_disable);
96 typedef struct {
99  void * opaque;
100  int is_add;
103 
106 
107 #endif /* __included_vnet_flow_report_h__ */
flow_report_main_t flow_report_main
Definition: flow_report.h:90
a
Definition: bitmap.h:393
void * opaque
Definition: flow_report.h:65
struct _vlib_node_registration vlib_node_registration_t
ip4_address_t src_address
Definition: flow_report.h:79
uword * fields_to_send
Definition: flow_report.h:62
ip4_address_t ipfix_collector
Definition: flow_report.h:78
vnet_flow_rewrite_callback_t * rewrite_callback
Definition: flow_report.h:98
vlib_frame_t *( vnet_flow_data_callback_t)(struct flow_report_main *, struct flow_report *, vlib_frame_t *, u32 *, u32)
Definition: flow_report.h:49
int vnet_flow_report_enable_disable(u32 sw_if_index, u32 table_index, int enable_disable)
flow_report_t * reports
Definition: flow_report.h:75
u8 *( vnet_flow_rewrite_callback_t)(struct flow_report_main *, struct flow_report *, ip4_address_t *, ip4_address_t *)
Definition: flow_report.h:44
u8 * rewrite
Definition: flow_report.h:55
vnet_main_t * vnet_main
Definition: flow_report.h:87
u32 sequence_number
Definition: flow_report.h:56
int vnet_flow_report_add_del(flow_report_main_t *frm, vnet_flow_report_add_del_args_t *a)
Definition: flow_report.c:169
struct flow_report_main flow_report_main_t
unsigned int u32
Definition: types.h:88
vlib_main_t * vlib_main
Definition: flow_report.h:86
vnet_flow_data_callback_t * flow_data_callback
Definition: flow_report.h:71
struct flow_report flow_report_t
u64 uword
Definition: types.h:112
int update_rewrite
Definition: flow_report.h:59
double f64
Definition: types.h:140
unsigned char u8
Definition: types.h:56
f64 last_template_sent
Definition: flow_report.h:58
ipfix_template_packet_t ipfix
Definition: flow_report.h:38
vnet_flow_data_callback_t * flow_data_callback
Definition: flow_report.h:97
vnet_flow_rewrite_callback_t * rewrite_callback
Definition: flow_report.h:68
vlib_node_registration_t flow_report_process_node
(constructor) VLIB_REGISTER_NODE (flow_report_process_node)
Definition: flow_report.c:163