gtp.h 633 B

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