xref: /openbmc/linux/include/net/gtp.h (revision 9b93eb47)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _GTP_H_
3 #define _GTP_H_
4 
5 /* General GTP protocol related definitions. */
6 
7 #define GTP0_PORT	3386
8 #define GTP1U_PORT	2152
9 
10 #define GTP_TPDU	255
11 
12 struct gtp0_header {	/* According to GSM TS 09.60. */
13 	__u8	flags;
14 	__u8	type;
15 	__be16	length;
16 	__be16	seq;
17 	__be16	flow;
18 	__u8	number;
19 	__u8	spare[3];
20 	__be64	tid;
21 } __attribute__ ((packed));
22 
23 struct gtp1_header {	/* According to 3GPP TS 29.060. */
24 	__u8	flags;
25 	__u8	type;
26 	__be16	length;
27 	__be32	tid;
28 } __attribute__ ((packed));
29 
30 #define GTP1_F_NPDU	0x01
31 #define GTP1_F_SEQ	0x02
32 #define GTP1_F_EXTHDR	0x04
33 #define GTP1_F_MASK	0x07
34 
35 #endif
36