FD.io VPP
v16.09
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
ip6_hop_by_hop_packet.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_ip6_hop_by_hop_packet_h__
16
#define __included_ip6_hop_by_hop_packet_h__
17
18
typedef
struct
{
19
/* Protocol for next header */
20
u8
protocol
;
21
/*
22
* Length of hop_by_hop header in 8 octet units,
23
* not including the first 8 octets
24
*/
25
u8
length
;
26
}
ip6_hop_by_hop_header_t
;
27
28
typedef
struct
{
29
/* Option Type */
30
#define HBH_OPTION_TYPE_SKIP_UNKNOWN (0x00)
31
#define HBH_OPTION_TYPE_DISCARD_UNKNOWN (0x40)
32
#define HBH_OPTION_TYPE_DISCARD_UNKNOWN_ICMP (0x80)
33
#define HBH_OPTION_TYPE_DISCARD_UNKNOWN_ICMP_NOT_MCAST (0xc0)
34
#define HBH_OPTION_TYPE_HIGH_ORDER_BITS (0xc0)
35
#define HBH_OPTION_TYPE_DATA_CHANGE_ENROUTE (1<<5)
36
u8
type
;
37
/* Length in octets of the option data field */
38
u8
length
;
39
}
ip6_hop_by_hop_option_t
;
40
41
/* $$$$ IANA banana constants */
42
#define HBH_OPTION_TYPE_IOAM_TRACE_DATA_LIST 59
/* Third highest bit set (change en-route) */
43
#define HBH_OPTION_TYPE_IOAM_PROOF_OF_TRANSIT 60
/* Third highest bit set (change en-route) */
44
#define HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE 29
45
46
/*
47
typedef struct {
48
u32 ttl_node_id;
49
u16 ingress_if;
50
u16 egress_if;
51
u32 timestamp;
52
u32 app_data;
53
} ioam_trace_data_list_element_t;
54
*/
55
56
#define BIT_TTL_NODEID (1<<0)
57
#define BIT_ING_INTERFACE (1<<1)
58
#define BIT_EGR_INTERFACE (1<<2)
59
#define BIT_TIMESTAMP (1<<3)
60
#define BIT_APPDATA (1<<4)
61
#define TRACE_TYPE_MASK 0x1F
/* Mask of all above bits */
62
63
/*
64
0x00011111 iOAM-trace-type is 0x00011111 then the format of node
65
data is:
66
67
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
68
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
69
| Hop_Lim | node_id |
70
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
71
| ingress_if_id | egress_if_id |
72
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
73
+ timestamp +
74
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
75
| app_data |
76
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
77
78
*/
79
#define TRACE_TYPE_IF_TS_APP 0x1f
80
typedef
struct
{
81
u32
ttl_node_id
;
82
u16
ingress_if
;
83
u16
egress_if
;
84
u32
timestamp
;
85
u32
app_data
;
86
}
ioam_trace_if_ts_app_t
;
87
88
/*
89
0x00000111 iOAM-trace-type is 0x00000111 then the format is:
90
91
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
92
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
93
| Hop_Lim | node_id |
94
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
95
| ingress_if_id | egress_if_id |
96
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
97
98
*/
99
100
#define TRACE_TYPE_IF 0x03
101
typedef
struct
{
102
u32
ttl_node_id
;
103
u16
ingress_if
;
104
u16
egress_if
;
105
}
ioam_trace_if_t
;
106
107
/*
108
0x00001001 iOAM-trace-type is 0x00001001 then the format is:
109
110
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
111
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
112
| Hop_Lim | node_id |
113
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
114
+ timestamp +
115
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
116
117
*/
118
119
#define TRACE_TYPE_TS 0x09
120
typedef
struct
{
121
u32
ttl_node_id
;
122
u32
timestamp
;
123
}
ioam_trace_ts_t
;
124
125
/*
126
0x00010001 iOAM-trace-type is 0x00010001 then the format is:
127
128
129
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
130
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
131
| Hop_Lim | node_id |
132
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
133
| app_data |
134
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
135
136
*/
137
138
139
#define TRACE_TYPE_APP 0x11
140
typedef
struct
{
141
u32
ttl_node_id
;
142
u32
app_data
;
143
}
ioam_trace_app_t
;
144
145
/*
146
147
0x00011001 iOAM-trace-type is 0x00011001 then the format is:
148
149
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
150
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
151
| Hop_Lim | node_id |
152
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
153
+ timestamp +
154
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
155
| app_data |
156
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
157
*/
158
159
#define TRACE_TYPE_TS_APP 0x19
160
typedef
struct
{
161
u32
ttl_node_id
;
162
u32
timestamp
;
163
u32
app_data
;
164
}
ioam_trace_ts_app_t
;
165
166
167
typedef
CLIB_PACKED
(
struct
{
168
ip6_hop_by_hop_option_t
hdr;
169
u8
ioam_trace_type;
170
u8
data_list_elts_left;
171
u32
elts[0];
/* Variable type. So keep it generic */
172
}) ioam_trace_option_t;
173
174
175
typedef
CLIB_PACKED
(
struct
{
176
ip6_hop_by_hop_option_t
hdr;
177
u8
e2e_type;
178
u8
reserved;
179
u32
e2e_data;
180
}) ioam_e2e_option_t;
181
182
#endif
/* __included_ip6_hop_by_hop_packet_h__ */
ip6_hop_by_hop_option_t::type
u8 type
Definition:
ip6_hop_by_hop_packet.h:36
ip6_hop_by_hop_option_t::length
u8 length
Definition:
ip6_hop_by_hop_packet.h:38
ioam_trace_if_ts_app_t
Definition:
ip6_hop_by_hop_packet.h:80
ioam_trace_app_t::ttl_node_id
u32 ttl_node_id
Definition:
ip6_hop_by_hop_packet.h:141
ioam_trace_if_t::egress_if
u16 egress_if
Definition:
ip6_hop_by_hop_packet.h:104
ioam_trace_if_t::ttl_node_id
u32 ttl_node_id
Definition:
ip6_hop_by_hop_packet.h:102
ioam_trace_ts_t
Definition:
ip6_hop_by_hop_packet.h:120
ioam_trace_if_ts_app_t::app_data
u32 app_data
Definition:
ip6_hop_by_hop_packet.h:85
ioam_trace_app_t
Definition:
ip6_hop_by_hop_packet.h:140
ip6_hop_by_hop_header_t
Definition:
ip6_hop_by_hop_packet.h:18
ioam_trace_if_ts_app_t::ttl_node_id
u32 ttl_node_id
Definition:
ip6_hop_by_hop_packet.h:81
ioam_trace_if_t
Definition:
ip6_hop_by_hop_packet.h:101
ioam_trace_ts_app_t::timestamp
u32 timestamp
Definition:
ip6_hop_by_hop_packet.h:162
ioam_trace_ts_t::ttl_node_id
u32 ttl_node_id
Definition:
ip6_hop_by_hop_packet.h:121
ioam_trace_ts_app_t
Definition:
ip6_hop_by_hop_packet.h:160
ioam_trace_if_ts_app_t::timestamp
u32 timestamp
Definition:
ip6_hop_by_hop_packet.h:84
ip6_hop_by_hop_option_t
Definition:
ip6_hop_by_hop_packet.h:28
u32
unsigned int u32
Definition:
types.h:88
ioam_trace_app_t::app_data
u32 app_data
Definition:
ip6_hop_by_hop_packet.h:142
ioam_trace_if_ts_app_t::ingress_if
u16 ingress_if
Definition:
ip6_hop_by_hop_packet.h:82
ioam_trace_if_ts_app_t::egress_if
u16 egress_if
Definition:
ip6_hop_by_hop_packet.h:83
CLIB_PACKED
typedef CLIB_PACKED(struct{ip6_hop_by_hop_option_t hdr;u8 ioam_trace_type;u8 data_list_elts_left;u32 elts[0];}) ioam_trace_option_t
ioam_trace_ts_t::timestamp
u32 timestamp
Definition:
ip6_hop_by_hop_packet.h:122
u16
unsigned short u16
Definition:
types.h:57
ioam_trace_ts_app_t::ttl_node_id
u32 ttl_node_id
Definition:
ip6_hop_by_hop_packet.h:161
u8
unsigned char u8
Definition:
types.h:56
ip6_hop_by_hop_header_t::length
u8 length
Definition:
ip6_hop_by_hop_packet.h:25
ioam_trace_if_t::ingress_if
u16 ingress_if
Definition:
ip6_hop_by_hop_packet.h:103
ip6_hop_by_hop_header_t::protocol
u8 protocol
Definition:
ip6_hop_by_hop_packet.h:20
ioam_trace_ts_app_t::app_data
u32 app_data
Definition:
ip6_hop_by_hop_packet.h:163
vnet
vnet
ip
ip6_hop_by_hop_packet.h
Generated on Fri Nov 18 2016 06:17:51 for FD.io VPP by
1.8.11