gtp.h 594 B

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