DPDK  21.02.0
rte_gre.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2016 6WIND S.A.
3  */
4 
5 #ifndef _RTE_GRE_H_
6 #define _RTE_GRE_H_
7 
8 #include <stdint.h>
9 #include <rte_byteorder.h>
10 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
29 __extension__
30 struct rte_gre_hdr {
31 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
32  uint16_t res2:4;
33  uint16_t s:1;
34  uint16_t k:1;
35  uint16_t res1:1;
36  uint16_t c:1;
37  uint16_t ver:3;
38  uint16_t res3:5;
39 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
40  uint16_t c:1;
41  uint16_t res1:1;
42  uint16_t k:1;
43  uint16_t s:1;
44  uint16_t res2:4;
45  uint16_t res3:5;
46  uint16_t ver:3;
47 #endif
48  uint16_t proto;
49 } __rte_packed;
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 
55 #endif /* RTE_GRE_H_ */
#define __rte_packed
Definition: rte_common.h:84
uint16_t k
Definition: rte_gre.h:34
uint16_t res3
Definition: rte_gre.h:38
uint16_t res2
Definition: rte_gre.h:32
uint16_t proto
Definition: rte_gre.h:48
uint16_t res1
Definition: rte_gre.h:35
uint16_t ver
Definition: rte_gre.h:37
uint16_t c
Definition: rte_gre.h:36
uint16_t s
Definition: rte_gre.h:33