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