FD.io VPP  v17.01.1-3-gc6833f8
Vector Packet Processing
ip6_ioam_seqno.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 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 
16 #ifndef __included_ip6_ioam_seqno_h__
17 #define __included_ip6_ioam_seqno_h__
18 
19 #include <vnet/ip/ip6_packet.h>
20 #include <vnet/ip/ip6_hop_by_hop.h>
21 
22 #define SEQ_CHECK_VALUE 0x80000000 /* for seq number wraparound detection */
23 
24 #define SEQNO_WINDOW_SIZE 2048
25 #define SEQNO_WINDOW_ARRAY_SIZE 64
26 
27 typedef struct seqno_bitmap_ {
33  u64 array[SEQNO_WINDOW_ARRAY_SIZE]; /* Will be alloc to array_size */
34 } seqno_bitmap;
35 
36 typedef struct seqno_rx_info_ {
43 
44 /* This structure is 64-byte aligned */
45 typedef struct ioam_seqno_data_ {
46  union {
47  u32 seq_num; /* Useful only for encap node */
49  };
51 
52 typedef struct ioam_seqno_data_main_t_ {
55 
57 
60 
61 int
64 
65 void ioam_analyze_seqno(seqno_rx_info *ppc_rx, u64 seqno);
66 
67 u8 *
68 show_ioam_seqno_cmd_fn(u8 *s, ioam_seqno_data *seqno_data, u8 enc);
69 
70 #endif
int ioam_seqno_decap_handler(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt)
void ioam_analyze_seqno(seqno_rx_info *ppc_rx, u64 seqno)
struct ioam_seqno_data_ ioam_seqno_data
seqno_rx_info seqno_rx
unsigned long u64
Definition: types.h:89
ioam_seqno_data * seqno_data
#define SEQNO_WINDOW_ARRAY_SIZE
int ioam_seqno_encap_handler(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt)
unsigned int u32
Definition: types.h:88
struct seqno_rx_info_ seqno_rx_info
unsigned char u8
Definition: types.h:56
u8 * show_ioam_seqno_cmd_fn(u8 *s, ioam_seqno_data *seqno_data, u8 enc)
struct ioam_seqno_data_main_t_ ioam_seqno_data_main_t
struct seqno_bitmap_ seqno_bitmap
void ioam_seqno_init_bitmap(ioam_seqno_data *data)
seqno_bitmap bitmap
u64 array[SEQNO_WINDOW_ARRAY_SIZE]