1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2016 6WIND S.A.
9 #include <rte_byteorder.h>
14 * GRE headers definition.
16 * Generic Routing Encapsulation (GRE) is a tunneling protocol
17 * that can encapsulate a wide variety of network layer protocols
18 * inside virtual point-to-point links or point-to-multipoint links
19 * over an Internet Protocol network.
31 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
32 uint16_t res2:4; /**< Reserved */
33 uint16_t s:1; /**< Sequence Number Present bit */
34 uint16_t k:1; /**< Key Present bit */
35 uint16_t res1:1; /**< Reserved */
36 uint16_t c:1; /**< Checksum Present bit */
37 uint16_t ver:3; /**< Version Number */
38 uint16_t res3:5; /**< Reserved */
39 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
40 uint16_t c:1; /**< Checksum Present bit */
41 uint16_t res1:1; /**< Reserved */
42 uint16_t k:1; /**< Key Present bit */
43 uint16_t s:1; /**< Sequence Number Present bit */
44 uint16_t res2:4; /**< Reserved */
45 uint16_t res3:5; /**< Reserved */
46 uint16_t ver:3; /**< Version Number */
48 uint16_t proto; /**< Protocol Type */
52 * Optional field checksum in GRE header
54 struct rte_gre_hdr_opt_checksum_rsvd {
60 * Optional field key in GRE header
62 struct rte_gre_hdr_opt_key {
67 * Optional field sequence in GRE header
69 struct rte_gre_hdr_opt_sequence {
77 #endif /* RTE_GRE_H_ */