DPDK 22.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
78extern "C" {
79#endif
80
81/*
82 * L2TPv2 Message Type
83 */
84#define RTE_L2TPV2_MSG_TYPE_CONTROL 0xC802
85#define RTE_L2TPV2_MSG_TYPE_DATA 0x0002
86#define RTE_L2TPV2_MSG_TYPE_DATA_L 0x4002
87#define RTE_L2TPV2_MSG_TYPE_DATA_S 0x0802
88#define RTE_L2TPV2_MSG_TYPE_DATA_O 0x0202
89#define RTE_L2TPV2_MSG_TYPE_DATA_L_S 0x4802
90#define RTE_L2TPV2_MSG_TYPE_DATA_L_O 0x4202
91#define RTE_L2TPV2_MSG_TYPE_DATA_S_O 0x0A02
92#define RTE_L2TPV2_MSG_TYPE_DATA_L_S_O 0x4A02
93
99 union {
102 __extension__
103 struct {
104#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
105 uint16_t ver:4;
106 uint16_t res3:4;
107 uint16_t p:1;
108 uint16_t o:1;
109 uint16_t res2:1;
110 uint16_t s:1;
111 uint16_t res1:2;
112 uint16_t l:1;
113 uint16_t t:1;
114#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
115 uint16_t t:1;
116 uint16_t l:1;
117 uint16_t res1:2;
118 uint16_t s:1;
119 uint16_t res2:1;
120 uint16_t o:1;
121 uint16_t p:1;
122 uint16_t res3:4;
123 uint16_t ver:4;
124#endif
125 };
126 };
127};
128
140 uint8_t *offset_padding;
142
153 uint8_t *offset_padding;
155
166 uint8_t *offset_padding;
167};
168
179};
180
188 uint8_t *offset_padding;
190
199};
200
208};
209
216};
217
224 union {
241 };
243
244#ifdef __cplusplus
245}
246#endif
247
248#endif /* _RTE_L2TPV2_H_ */
uint16_t rte_be16_t
#define __rte_packed
Definition: rte_common.h:83
#define RTE_STD_C11
Definition: rte_common.h:39
struct rte_l2tpv2_msg_without_offset type3
Definition: rte_l2tpv2.h:232
struct rte_l2tpv2_common_hdr common
Definition: rte_l2tpv2.h:223
struct rte_l2tpv2_msg_with_all_options type0
Definition: rte_l2tpv2.h:226
struct rte_l2tpv2_msg_with_offset type4
Definition: rte_l2tpv2.h:234
struct rte_l2tpv2_msg_without_length type1
Definition: rte_l2tpv2.h:228
struct rte_l2tpv2_msg_with_ns_nr type5
Definition: rte_l2tpv2.h:236
struct rte_l2tpv2_msg_without_ns_nr type2
Definition: rte_l2tpv2.h:230
struct rte_l2tpv2_msg_with_length type6
Definition: rte_l2tpv2.h:238
struct rte_l2tpv2_msg_without_all_options type7
Definition: rte_l2tpv2.h:240
rte_be16_t flags_version
Definition: rte_l2tpv2.h:101