FD.io VPP  v19.01.2-3-gf61a1a8
Vector Packet Processing
nsh_md2_ioam.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_nsh_md2_ioam_h__
16 #define __included_nsh_md2_ioam_h__
17 
18 #include <nsh/nsh.h>
19 #include <nsh/nsh_packet.h>
20 #include <vnet/ip/ip.h>
21 #include <vnet/ip/ip4_packet.h>
22 #include <vnet/ip/ip6_packet.h>
23 
24 
26 {
29 
31 {
32  ip46_address_t dst_addr;
38 
39 typedef struct nsh_md2_ioam_main_
40 {
41  /**
42  * Linkage into the FIB object graph
43  */
45 
46  /* time scale transform. Joy. */
49 
50 
51  /* Trace option */
53 
54  /* Pot option */
56 
57 #define PPC_NONE 0
58 #define PPC_ENCAP 1
59 #define PPC_DECAP 2
61 
62 #define TSP_SECONDS 0
63 #define TSP_MILLISECONDS 1
64 #define TSP_MICROSECONDS 2
65 #define TSP_NANOSECONDS 3
66 
67 
68  /* API message ID base */
70 
71  /* Override to export for iOAM */
74 
75  /* sequence of node graph for encap */
78 
79  /* Software interfaces. */
81 
82  /* hash ip4/ip6 -> list of destinations for doing transit iOAM operation */
86 
87  /** per sw_if_index, to maintain bitmap */
90 
91 
94 
95 /*
96  * Primary h-b-h handler trace support
97  */
98 typedef struct
99 {
100  u32 next_index;
101  u32 trace_len;
102  u8 option_data[256];
103 } ioam_trace_t;
104 
105 
106 clib_error_t *nsh_md2_ioam_enable_disable (int has_trace_option,
107  int has_pot_option,
108  int has_ppc_option);
109 
110 
111 
113 
115 extern void nsh_md2_ioam_interface_init (void);
116 
117 
118 
119 #endif
u8 * bool_ref_by_sw_if_index
per sw_if_index, to maintain bitmap
Definition: nsh_md2_ioam.h:88
void nsh_md2_ioam_interface_init(void)
Definition: nsh_md2_ioam.c:502
fib_node_t node
Linkage into the FIB object graph.
Definition: nsh_md2_ioam.h:44
int nsh_md2_ioam_trace_profile_cleanup(void)
unsigned char u8
Definition: types.h:56
fib_node_type_t fib_entry_type
Definition: nsh_md2_ioam.h:89
double f64
Definition: types.h:142
fib_node_index_t fib_entry_index
Definition: nsh_md2_ioam.h:35
unsigned int u32
Definition: types.h:88
unsigned short u16
Definition: types.h:57
struct nsh_md2_ioam_sw_interface_ nsh_md2_ioam_sw_interface_t
An node in the FIB graph.
Definition: fib_node.h:291
nsh_md2_ioam_sw_interface_t * sw_interfaces
Definition: nsh_md2_ioam.h:80
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:30
clib_error_t * nsh_md2_ioam_enable_disable(int has_trace_option, int has_pot_option, int has_ppc_option)
Definition: nsh_md2_ioam.c:346
uword decap_v4_next_override
Definition: nsh_md2_ioam.h:72
struct nsh_md2_ioam_main_ nsh_md2_ioam_main_t
u64 uword
Definition: types.h:112
uword decap_v6_next_override
Definition: nsh_md2_ioam.h:73
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
int nsh_md2_ioam_trace_profile_setup(void)
struct nsh_md2_ioam_dest_tunnels_ nsh_md2_ioam_dest_tunnels_t
nsh_md2_ioam_dest_tunnels_t * dst_tunnels
Definition: nsh_md2_ioam.h:83
nsh_md2_ioam_main_t nsh_md2_ioam_main
Definition: nsh_md2_ioam.c:42