Commit Graph

49 Commits

Author SHA1 Message Date
Harald Welte 632e843e5f Rename OpenGGSN to OsmoGGSN
Osmocom has maintained this program since about 7 years now, while
the original author / copyright holder has completely disappeared.

With the introduction of Osmocom-style CTRL and VTY interfaces,
the way how the program is used and configured has substantially
changed.  In order to avoid confusion in terms of configuration file
format etc, let's rename it to OsmoGGSN.

Change-Id: I2da30f7d4828e185bfac1a4e2d8414b01cbe4f9d
2017-09-06 09:17:15 +02:00
Harald Welte dda21ed7d4 Introduce a VTY, factually turning OpenGGSN into an Osmocom program
Change-Id: I9613ca3436e77ea132c47f0096df7c5050d7e826
2017-09-06 09:17:11 +02:00
Harald Welte 1b6e8e7b5e Remove __sun__ code that is unmaintained
We haven nobody maintaining this platform, let's remove it.

In fact, only Linux and FreeBSD are part of the jenkins build tests,
so even Apple/MacOS is up for disposal.  However, as it's more
popular, let's keep the code.

Change-Id: Id6b8179259bacade52c39f96e688f828eff164ac
2017-09-05 23:13:14 +02:00
Harald Welte a0d281db1c IPv6 support for user IP
This patch enables the use of IPv6 PDP contexts.  The phone will
have to request an IPv6 End-user-Address, and the GGSN will have
to be configured for an IPv6 pool.

The outer transport-layer IP between SGSN and GGSN must still be
IPv4, it is not modified by this patch

Change-Id: I22c3bf32a98e5daf99d6eaeac8c9f95cc7574774
2017-08-09 22:09:34 +02:00
Harald Welte 63ebccdfe3 lib/tun.h: Remove non-endian-safe redefinition of IP header
We can simply use 'struct iphdr' from netinet/ip.h to achieve
the same goal (and be portable).

Change-Id: Ieece22e127dc14a7ffdc3b05656628989ad00b32
2017-08-09 22:09:34 +02:00
Harald Welte d12eab9c4e ippool: Add IPv6 support to IP pool implementation
Extend the IP pool implementation to be able to manage both pools
of 32bit addresses (IPv4) as well as pools of 128bit addresses (IPv6)

Change-Id: Ib98cc4bf634d6be9a7bf8c03a24e629455fcafc8
2017-08-09 22:08:57 +02:00
bjovan a8f71eb24e Code formatted to be in line with formatting rules.
Change-Id: I546dc0a8d814527b9a96943a52f2f6b700285167
2017-02-27 09:56:28 +01:00
Ruben Undheim cc077ae0bc Description: Fix some typos in the man pages and in the binary 2016-05-24 23:31:47 +02:00
Andreas Schultz 10abfba949 convert literal APN name to protocol encoded version before use
The definition of the APN field format in GTPv1 is hidden in a chain
of documents.

3GPP TS 29.060 (the GTPv1-C specification) Section 7.7.30:

> The Access Point Name contains a logical name (see 3GPP TS 23.060 [4]).
> It is coded as in the value part defined in 3GPP TS 24.008

3GPP TS 24.008 Section 10.5.6.1:

> The value part is defined in 3GPP TS 23.003.

3GPP TS 23.003 Section 9.1:

> The APN consists of one or more labels. Each label is coded as a one
> octet length field followed by that number of octets coded as 8 bit
> ASCII characters

This converts a literal APN (e.g. Label1.Label2.Label3) to a structured
field (e.g. \006Label1\006Label2\006Label3)

Signed-off-by: Andreas Schultz <aschultz@tpip.net>
2015-11-13 17:16:03 +01:00
Neels Hofmeyr 041824dfc8 sgsnemu: improve an error message 2015-11-02 14:27:44 +01:00
Holger Hans Peter Freyther 9c7fd8edc4 logging: Switch to using libosmocore logging for all the code 2014-12-04 16:51:15 +01:00
Harald Welte bed35df298 Convert all code to Linux coding style
After so many years of silence, we don't expect the original author to
return to the project.  To make things a bit simpler for us, we convert
the coding style to what we are used to (Linux style).

The conversion was made using the 'Lindent' script which is part of the
Linux kernel.
2011-11-02 13:06:18 +01:00
Harald Welte 3a4c67b4bf optionally do not send recovery with sgsnemu
According to 3GPP TS 29.060 recovery is optional, add command line option --norecovery to remove this field in sgsnemu

Signed-off-by: Yann BONNAMY <yann_bonnamy@yahoo.fr>
Signed-off-by: Harald Welte <laforge@gnumonks.org>
2011-10-07 18:45:54 +02:00
Harald Welte 41af5691ef Add optional RAI Field
Routing Area Information is an optional Field described in 3GPP TS 29.060 7.7.3
it can be added with command line option rai, in the dot separated format MCC.MNC.LAC.RAC
example :  --rai 208.10.65535.255

Signed-off-by: Yann BONNAMY <yann_bonnamy@yahoo.fr>
Signed-off-by: Harald Welte <laforge@gnumonks.org>
2011-10-07 18:42:34 +02:00
Yann BONNAMY 11a398fbc3 sgsnemu support for QoS as defined in 3GPP TS 24.008
this patch allows to tweak any bit of the QoS field of the Create PDP context generated by sgsnemu , aligned with 10.5.6.5 of 3GPP TS 24.008 V10.0.0 (2010-09)

QoS field can be extended to "lenght 12" with option --qose1, as seen in real life on UMTS networks.
extension to lenght 13, 15 and 17 can be done with option --qose2, --qose3, --qose4, never seen IRL but allows to test 3GPP compliance of GGSN.

Signed-off-by: Yann BONNAMY <yann_bonnamy@yahoo.fr>
2011-10-07 18:34:56 +02:00
Yann BONNAMY 944dce3e66 Add support for GTP IE's from 3GPP R7
This adds support for the followng new GTP Information Elements:
	RAT_TYPE, USER_LOC, MS_TZ, IMEI_SV

Furthermore, it allows to specify those fields as sgsnemu command line
arguments.
2010-10-29 17:07:44 +02:00
Emmanuel Bretelle 2a103687b6 Move common sgsnemu/ggsn files to directory "lib"
Some files like in sgsnemu and ggsn directory where exactly the same.
They are now moved to the same directory for easier maintenance

Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-10-20 11:04:51 +02:00
Emmanuel Bretelle 2a7cad57ef Fixe compilation warning
Relevant output of make:

sgsnemu.c: In function ‘process_options’:
sgsnemu.c:443: warning: pointer targets in passing argument 1 of
‘strncpy’ differ in signedness
/usr/include/bits/string3.h:120: note: expected ‘char * __restrict__’
but argument is of type ‘unsigned char *’

Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-10-20 11:04:51 +02:00
Harald Welte 1b3e577017 Use newer gengetopt which also frees memory
Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=1811521&group_id=68956&atid=522957
2010-05-04 11:13:56 +02:00
Harald Welte f54a1f4d43 Fix various compiler warnings throughout the code
Mostly signed/unsigned and typecasting issues

Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=1811517&group_id=68956&atid=522957
2010-05-04 11:08:38 +02:00
jjako 9f26b95f30 Fixed APN bug 2005-03-14 22:03:05 +00:00
jjako 0fe0df0079 qos length bugfix and apple support plus header cleanup 2004-09-17 11:30:40 +00:00
jjako 1a51df7111 Added selmode 2004-07-20 08:30:21 +00:00
jjako 7e051d37bb Charging option 2004-05-27 20:06:36 +00:00
jjako b62c3dd3c4 Fix on PPP PCO length and charging characteristics required flag. 2004-05-27 18:51:55 +00:00
jjako c6762cfc27 Solaris tun interface 2004-04-28 14:52:58 +00:00
jjako d48c5ff86b Fixed long constant warning on FreeBSD 2004-01-26 22:25:40 +00:00
jjako 06e9f12588 FreeBSD porting and IMSI bugfix 2004-01-19 18:37:58 +00:00
jjako b73f23a78d Removed IN_ADDR_NONE 2004-01-16 19:46:41 +00:00
jjako ff9985cb36 Improved Solaris support 2004-01-16 11:05:22 +00:00
jjako 1d3db978f4 Improved solaris compatibility 2004-01-16 09:56:56 +00:00
jjako 76032b9028 Changet inet_aton to inet_pton for Solaris compliance 2004-01-14 06:22:08 +00:00
jjako 0141d20232 Changes to allow compilation under Solaris 2004-01-09 15:19:20 +00:00
jjako 193e8b1b01 Added --net, --nsapi, --gtpversion options 2003-11-10 12:31:41 +00:00
jjako 0b076a331e Fixed sgsnemu freepdp on failed create context. 2003-10-25 15:59:31 +00:00
jjako 581c9f0e29 sgsnemu timelimit bug fix. Readme update 2003-10-22 11:28:20 +00:00
jjako 91aaf22458 First try with GTP1 then fallback to GTP0 2003-10-22 10:09:32 +00:00
jjako 2c3813354e GTP1 functionality 2003-10-21 19:09:53 +00:00
jjako 08d331db63 First attempt at a GTP1 implementation 2003-10-13 20:33:30 +00:00
jjako 7b8fad4168 Improved sgsnemu timeout facility 2003-07-07 14:37:42 +00:00
jjako e607f74bd5 Changed options 2003-07-06 21:21:30 +00:00
jjako a7cd249501 added ippool.h and ippool.c 2003-04-11 09:40:12 +00:00
jjako afb2a970de Improved sgsnemu ping 2003-01-29 21:04:13 +00:00
jjako cefa9afec3 Removed warning 2003-01-29 10:55:10 +00:00
jjako a175a09aaf Removed defaultroute flag 2003-01-29 10:54:26 +00:00
jjako 286bc984ed Autotools makefile update 2003-01-28 23:17:50 +00:00
jjako 5da6845e83 Ping support 2003-01-28 16:08:47 +00:00
jjako 4901471376 Absolute path to ifconfig and route in ggsn and sgsnemu 2003-01-05 17:59:49 +00:00
jjako 52c2414f6c Initial revision 2002-12-16 13:33:51 +00:00