FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
ioam_summary_export.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 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_ip6_ioam_flow_report_h__
16 #define __included_ip6_ioam_flow_report_h__
17 
20 
21 #define foreach_ioam_ipfix_info_element \
22 _(ioamPacketSent, 5239, u32) \
23 _(ioamPacketCount, 5237, u32) \
24 _(ioamByteCount, 5238, u32) \
25 _(ioamPathMap, 5262, u32) \
26 _(ioamNumberOfPaths, 5264, u16) \
27 _(ioamSfcValidatedCount, 5278, u32) \
28 _(ioamSfcInValidatedCount, 5279, u32) \
29 _(ioamSeqnoRxCount, 5280, u32) \
30 _(ioamSeqnoLostCount, 5281, u32) \
31 _(ioamSeqnoReorderedCount, 5282, u32) \
32 _(ioamSeqnoDupCount, 5283, u32)
33 
34 
35 typedef enum
36 {
37 #define _(n,v,t) n = v,
39 #undef _
41 
42 #define foreach_ioam_ipfix_field \
43 _(pkt_sent, 0xffffffff, ioamPacketSent, 4) \
44 _(pkt_counter, 0xffffffff, ioamPacketCount, 4) \
45 _(bytes_counter, 0xffffffff, ioamByteCount, 4) \
46 _(pot_data.sfc_validated_count, 0xffffffff, ioamSfcValidatedCount, 4) \
47 _(pot_data.sfc_invalidated_count, 0xffffffff, ioamSfcInValidatedCount, 4) \
48 _(seqno_data.rx_packets, 0xffffffff, ioamSeqnoRxCount, 4) \
49 _(seqno_data.lost_packets, 0xffffffff, ioamSeqnoLostCount, 4) \
50 _(seqno_data.reordered_packets, 0xffffffff, ioamSeqnoReorderedCount, 4) \
51 _(seqno_data.dup_packets, 0xffffffff, ioamSeqnoDupCount, 4)
52 
54 
55 typedef struct
56 {
63  ioam_path_map_t path[0];
64 } ioam_path;
65 
67 
69  ip4_address_t * collector_address,
70  ip4_address_t * src_address, u16 collector_port,
72  u32 n_elts, u32 * stream_index);
73 
75  ioam_analyser_data_t * record,
76  vlib_buffer_t * b0, u16 offset,
77  ip6_address_t * src, ip6_address_t * dst,
78  u16 src_port, u16 dst_port);
79 
80 #endif /* __included_ip6_ioam_flow_report_h__ */
81 
82 /*
83  * fd.io coding-style-patch-verification: ON
84  *
85  * Local Variables:
86  * eval: (c-set-style "gnu")
87  * End:
88  */
u8 * ioam_template_rewrite(flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)
#define foreach_ioam_ipfix_info_element
unsigned char u8
Definition: types.h:56
clib_error_t * ioam_flow_report_init(vlib_main_t *vm)
unsigned int u32
Definition: types.h:88
unsigned short u16
Definition: types.h:57
u16 ioam_analyse_add_ipfix_record(flow_report_t *fr, ioam_analyser_data_t *record, vlib_buffer_t *b0, u16 offset, ip6_address_t *src, ip6_address_t *dst, u16 src_port, u16 dst_port)
vlib_main_t * vm
Definition: buffer.c:294
ioam_ipfix_info_element_id_t
template key/value backing page structure
Definition: bihash_doc.h:44
Analysed iOAM data.
Definition: ioam_analyse.h:97
clib_error_t * ioam_flow_create(u8 del)