FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
oam.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_oam_h__
16 #define __included_oam_h__
17 
18 #include <vlib/vlib.h>
19 #include <vnet/vnet.h>
20 #include <vnet/ip/ip.h>
21 #include <vnet/interface.h>
22 
23 /* 36 octets, make a note of it... */
24 /* *INDENT-OFF* */
25 typedef CLIB_PACKED (struct {
26  ip4_header_t ip4;
27  icmp46_header_t icmp;
28  u16 id;
29  u16 seq;
30  u8 data[8];
31 }) oam_template_t;
32 /* *INDENT-ON* */
33 
34 /* *INDENT-OFF* */
35 typedef CLIB_PACKED (struct {
36  u64 v8[4];
37  u32 v4;
38 }) oam_template_copy_t;
39 /* *INDENT-ON* */
40 
41 typedef enum
42 {
46 } oam_state_t;
47 
48 typedef struct
49 {
59  oam_template_t *template;
60 } oam_target_t;
61 
62 typedef struct
63 {
64  /* OAM targets */
67 
68  /* Config parameters */
71 
72  /* random number seed */
75 
76  /* oam packet template */
78 
79  /* convenience */
82 } oam_main_t;
83 
84 int vpe_oam_add_del_target (ip4_address_t * src_address,
85  ip4_address_t * dst_address,
86  u32 fib_id, int is_add);
87 
88 #endif /* __included_oam_h__ */
89 
90 /*
91  * fd.io coding-style-patch-verification: ON
92  *
93  * Local Variables:
94  * eval: (c-set-style "gnu")
95  * End:
96  */
u16 id
Definition: oam.h:57
f64 interval
Definition: oam.h:69
u8 v8
Definition: ikev2.h:27
typedef CLIB_PACKED(struct{ip4_header_t ip4;icmp46_header_t icmp;u16 id;u16 seq;u8 data[8];}) oam_template_t
u16 icmp_id
Definition: oam.h:74
f64 last_heard_time
Definition: oam.h:54
u32 misses_allowed
Definition: oam.h:70
u16 last_heard_seq
Definition: oam.h:56
unsigned long u64
Definition: types.h:89
vlib_main_t * vlib_main
Definition: oam.h:80
uword * target_by_address_and_fib_id
Definition: oam.h:66
Definition: oam.h:62
oam_state_t
Definition: oam.h:41
vlib_packet_template_t packet_template
Definition: oam.h:77
u32 fib_id
Definition: oam.h:52
unsigned int u32
Definition: types.h:88
int vpe_oam_add_del_target(ip4_address_t *src_address, ip4_address_t *dst_address, u32 fib_id, int is_add)
Definition: oam.c:60
u64 uword
Definition: types.h:112
unsigned short u16
Definition: types.h:57
ip4_address_t src_address
Definition: oam.h:50
u32 fib_index
Definition: oam.h:53
double f64
Definition: types.h:142
unsigned char u8
Definition: types.h:56
u32 random_seed
Definition: oam.h:73
oam_target_t * targets
Definition: oam.h:65
u16 seq
Definition: oam.h:55
vnet_main_t * vnet_main
Definition: oam.h:81
u8 state
Definition: oam.h:58
ip4_address_t dst_address
Definition: oam.h:51