diff options
author | Pablo Neira <pablo@netfilter.org> | 2016-05-09 00:55:48 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-10 12:25:04 -0400 |
commit | 459aa660eb1d8ce67080da1983bb81d716aa5a69 (patch) | |
tree | 4c109121a7894781048385e104036fb6cd6820ff /include/net/gtp.h | |
parent | c047c3b1af6214b447e353527e394fa3f3e86397 (diff) | |
download | linux-stable-459aa660eb1d8ce67080da1983bb81d716aa5a69.tar.gz linux-stable-459aa660eb1d8ce67080da1983bb81d716aa5a69.tar.bz2 linux-stable-459aa660eb1d8ce67080da1983bb81d716aa5a69.zip |
gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)
This is an initial implementation of a netdev driver for GTP datapath
(GTP-U) v0 and v1, according to the GSM TS 09.60 and 3GPP TS 29.060
standards. This tunneling protocol is used to prevent subscribers from
accessing mobile carrier core network infrastructure.
This implementation requires a GGSN userspace daemon that implements the
signaling protocol (GTP-C), such as OpenGGSN [1]. This userspace daemon
updates the PDP context database that represents active subscriber
sessions through a genetlink interface.
For more context on this tunneling protocol, you can check the slides
that were presented during the NetDev 1.1 [2].
Only IPv4 is supported at this time.
[1] http://git.osmocom.org/openggsn/
[2] http://www.netdevconf.org/1.1/proceedings/slides/schultz-welte-osmocom-gtp.pdf
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/gtp.h')
-rw-r--r-- | include/net/gtp.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/net/gtp.h b/include/net/gtp.h new file mode 100644 index 000000000000..894a37b87d63 --- /dev/null +++ b/include/net/gtp.h @@ -0,0 +1,34 @@ +#ifndef _GTP_H_ +#define _GTP_H + +/* General GTP protocol related definitions. */ + +#define GTP0_PORT 3386 +#define GTP1U_PORT 2152 + +#define GTP_TPDU 255 + +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)); + +#define GTP1_F_NPDU 0x01 +#define GTP1_F_SEQ 0x02 +#define GTP1_F_EXTHDR 0x04 +#define GTP1_F_MASK 0x07 + +#endif |