DPDK 24.11.1
Loading...
Searching...
No Matches
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
73
74#include <stdint.h>
75#include <rte_byteorder.h>
76
77/*
78 * L2TPv2 Message Type
79 */
80#define RTE_L2TPV2_MSG_TYPE_CONTROL 0xC802
81#define RTE_L2TPV2_MSG_TYPE_DATA 0x0002
82#define RTE_L2TPV2_MSG_TYPE_DATA_L 0x4002
83#define RTE_L2TPV2_MSG_TYPE_DATA_S 0x0802
84#define RTE_L2TPV2_MSG_TYPE_DATA_O 0x0202
85#define RTE_L2TPV2_MSG_TYPE_DATA_L_S 0x4802
86#define RTE_L2TPV2_MSG_TYPE_DATA_L_O 0x4202
87#define RTE_L2TPV2_MSG_TYPE_DATA_S_O 0x0A02
88#define RTE_L2TPV2_MSG_TYPE_DATA_L_S_O 0x4A02
89
94 union {
97 __extension__
98 struct {
99#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
100 uint16_t ver:4;
101 uint16_t res3:4;
102 uint16_t p:1;
103 uint16_t o:1;
104 uint16_t res2:1;
105 uint16_t s:1;
106 uint16_t res1:2;
107 uint16_t l:1;
108 uint16_t t:1;
109#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
110 uint16_t t:1;
111 uint16_t l:1;
112 uint16_t res1:2;
113 uint16_t s:1;
114 uint16_t res2:1;
115 uint16_t o:1;
116 uint16_t p:1;
117 uint16_t res3:4;
118 uint16_t ver:4;
119#endif
120 };
121 };
122};
123
137
150
163
175
185
195
204
212
237
238#endif /* _RTE_L2TPV2_H_ */
uint16_t rte_be16_t
#define __rte_packed
Definition rte_common.h:108
struct rte_l2tpv2_msg_without_offset type3
Definition rte_l2tpv2.h:226
struct rte_l2tpv2_common_hdr common
Definition rte_l2tpv2.h:217
struct rte_l2tpv2_msg_with_all_options type0
Definition rte_l2tpv2.h:220
struct rte_l2tpv2_msg_with_offset type4
Definition rte_l2tpv2.h:228
struct rte_l2tpv2_msg_without_length type1
Definition rte_l2tpv2.h:222
struct rte_l2tpv2_msg_with_ns_nr type5
Definition rte_l2tpv2.h:230
struct rte_l2tpv2_msg_without_ns_nr type2
Definition rte_l2tpv2.h:224
struct rte_l2tpv2_msg_with_length type6
Definition rte_l2tpv2.h:232
struct rte_l2tpv2_msg_without_all_options type7
Definition rte_l2tpv2.h:234
rte_be16_t flags_version
Definition rte_l2tpv2.h:96