This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/3851 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 --- M .gitignore M AUTHORS M README.FreeBSD M README.MacOSX M README.md M configure.ac M debian/changelog M debian/control M debian/copyright D debian/openggsn.examples A debian/osmo-ggsn.examples R debian/osmo-ggsn.init R debian/osmo-ggsn.install M debian/rules M doc/Compliance.html M doc/Makefile.am R doc/osmo-ggsn.8 M doc/sgsnemu.8 D examples/ggsn.init A examples/osmo-ggsn.init M ggsn/Makefile.am M ggsn/ggsn.c M ggsn/ggsn_vty.c M gtp/gtp.c M gtp/gtp.h M gtp/gtpie.c M gtp/gtpie.h M gtp/pdp.c M gtp/pdp.h M gtp/queue.c M gtp/queue.h M libgtp.pc.in D openggsn.spec.in A osmo-ggsn.spec.in M sgsnemu/cmdline.ggo M sgsnemu/sgsnemu.c 36 files changed, 316 insertions(+), 302 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/51/3851/1 diff --git a/.gitignore b/.gitignore index 111fa98..6885cd3 100644 --- a/.gitignore +++ b/.gitignore @@ -15,13 +15,13 @@ libtool ltmain.sh missing -openggsn.spec +osmo-ggsn.spec stamp-h1 doc/Makefile.in ggsn/Makefile.in gtp/Makefile.in sgsnemu/Makefile.in -debian/openggsn/ +debian/osmo-ggsn/ debian/*.debhelper debian/libgtp/ debian/*.log @@ -33,7 +33,7 @@ debian/files debian/libgtp-dev/ libgtp.pc -ggsn/ggsn +ggsn/osmo-ggsn m4/ *.swp *.o diff --git a/AUTHORS b/AUTHORS index 5f10990..cba1896 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,4 @@ -OpenGGSN - Gateway GPRS Support Node +OsmoGGSN - Osmocom Gateway GPRS Support Node, based on OpenGGSN Copyright (C) 2002-2004 Mondru AB, Author: Jens Jakobsen <jj at openggsn.org> Copyright (C) 2010-2017 Harald Welte <laforge at gnumonks.org> Copyright (C) 2012-2016 Holger Hans Peter Freyther <zecke at selfish.org> diff --git a/README.FreeBSD b/README.FreeBSD index b5cc66d..2f4bce5 100644 --- a/README.FreeBSD +++ b/README.FreeBSD @@ -1,4 +1,4 @@ -OpenGGSN/FreeBSD notes +OsmoGGSN/FreeBSD notes FreeBSD support is experimental, please test and report bugs. The FreeBSD port is tested on FreeBSD 4.x, but may also work on 5.x series. diff --git a/README.MacOSX b/README.MacOSX index 0a904cd..a8c4776 100644 --- a/README.MacOSX +++ b/README.MacOSX @@ -1,4 +1,4 @@ -OpenGGSN/Mac OS X notes +OsmoGGSN/Mac OS X notes Mac OS X support is experimental, please test and report bugs. The Mac OS X port is tested on Mac OS X 10.3.5, but may also work on diff --git a/README.md b/README.md index 829adcd..42613cf 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -OpenGGSN - Open Source GGSN +OsmoGGSN - Open Source GGSN =========================== This repository contains a C-language implementation of a GGSN (Gateway GPRS Support Node), a core network element of ETSI/3GPP cellular networks such as GPRS, EDGE, UMTS or HSPA. -OpenGGSN is part of the [Osmocom](https://osmocom.org/) Open Source +OsmoGGSN is part of the [Osmocom](https://osmocom.org/) Open Source Mobile Communications projects, even thogh it was previously developed by Mondru AB. @@ -18,11 +18,11 @@ GIT Repository -------------- -You can clone from the official libosmocore.git repository using +You can clone from the official osmo-ggsn.git repository using - git clone git://git.osmocom.org/openggsn.git + git clone git://git.osmocom.org/osmo-ggsn.git -There is a cgit interface at http://git.osmocom.org/openggsn/ +There is a cgit interface at http://git.osmocom.org/osmo-ggsn/ Documentation ------------- @@ -34,7 +34,7 @@ Mailing List ------------ -Discussions related to openggsn are happening on the +Discussions related to OsmoGGSN are happening on the osmocom-net-gprs at lists.osmocom.org mailing list, please see https://lists.osmocom.org/mailman/listinfo/osmocom-net-gprs for subscription options and the list archive. @@ -54,10 +54,8 @@ https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for more details -The current patch queue for OpenGGSN can be seen at -https://gerrit.osmocom.org/#/q/project:openggsn+status:open -OPENGGSN README -=============== +The current patch queue for OsmoGGSN can be seen at +https://gerrit.osmocom.org/#/q/project:osmo-ggsn+status:open QuickStart @@ -67,7 +65,7 @@ ------------ *Linux* -OpenGGSN was originally developed and tested using Redhat 8.0 and 9.0 +OsmoGGSN was originally developed and tested using Redhat 8.0 and 9.0 and is these days mostly developed on Debian GNU/Linux. It should run also on other Linux distributions as well as FreeBSD, but this is untested. Compilation on Solaris 2.8 has also been verified. @@ -84,7 +82,7 @@ Installation from binary ------------------------ -OpenGGSN is built for common versions of Debian and Ubuntu as part of +OsmoGGSN is built for common versions of Debian and Ubuntu as part of the [Osmocom Nightly Builds](https://osmocom.org/projects/cellular-infrastructure/wiki/Nightly_Builds) project. If you don't want to do development, it is suggested to simply use those binary packages, rather than building yourself from source. @@ -141,13 +139,13 @@ Features ======== -OpenGGSN is an open source implementation of GPRS Support Nodes +OsmoGGSN is an open source implementation of GPRS Support Nodes (GSNs). It implements the GPRS tunneling protocol (GTP) version 0 and version 1. -OpenGGSN provides 3 components: +OsmoGGSN provides 3 components: * gtplib - * ggsn + * osmo-ggsn * sgsnemu *gtplib* @@ -157,8 +155,8 @@ 29.060). At the moment no interface documentation is available for download. -*ggsn* -The ggsn implements a Gateway GPRS Support Node. The GGSN is a small +*osmo-ggsn* +The osmo-ggsn implements a Gateway GPRS Support Node. The GGSN is a small application which is provided in order to test and demonstrate the use of gtplib. It is fully compliant to the 3GPP standards, but lacks important functionality such as charging and management. Use this @@ -180,7 +178,7 @@ Tun --- -Both ggsn and sgsnemu uses the tun package. You need at least tun +Both osmo-ggsn and sgsnemu uses the tun package. You need at least tun version 1.1. With Linux tun is normally included from kernel version 2.4.7. To configure automatic loading: @@ -210,16 +208,16 @@ Please refer to the project homepage -Running ggsn -============ +Running osmo-ggsn +================= -Use ggsn -h for a list of available options. All options available on +Use osmo-ggsn -h for a list of available options. All options available on the command line can also be given in a configuration file. See -examples/ggsn.conf for the format of this file. +examples/osmo-ggsn.cfg for the format of this file. -Start the ggsn as root using the command: +Start osmo-ggsn as root using the command: -ggsn -c examples/ggsn.conf +osmo-ggsn -c examples/osmo-ggsn.cfg First a tun network interface will be created. In the above example the network interface address is 192.168.0.0 and the mask is @@ -248,9 +246,9 @@ echo 1 > /proc/sys/net/ipv4/ip_forward If you installed using a binary RPM package it is possible to start -ggsn by using the Sys 5 script: +osmo-ggsn by using the Sys 5 script: -/etc/init.d/ggsn start +/etc/init.d/osmo-ggsn start Running sgsnemu @@ -285,7 +283,7 @@ Using MSISDN: 46702123456 Initialising GTP library - OpenGGSN[1823]: GTP: gtp_newgsn() started + OsmoGGSN[1823]: GTP: gtp_newgsn() started Done initialising GTP library Sending off echo request @@ -321,7 +319,7 @@ Using MSISDN: 46702123456 Initialising GTP library - OpenGGSN[1838]: GTP: gtp_newgsn() started + OsmoGGSN[1838]: GTP: gtp_newgsn() started Done initialising GTP library Sending off echo request diff --git a/configure.ac b/configure.ac index 63d3117..c19eedc 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(openggsn, m4_esyscmd([./git-version-gen .tarball-version]), osmocom-net-gprs at lists.osmocom.org) +AC_INIT(osmo-ggsn, m4_esyscmd([./git-version-gen .tarball-version]), osmocom-net-gprs at lists.osmocom.org) AC_CONFIG_SRCDIR([gtp/gtp.c]) AM_CONFIG_HEADER([config.h]) #AC_CONFIG_HEADER([config.h]) @@ -145,9 +145,9 @@ sgsnemu/Makefile tests/Makefile libgtp.pc - openggsn.spec]) + osmo-ggsn.spec]) AC_OUTPUT echo " -openggsn Configuration: +osmo-ggsn Configuration: GTP Linux kernel support: ${enable_gtp_linux}" diff --git a/debian/changelog b/debian/changelog index 17a0a36..674a997 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +osmo-ggsn (0.99) UNRELEASED; urgency=medium + + * Transition to OsmoGGSN + + -- Harald Welte <laforge at gnumonks.org> Tue, 05 Sep 2017 09:34:20 +0200 + openggsn (0.94) UNRELEASED; urgency=medium [ Holger Hans Peter Freyther ] diff --git a/debian/control b/debian/control index 4e5b168..bed17e2 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: openggsn +Source: osmo-ggsn Maintainer: Harald Welte <laforge at gnumonks.org> Section: net Priority: optional @@ -9,16 +9,16 @@ dh-autoreconf, libosmocore-dev (>= 0.8.0) Standards-Version: 3.9.6 -Vcs-Browser: http://ggsn.git.sourceforge.net/git/gitweb.cgi?p=ggsn/ggsn;a=summary -Vcs-Git: git://ggsn.git.sourceforge.net/gitroot/ggsn/ggsn +Vcs-Browser: http://git.osmocom.org/osmo-ggsn/ +Vcs-Git: git://git.osmocom.org/osmo-ggsn Homepage: https://projects.osmocom.org/projects/openggsn -Package: openggsn +Package: osmo-ggsn Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Gateway GPRS Support Node (GGSN) - OpenGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile +Description: Osmocom Gateway GPRS Support Node (GGSN) + OsmoGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile operators as the interface between the Internet and the rest of the mobile network infrastructure. @@ -29,11 +29,11 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Description: library implementing the GTP protocol between SGSN and GGSN - OpenGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile + OsmoGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile operators as the interface between the Internet and the rest of the mobile network infrastructure. . - This library is part of openggsn and implements the GTP protocol between + This library is part of OsmoGGSN and implements the GTP protocol between SGSN (Serving GPRS support node) and GGSN. Package: libgtp-dev @@ -43,17 +43,17 @@ Depends: ${misc:Depends}, libgtp1 (= ${binary:Version}) Description: Development files for libgtp - OpenGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile + OsmoGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile operators as the interface between the Internet and the rest of the mobile network infrastructure. . The library libgtp implements the GTP protocol between SGSN and GGSN and this package contains the development files for this library. -Package: openggsn-dbg +Package: osmo-ggsn-dbg Section: debug Architecture: any Priority: extra -Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp1 (= ${binary:Version}), openggsn (= ${binary:Version}) +Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp1 (= ${binary:Version}), osmo-ggsn (= ${binary:Version}) Multi-Arch: same -Description: Debug symbols for OpenGGSN +Description: Debug symbols for OsmoGGSN diff --git a/debian/copyright b/debian/copyright index b3339d9..a6507bd 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,11 +1,13 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: openggsn -Source: http://sourceforge.net/projects/ggsn/ +Upstream-Name: osmo-ggsn +Source: https://osmocom.org/projects/openggsn Files: * -Copyright: 2002 Jens Jakobsen <jj at openggsn.org> - 2002-2004 Mondru AB - 2010-2011 Harald Welte <laforge at gnumonks.org> +Copyright (C) 2002-2004 Mondru AB, Author: Jens Jakobsen <jj at openggsn.org> +Copyright (C) 2010-2017 Harald Welte <laforge at gnumonks.org> +Copyright (C) 2012-2016 Holger Hans Peter Freyther <zecke at selfish.org> +Copyright (C) 2014-2016 Pablo Neira Ayuso <pablo at gnumonks.org> +Copyright (C) 2014-2016 sysmocom - s.f.m.c. GmbH License: GPL-2 Files: lib/getopt.c @@ -15,7 +17,7 @@ License: LGPL-2.1+ Files: debian/* -Copyright: 2010-2015 Harald Welte <laforge at gnumonks.org> +Copyright: 2010-2017 Harald Welte <laforge at gnumonks.org> 2016 Ruben Undheim <ruben.undheim at gmail.com> License: GPL-2 diff --git a/debian/openggsn.examples b/debian/openggsn.examples deleted file mode 100644 index 1fa82f3..0000000 --- a/debian/openggsn.examples +++ /dev/null @@ -1,2 +0,0 @@ -examples/ggsn.conf -examples/sgsnemu.conf diff --git a/debian/osmo-ggsn.examples b/debian/osmo-ggsn.examples new file mode 100644 index 0000000..3898d26 --- /dev/null +++ b/debian/osmo-ggsn.examples @@ -0,0 +1,2 @@ +examples/osmo-ggsn.conf +examples/sgsnemu.conf diff --git a/debian/openggsn.init b/debian/osmo-ggsn.init similarity index 91% rename from debian/openggsn.init rename to debian/osmo-ggsn.init index d4fcb18..6fe1b87 100755 --- a/debian/openggsn.init +++ b/debian/osmo-ggsn.init @@ -1,6 +1,6 @@ #!/bin/sh ### BEGIN INIT INFO -# Provides: openggsn +# Provides: osmo-ggsn # Required-Start: $network $local_fs $remote_fs # Required-Stop: $network $remote_fs # Default-Start: 2 3 4 5 @@ -13,18 +13,18 @@ # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="OpenGGSN Gateway GPRS Support Node" +DESC="OsmoGGSN Gateway GPRS Support Node" NAME=ggsn -DAEMON=/usr/bin/ggsn +DAEMON=/usr/bin/osmo-ggsn DAEMON_ARGS="" # Arguments to run the daemon with PIDFILE=/var/run/$NAME.pid -SCRIPTNAME=/etc/init.d/openggsn +SCRIPTNAME=/etc/init.d/osmo-ggsn # Exit if the package is not installed [ -x $DAEMON ] || exit 0 # Read configuration variable file if it is present -[ -r /etc/default/openggsn ] && . /etc/default/openggsn +[ -r /etc/default/osmo-ggsn ] && . /etc/default/osmo-ggsn # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh @@ -46,13 +46,13 @@ || return 1 # Check for runtime directory of nonvolatile data - if [ ! -d /var/lib/ggsn ]; then - mkdir /var/lib/ggsn + if [ ! -d /var/lib/osmo-ggsn ]; then + mkdir /var/lib/osmo-ggsn fi # Check for GTP restart counter - if [ ! -f /var/lib/ggsn/gsn_restart ]; then - echo 0 > /var/lib/ggsn/gsn_restart + if [ ! -f /var/lib/osmo-ggsn/gsn_restart ]; then + echo 0 > /var/lib/osmo-ggsn/gsn_restart fi start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ diff --git a/debian/openggsn.install b/debian/osmo-ggsn.install similarity index 67% rename from debian/openggsn.install rename to debian/osmo-ggsn.install index 4b301e1..522a3d1 100644 --- a/debian/openggsn.install +++ b/debian/osmo-ggsn.install @@ -1,3 +1,3 @@ -/usr/bin/ggsn +/usr/bin/osmo-ggsn /usr/bin/sgsnemu /usr/share/man/man8/* diff --git a/debian/rules b/debian/rules index aa95e28..6f27da9 100755 --- a/debian/rules +++ b/debian/rules @@ -15,7 +15,7 @@ dh $@ --with autoreconf override_dh_strip: - dh_strip --dbg-package=openggsn-dbg + dh_strip --dbg-package=osmo-ggsn-dbg override_dh_autoreconf: echo $(VERSION) > .tarball-version diff --git a/doc/Compliance.html b/doc/Compliance.html index f33bc6f..4c2fc3a 100644 --- a/doc/Compliance.html +++ b/doc/Compliance.html @@ -7,7 +7,7 @@ </head> <body> <h1>Protocol Compliance List</h1> -OpenGGSN supports both GTP0 (GSM 09.60) and GTP1 (3GPP 29.060). In the +OsmoGGSN supports both GTP0 (GSM 09.60) and GTP1 (3GPP 29.060). In the following tables the support of each individual message type is detailed. The numbers before each feature indicates the relevant section in the standard.<br> diff --git a/doc/Makefile.am b/doc/Makefile.am index 43b00d0..7e2246c 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,4 @@ -man_MANS = ggsn.8 sgsnemu.8 +man_MANS = osmo-ggsn.8 sgsnemu.8 man_aux = $(man_MANS:.1=.x) EXTRA_DIST = $(man_MANS) diff --git a/doc/ggsn.8 b/doc/osmo-ggsn.8 similarity index 89% rename from doc/ggsn.8 rename to doc/osmo-ggsn.8 index 89dcb61b..b9f928f 100644 --- a/doc/ggsn.8 +++ b/doc/osmo-ggsn.8 @@ -1,5 +1,5 @@ -.\" * OpenGGSN - Gateway GPRS Support Node +.\" * OsmoGGSN - Gateway GPRS Support Node .\" * Copyright (C) 2002, 2003 Mondru AB. .\" * .\" * The contents of this file may be used under the terms of the GNU @@ -12,24 +12,24 @@ .\" * .\" * Contributor(s): .\" * -.\" Manual page for ggsn +.\" Manual page for osmo-ggsn .\" SH section heading .\" SS subsection heading .\" LP paragraph .\" IP indented paragraph .\" TP hanging label -.TH ggsn 8 "July 2003" +.TH osmo-ggsn 8 "August 2017" .SH NAME -ggsn \- Gateway GPRS Support Node. +osmo-ggsn \- Gateway GPRS Support Node. .SH SYNOPSIS -.B ggsn +.B osmo-ggsn \-\-help -.B ggsn +.B osmo-ggsn \-\-version -.B ggsn +.B osmo-ggsn [ .BI \-\-help ] [ @@ -40,9 +40,9 @@ .BI \-\-version ] .SH DESCRIPTION -.B ggsn +.B osmo-ggsn is part of the -.B OpenGGSN +.B OsmoGGSN project, and implements a Gateway GPRS Support Node. It is used by mobile operators as the interface between the Internet and the rest of the mobile network infrastructure. @@ -62,14 +62,14 @@ The other interface can be thought of as the uplink interface, and interfaces the GGSN to an external data network. Gi is most often an interface to the Internet. -.B ggsn +.B osmo-ggsn uses the .B TUN/TAP driver for the Gi interface. A tun network interface is established when the -.B ggsn +.B osmo-ggsn is started. -.B ggsn +.B osmo-ggsn will accept incoming connections from mobile stations through the radio access network and the SGSN. When a connection request is received the ggsn will allocate a dynamic IP address for the mobile @@ -79,7 +79,7 @@ framework. Typically -.B ggsn +.B osmo-ggsn will be deployed with two Ethernet interfaces. One for the Gn/Gp interface, and one for the Gi interface. Policy routing and firewall rules should be used in order to separate Gi traffic from Gn/Gp @@ -105,25 +105,25 @@ (default = ./openggsn.cfg) .SH FILES -.I ./openggsn.cfg +.I ./osmo-ggsn.cfg .RS The configuration file for -.B ggsn. +.B osmo-ggsn. .RE -.I /var/run/ggsn.pid +.I /var/run/osmo-ggsn.pid .RS Process ID file. .RE -.I /var/lib/ggsn +.I /var/lib/osmo-ggsn .RS Directory holding nonvolatile data. .RE .SH BUGS -Report all bugs to the OpenGGSN bug tracking list at +Report all bugs to the OsmoGGSN bug tracking list at .I https://osmocom.org/projects/openggsn -.B ggsn +.B osmo-ggsn has very limited management support. Currently both SNMP as well as billing mechanisms are missing. @@ -135,13 +135,13 @@ .LP Besides the long options documented in this man page -.B ggsn +.B osmo-ggsn also accepts a number of short options with the same functionality. Use -.B ggsn --help +.B osmo-ggsn --help for a full list of all the available options. The TUN/TAP driver is required for proper operation of -.B ggsn. +.B osmo-ggsn. For linux kernels later than 2.4.7 the TUN/TAP driver is included in the kernel, but typically needs to be loaded manually with .B modprobe tun. For automatic loading the line @@ -152,7 +152,7 @@ .I http://vtun.sourceforge.net/tun/ for information on how to install and configure the tun driver. -.B ggsn +.B osmo-ggsn uses the GPRS Tunneling Protocol (GTP) as specified by the Third Generation Partnership Project (3GPP). 3GPP protocols specifications can be found at diff --git a/doc/sgsnemu.8 b/doc/sgsnemu.8 index af8f3ff..197bd5d 100644 --- a/doc/sgsnemu.8 +++ b/doc/sgsnemu.8 @@ -1,5 +1,5 @@ -.\" * OpenGGSN - Gateway GPRS Support Node +.\" * OsmoGGSN - Gateway GPRS Support Node .\" * Copyright (C) 2002, 2003 Mondru AB. .\" * .\" * The contents of this file may be used under the terms of the GNU @@ -90,7 +90,7 @@ .SH DESCRIPTION .B sgsnemu is part of the -.B OpenGGSN +.B OsmoGGSN project, and implements a Serving GPRS Support Node (SGSN) emulator. It can be used for testing Gateway GPRS Support Nodes (GGSNs), GPRS core networks as well as GPRS roaming connections. @@ -348,8 +348,8 @@ .RE .SH BUGS -Report all bugs to the OpenGGSN bug tracking list at -.I http://sourceforge.net/projects/sgsnemu/ +Report all bugs to the OsmoGGSN bug tracking list at +.I http://osmocom.org/projects/openggsn/issues .SH "SEE ALSO" diff --git a/examples/ggsn.init b/examples/ggsn.init deleted file mode 100644 index 7d9689a..0000000 --- a/examples/ggsn.init +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -# -# ggsn This shell script takes care of starting and stopping -# ggsn. -# -# chkconfig: - 65 35 -# description: ggsn is a Gateway GPRS Support Node. - -# Source function library. -. /etc/rc.d/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - -if [ -f /etc/sysconfig/ggsn ]; then - . /etc/sysconfig/ggsn -fi - -# Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 0 - -[ -f /usr/bin/ggsn ] || exit 0 -[ -f /etc/ggsn.conf ] || exit 0 - -RETVAL=0 -prog="ggsn" - -start() { - # Start daemons. - echo -n $"Starting $prog: " - - # Load tun module - /sbin/modprobe tun >/dev/null 2>&1 - - # Enable routing of packets: WARNING!!! - # Users should enable this explicitly - # echo 1 > /proc/sys/net/ipv4/ip_forward - - # Check for runtime directory of nonvolatile data - if [ ! -d /var/lib/ggsn ]; then - mkdir /var/lib/ggsn - fi - - # Check for GTP restart counter - if [ ! -d /var/lib/ggsn/gsn_restart ]; then - echo 0 > /var/lib/ggsn/gsn_restart - fi - - - daemon /usr/bin/ggsn - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ggsn - return $RETVAL -} - -stop() { - # Stop daemons. - echo -n $"Shutting down $prog: " - killproc ggsn - RETVAL=$? - echo - [ $RETVAL = 0 ] && rm -f /var/lock/subsys/ggsn /var/run/ggsn.pid - return $RETVAL -} - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart|reload) - stop - start - RETVAL=$? - ;; - condrestart) - if [ -f /var/lock/subsys/ggsn ] ; then - stop - start - RETVAL=$? - fi - ;; - status) - status ggsn - RETVAL=$? - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|status}" - exit 1 -esac - -exit $RETVAL - diff --git a/examples/osmo-ggsn.init b/examples/osmo-ggsn.init new file mode 100644 index 0000000..2deb378 --- /dev/null +++ b/examples/osmo-ggsn.init @@ -0,0 +1,97 @@ +#!/bin/sh +# +# osmo-ggsn This shell script takes care of starting and stopping +# osmo-ggsn. +# +# chkconfig: - 65 35 +# description: osmo-ggsn is a Gateway GPRS Support Node. + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +if [ -f /etc/sysconfig/osmo-ggsn ]; then + . /etc/sysconfig/osmo-ggsn +fi + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +[ -f /usr/bin/osmo-ggsn ] || exit 0 +[ -f /etc/osmo-ggsn.cfg ] || exit 0 + +RETVAL=0 +prog="osmo-ggsn" + +start() { + # Start daemons. + echo -n $"Starting $prog: " + + # Load tun module + /sbin/modprobe tun >/dev/null 2>&1 + + # Enable routing of packets: WARNING!!! + # Users should enable this explicitly + # echo 1 > /proc/sys/net/ipv4/ip_forward + + # Check for runtime directory of nonvolatile data + if [ ! -d /var/lib/osmo-ggsn ]; then + mkdir /var/lib/osmo-ggsn + fi + + # Check for GTP restart counter + if [ ! -d /var/lib/osmo-ggsn/gsn_restart ]; then + echo 0 > /var/lib/osmo-ggsn/gsn_restart + fi + + + daemon /usr/bin/osmo-ggsn + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/osmo-ggsn + return $RETVAL +} + +stop() { + # Stop daemons. + echo -n $"Shutting down $prog: " + killproc osmo-ggsn + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f /var/lock/subsys/osmo-ggsn /var/run/osmo-ggsn.pid + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + RETVAL=$? + ;; + condrestart) + if [ -f /var/lock/subsys/osmo-ggsn ] ; then + stop + start + RETVAL=$? + fi + ;; + status) + status osmo-ggsn + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|status}" + exit 1 +esac + +exit $RETVAL + diff --git a/ggsn/Makefile.am b/ggsn/Makefile.am index fef12d3..8a468a9 100644 --- a/ggsn/Makefile.am +++ b/ggsn/Makefile.am @@ -1,19 +1,19 @@ -bin_PROGRAMS = ggsn +bin_PROGRAMS = osmo-ggsn AM_LDFLAGS = @EXEC_LDFLAGS@ AM_CFLAGS = -O2 -D_GNU_SOURCE -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS) -ggsn_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) $(LIBOSMOCTRL_LIBS) $(LIBOSMOVTY_LIBS) +osmo_ggsn_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) $(LIBOSMOCTRL_LIBS) $(LIBOSMOVTY_LIBS) if ENABLE_GTP_KERNEL AM_CFLAGS += -DGTP_KERNEL -ggsn_LDADD += -lgtpnl +osmo_ggsn_LDADD += -lgtpnl endif -ggsn_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a -ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h gtp-kernel.h icmpv6.c icmpv6.h checksum.c checksum.h +osmo_ggsn_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a +osmo_ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h gtp-kernel.h icmpv6.c icmpv6.h checksum.c checksum.h if ENABLE_GTP_KERNEL -ggsn_SOURCES += gtp-kernel.c +osmo_ggsn_SOURCES += gtp-kernel.c endif diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 5091764..dc1251d 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -1,5 +1,5 @@ /* - * OpenGGSN - Gateway GPRS Support Node + * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003, 2004 Mondru AB. * Copyright (C) 2017 by Harald Welte <laforge at gnumonks.org> * @@ -590,7 +590,7 @@ return tun_encaps((struct tun_t *)pdp->ipif, pack, len); } -static char *config_file = "openggsn.cfg"; +static char *config_file = "osmo-ggsn.cfg"; /* callback for tun device osmocom select loop integration */ static int ggsn_tun_fd_cb(struct osmo_fd *fd, unsigned int what) @@ -802,7 +802,7 @@ struct ggsn_ctx *ggsn; int rc; - tall_ggsn_ctx = talloc_named_const(NULL, 0, "openggsn"); + tall_ggsn_ctx = talloc_named_const(NULL, 0, "OsmoGGSN"); msgb_talloc_ctx_init(tall_ggsn_ctx, 0); /* Handle keyboard interrupt SIGINT */ diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index f23a298..4a3e753 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -882,7 +882,7 @@ "There is NO WARRANTY, to the extent permitted by law.\r\n"; struct vty_app_info g_vty_info = { - .name = "OpenGGSN", + .name = "OsmoGGSN", .version = PACKAGE_VERSION, .copyright = ggsn_copyright, .go_parent_cb = ggsn_vty_go_parent, diff --git a/gtp/gtp.c b/gtp/gtp.c index 7ce41bb..d0c2b1a 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -1,6 +1,8 @@ /* - * OpenGGSN - Gateway GPRS Support Node + * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003, 2004 Mondru AB. + * Copyright (C) 2010-2011, 2016-2017 Harald Welte <laforge at gnumonks.org> + * Copyright (C) 2015-2017 sysmocom - s.f.m.c. GmbH * * The contents of this file may be used under the terms of the GNU * General Public License Version 2, provided that the above copyright diff --git a/gtp/gtp.h b/gtp/gtp.h index 7fa9ae7..b40c6df 100644 --- a/gtp/gtp.h +++ b/gtp/gtp.h @@ -1,5 +1,5 @@ /* - * OpenGGSN - Gateway GPRS Support Node + * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003, 2004 Mondru AB. * * The contents of this file may be used under the terms of the GNU diff --git a/gtp/gtpie.c b/gtp/gtpie.c index c8db449..0744370 100644 --- a/gtp/gtpie.c +++ b/gtp/gtpie.c @@ -1,5 +1,5 @@ /* - * OpenGGSN - Gateway GPRS Support Node + * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002 Mondru AB. * * The contents of this file may be used under the terms of the GNU diff --git a/gtp/gtpie.h b/gtp/gtpie.h index fb8598e..9fe7943 100644 --- a/gtp/gtpie.h +++ b/gtp/gtpie.h @@ -1,5 +1,5 @@ /* - * OpenGGSN - Gateway GPRS Support Node + * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003, 2004 Mondru AB. * * The contents of this file may be used under the terms of the GNU diff --git a/gtp/pdp.c b/gtp/pdp.c index c576a4e..ff9c681 100644 --- a/gtp/pdp.c +++ b/gtp/pdp.c @@ -1,6 +1,7 @@ /* - * OpenGGSN - Gateway GPRS Support Node + * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003, 2004 Mondru AB. + * Copyright (C) 2017 Harald Welte <laforge at gnumonks.org> * * The contents of this file may be used under the terms of the GNU * General Public License Version 2, provided that the above copyright diff --git a/gtp/pdp.h b/gtp/pdp.h index c51e9e2..cb98920 100644 --- a/gtp/pdp.h +++ b/gtp/pdp.h @@ -1,6 +1,7 @@ /* - * OpenGGSN - Gateway GPRS Support Node + * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003 Mondru AB. + * Copyright (C) 2017 Harald Welte <laforge at gnumonks.org> * * The contents of this file may be used under the terms of the GNU * General Public License Version 2, provided that the above copyright diff --git a/gtp/queue.c b/gtp/queue.c index fbfa1ec..82cd7b4 100644 --- a/gtp/queue.c +++ b/gtp/queue.c @@ -1,7 +1,8 @@ /* - * OpenGGSN - Gateway GPRS Support Node + * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003, 2004 Mondru AB. * Copyright (C) 2011 Harald Welte <laforge at gnumonks.org> + * Copyright (C) 2016 sysmocom - s.f.m.c. GmbH * * The contents of this file may be used under the terms of the GNU * General Public License Version 2, provided that the above copyright diff --git a/gtp/queue.h b/gtp/queue.h index 556b6ef..2e253dd 100644 --- a/gtp/queue.h +++ b/gtp/queue.h @@ -1,5 +1,5 @@ /* - * OpenGGSN - Gateway GPRS Support Node + * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002 Mondru AB. * * The contents of this file may be used under the terms of the GNU diff --git a/libgtp.pc.in b/libgtp.pc.in index 2201608..e6048e9 100644 --- a/libgtp.pc.in +++ b/libgtp.pc.in @@ -3,7 +3,7 @@ libdir=@libdir@ includedir=@includedir@ -Name: OpenGGSN STP Library +Name: OsmoGGSN GTP Library Description: C Utility Library Version: @VERSION@ Libs: -L${libdir} -lgtp diff --git a/openggsn.spec.in b/openggsn.spec.in deleted file mode 100644 index f15866e..0000000 --- a/openggsn.spec.in +++ /dev/null @@ -1,87 +0,0 @@ -Summary: Open Source Gateway GPRS Support Node (GGSN) -Name: @PACKAGE@ -Version: @VERSION@ -Release: 1 -URL: http://sourceforge.net/projects/ggsn/ -Source0: http://prdownloads.sourceforge.net/ggsn/%{name}-%{version}.tar.gz -License: GPL -Group: System Environment/Daemons -BuildRoot: %{_tmppath}/%{name}-root - -%description -OpenGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile -operators as the interface between the Internet and the rest of the -mobile network infrastructure. The project also provides an SGSN -emulator suitable for GPRS core network testing. - -%prep -%setup -q - -%build - -./configure --prefix=/usr --enable-static-exec - -make - -%install - -make install prefix=$RPM_BUILD_ROOT/usr -strip $RPM_BUILD_ROOT/usr/bin/ggsn -strip $RPM_BUILD_ROOT/usr/bin/sgsnemu - -#Copy ggsn init script in place -mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d -install -m755 examples/ggsn.init \ - $RPM_BUILD_ROOT/etc/rc.d/init.d/ggsn - -#Copy ggsn.conf in place -install -m755 examples/ggsn.conf \ - $RPM_BUILD_ROOT/etc/ggsn.conf - -#Copy gsn_restart file in place -mkdir -p $RPM_BUILD_ROOT/var/lib/ggsn -echo "0" > $RPM_BUILD_ROOT/var/lib/ggsn/gsn_restart - -#Clean up unwanted library files -rm -rf $RPM_BUILD_ROOT/usr/include/* -rm -rf $RPM_BUILD_ROOT/usr/lib/* - - -%clean -rm -rf $RPM_BUILD_ROOT -make clean - -%post -/sbin/chkconfig --add ggsn - -%files -%defattr(-,root,root) - -/usr/bin/ggsn -/usr/bin/sgsnemu -/etc/rc.d/init.d/ggsn -%dir /var/lib/ggsn -/var/lib/ggsn/gsn_restart - -%doc AUTHORS COPYING INSTALL NEWS README.md -%doc examples/ggsn.conf -%doc examples/sgsnemu.conf -%doc examples/ggsn.init -%doc examples/firewall -%doc /usr/man/man8/ggsn.8.gz -%doc /usr/man/man8/sgsnemu.8.gz - -%config /etc/ggsn.conf - - -#/usr/lib/libgtp.a -#/usr/lib/libgtp.la -#/usr/lib/libgtp.so -#/usr/lib/libgtp.so.0 -#/usr/lib/libgtp.so.0.0.0 - - - -%changelog -* Mon Jun 30 2003 <jj at openggsn.org> -- Initial build. diff --git a/osmo-ggsn.spec.in b/osmo-ggsn.spec.in new file mode 100644 index 0000000..9613bca --- /dev/null +++ b/osmo-ggsn.spec.in @@ -0,0 +1,90 @@ +Summary: Osmocom Gateway GPRS Support Node (GGSN) +Name: @PACKAGE@ +Version: @VERSION@ +Release: 1 +URL: https://osmocom.org/projects/openggsn +Source0: http://prdownloads.sourceforge.net/ggsn/%{name}-%{version}.tar.gz +License: GPL +Group: System Environment/Daemons +BuildRoot: %{_tmppath}/%{name}-root + +%description +OsmoGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile +operators as the interface between the Internet and the rest of the +mobile network infrastructure. The project also provides an SGSN +emulator suitable for GPRS core network testing. + +%prep +%setup -q + +%build + +./configure --prefix=/usr --enable-static-exec + +make + +%install + +make install prefix=$RPM_BUILD_ROOT/usr +strip $RPM_BUILD_ROOT/usr/bin/osmo-ggsn +strip $RPM_BUILD_ROOT/usr/bin/sgsnemu + +#Copy osmo-ggsn init script in place +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d +install -m755 examples/osmo-ggsn.init \ + $RPM_BUILD_ROOT/etc/rc.d/init.d/osmo-ggsn + +#Copy osmo-ggsn.conf in place +install -m755 examples/osmo-ggsn.cfg \ + $RPM_BUILD_ROOT/etc/osmo-ggsn.cfg + +#Copy gsn_restart file in place +mkdir -p $RPM_BUILD_ROOT/var/lib/osmo-ggsn +echo "0" > $RPM_BUILD_ROOT/var/lib/osmo-ggsn/gsn_restart + +#Clean up unwanted library files +rm -rf $RPM_BUILD_ROOT/usr/include/* +rm -rf $RPM_BUILD_ROOT/usr/lib/* + + +%clean +rm -rf $RPM_BUILD_ROOT +make clean + +%post +/sbin/chkconfig --add osmo-ggsn + +%files +%defattr(-,root,root) + +/usr/bin/osmo-ggsn +/usr/bin/sgsnemu +/etc/rc.d/init.d/osmo-ggsn +%dir /var/lib/osmo-ggsn +/var/lib/osmo-ggsn/gsn_restart + +%doc AUTHORS COPYING INSTALL NEWS README.md +%doc examples/osmo-ggsn.conf +%doc examples/sgsnemu.conf +%doc examples/osmo-ggsn.init +%doc examples/firewall +%doc /usr/man/man8/osmo-ggsn.8.gz +%doc /usr/man/man8/sgsnemu.8.gz + +%config /etc/osmo-ggsn.cfg + + +#/usr/lib/libgtp.a +#/usr/lib/libgtp.la +#/usr/lib/libgtp.so +#/usr/lib/libgtp.so.0 +#/usr/lib/libgtp.so.0.0.0 + + + +%changelog +* Mon Jun 30 2017 <laforge at gnumonks.org> +- Update to OsmoGGSN + +* Mon Jun 30 2003 <jj at openggsn.org> +- Initial build. diff --git a/sgsnemu/cmdline.ggo b/sgsnemu/cmdline.ggo index 0c1b06c..ee5e55d 100644 --- a/sgsnemu/cmdline.ggo +++ b/sgsnemu/cmdline.ggo @@ -1,4 +1,4 @@ -# OpenGGSN - Gateway GPRS Support Node +# OsmoGGSN - Gateway GPRS Support Node # Copyright (C) 2002, 2003, 2004 Mondru AB. # # The contents of this file may be used under the terms of the GNU diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index ed1fb93..0157e22 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1,5 +1,5 @@ /* - * OpenGGSN - Gateway GPRS Support Node + * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003, 2004 Mondru AB. * * The contents of this file may be used under the terms of the GNU -- To view, visit https://gerrit.osmocom.org/3851 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2da30f7d4828e185bfac1a4e2d8414b01cbe4f9d Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org>