History

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

Pablo Neira committed 10 years ago

Commit 459aa661 parent c047c3b8 files · +1462 −1Browse files

Showing the changes to include/uapi (4 of 8 files). Show all

Unified · Split

4 files
  1. include/uapi/linux/Kbuild +1 −0
  2. include/uapi/linux/gtp.h +33 −0
  3. include/uapi/linux/if_link.h +10 −0
  4. include/uapi/linux/udp.h +2 −1
include/uapi/linux/Kbuild+1−0
@@ -141,6 +141,7 @@ header-y += gfs2_ondisk.h · 140 unmodified lines
141141 header-y += gigaset_dev.h
142142 header-y += gpio.h
143143 header-y += gsmmux.h
144+header-y += gtp.h
144145 header-y += hdlcdrv.h
145146 header-y += hdlc.h
146147 header-y += hdreg.h
include/uapi/linux/gtp.h+33−0
@@ -0,0 +1,33 @@
1+#ifndef _UAPI_LINUX_GTP_H_
2+#define _UAPI_LINUX_GTP_H__
3+
4+enum gtp_genl_cmds {
5+ GTP_CMD_NEWPDP,
6+ GTP_CMD_DELPDP,
7+ GTP_CMD_GETPDP,
8+
9+ GTP_CMD_MAX,
10+};
11+
12+enum gtp_version {
13+ GTP_V0 = 0,
14+ GTP_V1,
15+};
16+
17+enum gtp_attrs {
18+ GTPA_UNSPEC = 0,
19+ GTPA_LINK,
20+ GTPA_VERSION,
21+ GTPA_TID, /* for GTPv0 only */
22+ GTPA_SGSN_ADDRESS,
23+ GTPA_MS_ADDRESS,
24+ GTPA_FLOW,
25+ GTPA_NET_NS_FD,
26+ GTPA_I_TEI, /* for GTPv1 only */
27+ GTPA_O_TEI, /* for GTPv1 only */
28+ GTPA_PAD,
29+ __GTPA_MAX,
30+};
31+#define GTPA_MAX (__GTPA_MAX + 1)
32+
33+#endif /* _UAPI_LINUX_GTP_H_ */
include/uapi/linux/if_link.h+10−0
@@ -529,6 +529,16 @@ enum { · 528 unmodified lines
529529 };
530530 #define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1)
531531
532+/* GTP section */
533+enum {
534+ IFLA_GTP_UNSPEC,
535+ IFLA_GTP_FD0,
536+ IFLA_GTP_FD1,
537+ IFLA_GTP_PDP_HASHSIZE,
538+ __IFLA_GTP_MAX,
539+};
540+#define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1)
541+
532542 /* Bonding section */
533543
534544 enum {
include/uapi/linux/udp.h+2−1
@@ -36,6 +36,7 @@ struct udphdr { · 35 unmodified lines
3636 #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
3737 #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */
3838 #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */
39−
39+#define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */
40+#define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */
4041
4142 #endif /* _UAPI_LINUX_UDP_H */