FD.io VPP
v16.06
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
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
{
38
OAM_STATE_UNKNOWN
= 0,
39
OAM_STATE_ALIVE
,
40
OAM_STATE_DEAD
,
41
}
oam_state_t
;
42
43
typedef
struct
{
44
ip4_address_t
src_address
;
45
ip4_address_t
dst_address
;
46
u32
fib_id
;
47
u32
fib_index
;
48
f64
last_heard_time
;
49
u16
seq
;
50
u16
last_heard_seq
;
51
u16
id
;
52
u8
state
;
53
oam_template_t *
template
;
54
}
oam_target_t
;
55
56
typedef
struct
{
57
/* OAM targets */
58
oam_target_t
*
targets
;
59
uword
*
target_by_address_and_fib_id
;
60
61
/* Config parameters */
62
f64
interval
;
63
u32
misses_allowed
;
64
65
/* random number seed */
66
u32
random_seed
;
67
u16
icmp_id
;
68
69
/* oam packet template */
70
vlib_packet_template_t
packet_template
;
71
72
/* convenience */
73
vlib_main_t
*
vlib_main
;
74
vnet_main_t
*
vnet_main
;
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__ */
OAM_STATE_DEAD
Definition:
oam.h:40
oam_target_t
Definition:
oam.h:43
oam_target_t::id
u16 id
Definition:
oam.h:51
oam_main_t::interval
f64 interval
Definition:
oam.h:62
v8
u8 v8
Definition:
ikev2.h:27
CLIB_PACKED
typedef CLIB_PACKED(struct{ip4_header_t ip4;icmp46_header_t icmp;u16 id;u16 seq;u8 data[8];}) oam_template_t
oam_main_t::icmp_id
u16 icmp_id
Definition:
oam.h:67
oam_target_t::last_heard_time
f64 last_heard_time
Definition:
oam.h:48
ip.h
OAM_STATE_ALIVE
Definition:
oam.h:39
oam_main_t::misses_allowed
u32 misses_allowed
Definition:
oam.h:63
oam_target_t::last_heard_seq
u16 last_heard_seq
Definition:
oam.h:50
vlib_packet_template_t
Definition:
buffer_funcs.h:518
u64
unsigned long u64
Definition:
types.h:89
oam_main_t::vlib_main
vlib_main_t * vlib_main
Definition:
oam.h:73
oam_main_t::target_by_address_and_fib_id
uword * target_by_address_and_fib_id
Definition:
oam.h:59
ip4_address_t
Definition:
ip4_packet.h:49
oam_main_t
Definition:
oam.h:56
interface.h
OAM_STATE_UNKNOWN
Definition:
oam.h:38
oam_state_t
oam_state_t
Definition:
oam.h:37
vnet.h
oam_main_t::packet_template
vlib_packet_template_t packet_template
Definition:
oam.h:70
oam_target_t::fib_id
u32 fib_id
Definition:
oam.h:46
vlib.h
vnet_main_t
Definition:
vnet.h:58
u32
unsigned int u32
Definition:
types.h:88
vpe_oam_add_del_target
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
uword
u64 uword
Definition:
types.h:112
u16
unsigned short u16
Definition:
types.h:57
oam_target_t::src_address
ip4_address_t src_address
Definition:
oam.h:44
oam_target_t::fib_index
u32 fib_index
Definition:
oam.h:47
f64
double f64
Definition:
types.h:140
u8
unsigned char u8
Definition:
types.h:56
vlib_main_t
Definition:
main.h:59
oam_main_t::random_seed
u32 random_seed
Definition:
oam.h:66
oam_main_t::targets
oam_target_t * targets
Definition:
oam.h:58
oam_target_t::seq
u16 seq
Definition:
oam.h:49
oam_main_t::vnet_main
vnet_main_t * vnet_main
Definition:
oam.h:74
oam_target_t::state
u8 state
Definition:
oam.h:52
ip4_header_t
Definition:
ip4_packet.h:104
oam_target_t::dst_address
ip4_address_t dst_address
Definition:
oam.h:45
vpp
oam
oam.h
Generated on Thu Sep 1 2016 09:11:54 for FD.io VPP by
1.8.11