DPDK  20.05.0
rte_gtp.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 1982, 1986, 1990, 1993
3  * The Regents of the University of California.
4  * Copyright(c) 2010-2014 Intel Corporation.
5  * All rights reserved.
6  */
7 
8 #ifndef _RTE_GTP_H_
9 #define _RTE_GTP_H_
10 
17 #include <stdint.h>
18 #include <rte_byteorder.h>
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
30 struct rte_gtp_hdr {
31  uint8_t gtp_hdr_info;
32  uint8_t msg_type;
33  uint16_t plen;
34  uint32_t teid;
35 } __rte_packed;
36 
38 #define RTE_ETHER_GTP_HLEN \
39  (sizeof(struct rte_udp_hdr) + sizeof(struct rte_gtp_hdr))
40 /* GTP next protocal type */
41 #define RTE_GTP_TYPE_IPV4 0x40
42 #define RTE_GTP_TYPE_IPV6 0x60
43 /* GTP destination port number */
44 #define RTE_GTPC_UDP_PORT 2123
45 #define RTE_GTPU_UDP_PORT 2152
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif /* RTE_GTP_H_ */
#define __rte_packed
Definition: rte_common.h:84
uint8_t msg_type
Definition: rte_gtp.h:32
uint16_t plen
Definition: rte_gtp.h:33
uint32_t teid
Definition: rte_gtp.h:34
uint8_t gtp_hdr_info
Definition: rte_gtp.h:31