extern "C" {
#endif
+/*
+ * L2TPv2 Message Type
+ */
+#define RTE_L2TPV2_MSG_TYPE_CONTROL 0xC802
+#define RTE_L2TPV2_MSG_TYPE_DATA 0x0002
+#define RTE_L2TPV2_MSG_TYPE_DATA_L 0x4002
+#define RTE_L2TPV2_MSG_TYPE_DATA_S 0x0802
+#define RTE_L2TPV2_MSG_TYPE_DATA_O 0x0202
+#define RTE_L2TPV2_MSG_TYPE_DATA_L_S 0x4802
+#define RTE_L2TPV2_MSG_TYPE_DATA_L_O 0x4202
+#define RTE_L2TPV2_MSG_TYPE_DATA_S_O 0x0A02
+#define RTE_L2TPV2_MSG_TYPE_DATA_L_S_O 0x4A02
+
/**
* L2TPv2 Common Header
*/
__extension__
struct {
#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
- uint16_t t:1; /**< message Type */
- uint16_t l:1; /**< length option bit */
- uint16_t res1:2; /**< reserved */
- uint16_t s:1; /**< ns/nr option bit */
- uint16_t res2:1; /**< reserved */
- uint16_t o:1; /**< offset option bit */
- uint16_t p:1; /**< priority option bit */
- uint16_t res3:4; /**< reserved */
- uint16_t ver:4; /**< protocol version */
-#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
uint16_t ver:4; /**< protocol version */
uint16_t res3:4; /**< reserved */
uint16_t p:1; /**< priority option bit */
uint16_t res1:2; /**< reserved */
uint16_t l:1; /**< length option bit */
uint16_t t:1; /**< message Type */
+#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
+ uint16_t t:1; /**< message Type */
+ uint16_t l:1; /**< length option bit */
+ uint16_t res1:2; /**< reserved */
+ uint16_t s:1; /**< ns/nr option bit */
+ uint16_t res2:1; /**< reserved */
+ uint16_t o:1; /**< offset option bit */
+ uint16_t p:1; /**< priority option bit */
+ uint16_t res3:4; /**< reserved */
+ uint16_t ver:4; /**< protocol version */
#endif
};
};
/**
* L2TPv2 message Header contains all options except ns_nr(length,
* offset size, offset padding).
- * Ns and Nr MUST be toghter.
+ * Ns and Nr MUST be together.
*/
struct rte_l2tpv2_msg_without_ns_nr {
rte_be16_t length; /**< length(16) */
/**
* L2TPv2 message Header contains all options except ns_nr(length, ns, nr).
- * offset size and offset padding MUST be toghter.
+ * offset size and offset padding MUST be together.
*/
struct rte_l2tpv2_msg_without_offset {
rte_be16_t length; /**< length(16) */