18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _GTP_H_ 38c2ecf20Sopenharmony_ci#define _GTP_H_ 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci/* General GTP protocol related definitions. */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#define GTP0_PORT 3386 88c2ecf20Sopenharmony_ci#define GTP1U_PORT 2152 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#define GTP_TPDU 255 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_cistruct gtp0_header { /* According to GSM TS 09.60. */ 138c2ecf20Sopenharmony_ci __u8 flags; 148c2ecf20Sopenharmony_ci __u8 type; 158c2ecf20Sopenharmony_ci __be16 length; 168c2ecf20Sopenharmony_ci __be16 seq; 178c2ecf20Sopenharmony_ci __be16 flow; 188c2ecf20Sopenharmony_ci __u8 number; 198c2ecf20Sopenharmony_ci __u8 spare[3]; 208c2ecf20Sopenharmony_ci __be64 tid; 218c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_cistruct gtp1_header { /* According to 3GPP TS 29.060. */ 248c2ecf20Sopenharmony_ci __u8 flags; 258c2ecf20Sopenharmony_ci __u8 type; 268c2ecf20Sopenharmony_ci __be16 length; 278c2ecf20Sopenharmony_ci __be32 tid; 288c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define GTP1_F_NPDU 0x01 318c2ecf20Sopenharmony_ci#define GTP1_F_SEQ 0x02 328c2ecf20Sopenharmony_ci#define GTP1_F_EXTHDR 0x04 338c2ecf20Sopenharmony_ci#define GTP1_F_MASK 0x07 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#endif 36