| Server IP : 54.94.228.101 / Your IP : 172.28.20.13 Web Server : Apache System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/modules/6.8.0-1042-aws/build/include/net/ |
Upload File : |
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _GTP_H_
#define _GTP_H_
#include <linux/netdevice.h>
#include <linux/types.h>
#include <net/rtnetlink.h>
/* General GTP protocol related definitions. */
#define GTP0_PORT 3386
#define GTP1U_PORT 2152
/* GTP messages types */
#define GTP_ECHO_REQ 1 /* Echo Request */
#define GTP_ECHO_RSP 2 /* Echo Response */
#define GTP_TPDU 255
#define GTPIE_RECOVERY 14
struct gtp0_header { /* According to GSM TS 09.60. */
__u8 flags;
__u8 type;
__be16 length;
__be16 seq;
__be16 flow;
__u8 number;
__u8 spare[3];
__be64 tid;
} __attribute__ ((packed));
struct gtp1_header { /* According to 3GPP TS 29.060. */
__u8 flags;
__u8 type;
__be16 length;
__be32 tid;
} __attribute__ ((packed));
struct gtp1_header_long { /* According to 3GPP TS 29.060. */
__u8 flags;
__u8 type;
__be16 length;
__be32 tid;
__be16 seq;
__u8 npdu;
__u8 next;
} __packed;
/* GTP Information Element */
struct gtp_ie {
__u8 tag;
__u8 val;
} __packed;
struct gtp0_packet {
struct gtp0_header gtp0_h;
struct gtp_ie ie;
} __packed;
struct gtp1u_packet {
struct gtp1_header_long gtp1u_h;
struct gtp_ie ie;
} __packed;
struct gtp_pdu_session_info { /* According to 3GPP TS 38.415. */
u8 pdu_type;
u8 qfi;
};
static inline bool netif_is_gtp(const struct net_device *dev)
{
return dev->rtnl_link_ops &&
!strcmp(dev->rtnl_link_ops->kind, "gtp");
}
#define GTP1_F_NPDU 0x01
#define GTP1_F_SEQ 0x02
#define GTP1_F_EXTHDR 0x04
#define GTP1_F_MASK 0x07
#endif