FD.io VPP  v16.06
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 typedef CLIB_PACKED(struct {
25  ip4_header_t ip4;
26  icmp46_header_t icmp;
27  u16 id;
28  u16 seq;
29  u8 data[8];
30 }) oam_template_t;
31 
32 typedef CLIB_PACKED(struct {
33  u64 v8[4];
34  u32 v4;
35 }) oam_template_copy_t;
36 
37 typedef enum {
41 } oam_state_t;
42 
43 typedef struct {
53  oam_template_t * template;
54 } oam_target_t;
55 
56 typedef struct {
57  /* OAM targets */
60 
61  /* Config parameters */
64 
65  /* random number seed */
68 
69  /* oam packet template */
71 
72  /* convenience */
75 } oam_main_t;
76 
77 int vpe_oam_add_del_target (ip4_address_t *src_address,
78  ip4_address_t *dst_address,
79  u32 fib_id, int is_add);
80 
81 #endif /* __included_oam_h__ */
u16 id
Definition: oam.h:51
f64 interval
Definition: oam.h:62
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:67
f64 last_heard_time
Definition: oam.h:48
u32 misses_allowed
Definition: oam.h:63
u16 last_heard_seq
Definition: oam.h:50
unsigned long u64
Definition: types.h:89
vlib_main_t * vlib_main
Definition: oam.h:73
uword * target_by_address_and_fib_id
Definition: oam.h:59
Definition: oam.h:56
oam_state_t
Definition: oam.h:37
vlib_packet_template_t packet_template
Definition: oam.h:70
u32 fib_id
Definition: oam.h:46
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:62
u64 uword
Definition: types.h:112
unsigned short u16
Definition: types.h:57
ip4_address_t src_address
Definition: oam.h:44
u32 fib_index
Definition: oam.h:47
double f64
Definition: types.h:140
unsigned char u8
Definition: types.h:56
u32 random_seed
Definition: oam.h:66
oam_target_t * targets
Definition: oam.h:58
u16 seq
Definition: oam.h:49
vnet_main_t * vnet_main
Definition: oam.h:74
u8 state
Definition: oam.h:52
ip4_address_t dst_address
Definition: oam.h:45