blob: 6398891b99ba0f82cbbf626b79be651f6fbf4c4f [file] [log] [blame]
Pablo Neira459aa662016-05-09 00:55:48 +02001#ifndef _GTP_H_
Colin Ian King9b8ac4f2016-07-24 19:24:09 +01002#define _GTP_H_
Pablo Neira459aa662016-05-09 00:55:48 +02003
4/* General GTP protocol related definitions. */
5
6#define GTP0_PORT 3386
7#define GTP1U_PORT 2152
8
9#define GTP_TPDU 255
10
11struct 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
22struct 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