DPDK  21.11.6
rte_l2tpv2.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2021 Intel Corporation.
3  */
4 
5 #ifndef _RTE_L2TPV2_H_
6 #define _RTE_L2TPV2_H_
7 
74 #include <stdint.h>
75 #include <rte_byteorder.h>
76 
77 #ifdef __cplusplus
78 extern "C" {
79 #endif
80 
86  union {
89  __extension__
90  struct {
91 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
92  uint16_t ver:4;
93  uint16_t res3:4;
94  uint16_t p:1;
95  uint16_t o:1;
96  uint16_t res2:1;
97  uint16_t s:1;
98  uint16_t res1:2;
99  uint16_t l:1;
100  uint16_t t:1;
101 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
102  uint16_t t:1;
103  uint16_t l:1;
104  uint16_t res1:2;
105  uint16_t s:1;
106  uint16_t res2:1;
107  uint16_t o:1;
108  uint16_t p:1;
109  uint16_t res3:4;
110  uint16_t ver:4;
111 #endif
112  };
113  };
114 };
115 
127  uint8_t *offset_padding;
128 } __rte_packed;
129 
140  uint8_t *offset_padding;
141 } __rte_packed;
142 
153  uint8_t *offset_padding;
154 };
155 
166 };
167 
175  uint8_t *offset_padding;
176 } __rte_packed;
177 
186 };
187 
195 };
196 
203 };
204 
211  union {
228  };
229 } __rte_packed;
230 
231 #ifdef __cplusplus
232 }
233 #endif
234 
235 #endif /* _RTE_L2TPV2_H_ */
rte_l2tpv2_msg_without_length
Definition: rte_l2tpv2.h:134
rte_l2tpv2_msg_without_offset::tunnel_id
rte_be16_t tunnel_id
Definition: rte_l2tpv2.h:162
rte_l2tpv2_combined_msg_hdr::type1
struct rte_l2tpv2_msg_without_length type1
Definition: rte_l2tpv2.h:215
rte_l2tpv2_msg_with_offset
Definition: rte_l2tpv2.h:171
rte_l2tpv2_msg_without_ns_nr::tunnel_id
rte_be16_t tunnel_id
Definition: rte_l2tpv2.h:150
rte_l2tpv2_common_hdr::t
uint16_t t
Definition: rte_l2tpv2.h:100
rte_l2tpv2_msg_with_offset::offset_padding
uint8_t * offset_padding
Definition: rte_l2tpv2.h:175
rte_l2tpv2_msg_without_ns_nr::offset_padding
uint8_t * offset_padding
Definition: rte_l2tpv2.h:153
rte_l2tpv2_msg_with_offset::offset_size
rte_be16_t offset_size
Definition: rte_l2tpv2.h:174
rte_l2tpv2_combined_msg_hdr::type0
struct rte_l2tpv2_msg_with_all_options type0
Definition: rte_l2tpv2.h:213
rte_l2tpv2_msg_with_ns_nr::nr
rte_be16_t nr
Definition: rte_l2tpv2.h:185
rte_l2tpv2_msg_with_all_options::offset_size
rte_be16_t offset_size
Definition: rte_l2tpv2.h:126
rte_l2tpv2_msg_with_ns_nr::tunnel_id
rte_be16_t tunnel_id
Definition: rte_l2tpv2.h:182
rte_l2tpv2_common_hdr::l
uint16_t l
Definition: rte_l2tpv2.h:99
rte_l2tpv2_common_hdr
Definition: rte_l2tpv2.h:85
rte_l2tpv2_common_hdr::flags_version
rte_be16_t flags_version
Definition: rte_l2tpv2.h:88
rte_l2tpv2_msg_with_ns_nr::session_id
rte_be16_t session_id
Definition: rte_l2tpv2.h:183
rte_l2tpv2_msg_with_all_options::tunnel_id
rte_be16_t tunnel_id
Definition: rte_l2tpv2.h:122
rte_l2tpv2_msg_with_all_options::ns
rte_be16_t ns
Definition: rte_l2tpv2.h:124
rte_l2tpv2_msg_without_all_options
Definition: rte_l2tpv2.h:200
rte_l2tpv2_msg_without_ns_nr
Definition: rte_l2tpv2.h:148
rte_l2tpv2_msg_without_offset::ns
rte_be16_t ns
Definition: rte_l2tpv2.h:164
rte_l2tpv2_msg_with_length::session_id
rte_be16_t session_id
Definition: rte_l2tpv2.h:194
rte_l2tpv2_combined_msg_hdr::type6
struct rte_l2tpv2_msg_with_length type6
Definition: rte_l2tpv2.h:225
rte_l2tpv2_common_hdr::s
uint16_t s
Definition: rte_l2tpv2.h:97
rte_l2tpv2_msg_with_all_options::offset_padding
uint8_t * offset_padding
Definition: rte_l2tpv2.h:127
rte_l2tpv2_msg_with_ns_nr::ns
rte_be16_t ns
Definition: rte_l2tpv2.h:184
rte_l2tpv2_msg_with_all_options::session_id
rte_be16_t session_id
Definition: rte_l2tpv2.h:123
rte_l2tpv2_msg_with_length::tunnel_id
rte_be16_t tunnel_id
Definition: rte_l2tpv2.h:193
rte_l2tpv2_msg_without_length::offset_size
rte_be16_t offset_size
Definition: rte_l2tpv2.h:139
rte_l2tpv2_msg_without_offset::session_id
rte_be16_t session_id
Definition: rte_l2tpv2.h:163
rte_l2tpv2_msg_without_offset::length
rte_be16_t length
Definition: rte_l2tpv2.h:161
__rte_packed
#define __rte_packed
Definition: rte_common.h:86
rte_l2tpv2_msg_without_offset::nr
rte_be16_t nr
Definition: rte_l2tpv2.h:165
rte_l2tpv2_msg_without_ns_nr::offset_size
rte_be16_t offset_size
Definition: rte_l2tpv2.h:152
rte_l2tpv2_msg_with_all_options
Definition: rte_l2tpv2.h:120
rte_l2tpv2_combined_msg_hdr::type2
struct rte_l2tpv2_msg_without_ns_nr type2
Definition: rte_l2tpv2.h:217
rte_l2tpv2_msg_without_length::nr
rte_be16_t nr
Definition: rte_l2tpv2.h:138
rte_l2tpv2_msg_with_offset::tunnel_id
rte_be16_t tunnel_id
Definition: rte_l2tpv2.h:172
rte_l2tpv2_msg_with_offset::session_id
rte_be16_t session_id
Definition: rte_l2tpv2.h:173
rte_l2tpv2_msg_without_all_options::session_id
rte_be16_t session_id
Definition: rte_l2tpv2.h:202
rte_l2tpv2_combined_msg_hdr::type5
struct rte_l2tpv2_msg_with_ns_nr type5
Definition: rte_l2tpv2.h:223
rte_l2tpv2_combined_msg_hdr::type7
struct rte_l2tpv2_msg_without_all_options type7
Definition: rte_l2tpv2.h:227
rte_l2tpv2_msg_without_length::tunnel_id
rte_be16_t tunnel_id
Definition: rte_l2tpv2.h:135
rte_be16_t
uint16_t rte_be16_t
Definition: rte_byteorder.h:110
rte_l2tpv2_combined_msg_hdr::common
struct rte_l2tpv2_common_hdr common
Definition: rte_l2tpv2.h:210
rte_l2tpv2_msg_with_all_options::nr
rte_be16_t nr
Definition: rte_l2tpv2.h:125
RTE_STD_C11
#define RTE_STD_C11
Definition: rte_common.h:42
rte_l2tpv2_combined_msg_hdr::type4
struct rte_l2tpv2_msg_with_offset type4
Definition: rte_l2tpv2.h:221
rte_l2tpv2_msg_without_all_options::tunnel_id
rte_be16_t tunnel_id
Definition: rte_l2tpv2.h:201
rte_l2tpv2_common_hdr::ver
uint16_t ver
Definition: rte_l2tpv2.h:92
rte_l2tpv2_msg_without_length::session_id
rte_be16_t session_id
Definition: rte_l2tpv2.h:136
rte_l2tpv2_msg_without_ns_nr::session_id
rte_be16_t session_id
Definition: rte_l2tpv2.h:151
rte_l2tpv2_common_hdr::res2
uint16_t res2
Definition: rte_l2tpv2.h:96
rte_l2tpv2_msg_without_length::ns
rte_be16_t ns
Definition: rte_l2tpv2.h:137
rte_l2tpv2_common_hdr::p
uint16_t p
Definition: rte_l2tpv2.h:94
rte_l2tpv2_msg_without_length::offset_padding
uint8_t * offset_padding
Definition: rte_l2tpv2.h:140
rte_l2tpv2_common_hdr::res3
uint16_t res3
Definition: rte_l2tpv2.h:93
rte_l2tpv2_msg_with_ns_nr
Definition: rte_l2tpv2.h:181
rte_l2tpv2_msg_without_offset
Definition: rte_l2tpv2.h:160
rte_l2tpv2_common_hdr::o
uint16_t o
Definition: rte_l2tpv2.h:95
rte_l2tpv2_msg_with_all_options::length
rte_be16_t length
Definition: rte_l2tpv2.h:121
rte_l2tpv2_msg_with_length::length
rte_be16_t length
Definition: rte_l2tpv2.h:192
rte_byteorder.h
rte_l2tpv2_common_hdr::res1
uint16_t res1
Definition: rte_l2tpv2.h:98
rte_l2tpv2_msg_without_ns_nr::length
rte_be16_t length
Definition: rte_l2tpv2.h:149
rte_l2tpv2_msg_with_length
Definition: rte_l2tpv2.h:191
rte_l2tpv2_combined_msg_hdr::type3
struct rte_l2tpv2_msg_without_offset type3
Definition: rte_l2tpv2.h:219
rte_l2tpv2_combined_msg_hdr
Definition: rte_l2tpv2.h:209