blob: 0e16ebb2a82ddc7070c9004f510e44bfd3f6dfc0 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Pablo Neira459aa662016-05-09 00:55:48 +02002#ifndef _GTP_H_
Colin Ian King9b8ac4f2016-07-24 19:24:09 +01003#define _GTP_H_
Pablo Neira459aa662016-05-09 00:55:48 +02004
5/* General GTP protocol related definitions. */
6
7#define GTP0_PORT 3386
8#define GTP1U_PORT 2152
9
10#define GTP_TPDU 255
11
12struct 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
23struct 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