1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2016 6WIND S.A.
9 #include <rte_byteorder.h>
19 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
20 uint16_t res2:4; /**< Reserved */
21 uint16_t s:1; /**< Sequence Number Present bit */
22 uint16_t k:1; /**< Key Present bit */
23 uint16_t res1:1; /**< Reserved */
24 uint16_t c:1; /**< Checksum Present bit */
25 uint16_t ver:3; /**< Version Number */
26 uint16_t res3:5; /**< Reserved */
27 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
28 uint16_t c:1; /**< Checksum Present bit */
29 uint16_t res1:1; /**< Reserved */
30 uint16_t k:1; /**< Key Present bit */
31 uint16_t s:1; /**< Sequence Number Present bit */
32 uint16_t res2:4; /**< Reserved */
33 uint16_t res3:5; /**< Reserved */
34 uint16_t ver:3; /**< Version Number */
36 uint16_t proto; /**< Protocol Type */
37 } __attribute__((__packed__));
43 #endif /* RTE_GRE_H_ */