Commit Graph

25 Commits

Author SHA1 Message Date
Andreas Schultz b629240a35 add Linux network namespace support for TUN device
Change-Id: Idd0ad8fa9c8e7ba0aeec1b52947598d4d297b620
2020-02-26 11:16:06 +01:00
Pau Espin 5fdda13f89 sgsnemu: listen param is a host, not an interface
This param is parsed by gethostbyname() and it's confusing to document
it as an interface, because users will then attempt to pass "lo" to it,
which fails.

Change-Id: Id8ef0e12ddcaf8bfd199a44de0ba4280f05d4431
2018-02-14 00:43:22 +00:00
Viktor Tsymbalyuk ab4db10750 sgsnemu: created "pinghost" and "createif" modes for mutual exclusion
No warnings when used options from "pinghost" and "createif" groups
in a same time. sgsnemu created tun0 interface and send pings inside
G-PDU, but didn't calculate replys. Added options modes to avoid
mutual exclusion options.

Change-Id: I196df7838212dcddecd64a64a6cba613b6cfced0
2018-02-09 11:17:39 +00:00
Harald Welte ea0c26a436 sgsnemu: Make use of "dependon" feature in gengetopt
The gengetopt syntax can specify that a particular command line argument
depends on some other argument/option present.  We can use this to
provide useful feedback to the user at the command line parsing state,
like --pingrate making no sense without --pinghost being specified.

Change-Id: Ief27275e90e6bce23aed1e83874dbac98dd0926b
2017-10-14 16:39:07 +02:00
Harald Welte 73abc38dc5 sgsnemu: Add '--tun-device' option to specify TUN device name
This way, multiple sgsnemu instances can be runnig in parallel, each
of them creating a different tun device for their respective PDP context

Change-Id: Id12fbadf924a60db255b6d51b9f647aa51dd2e16
2017-10-14 08:17:07 +02:00
Harald Welte 840a8e9713 sgsnemu: Allow specification of PDP (EUA) Type IPv4 or IPv6
This just adds the capability to sgsnemu to request a certain PDP
EUA type.  It doesn't mean it actually handles anything beyond the
existing IPv4 yet.

Change-Id: I157f9157a7ff2ea56c37a4a902d4706de4c7d35d
2017-10-01 18:19:07 +08:00
Harald Welte fbb9c7f59a sgsnemu: Add --no-tx-gpdu-seq option to suppress transmission of G-PDU sequence numbers
Related: OS#2519
Change-Id: Idc650d896f0f72329090b56a37d9c16359294860
2017-09-24 23:10:05 +08:00
Harald Welte 7e1175f6d8 sgsnemu: Fix gengetopt package name
gengetopt by default picks the program name from PACKAGE (autotools),
which is osmo-ggsn and is obviously wrong in case of sgsnemu.

After this patch, "sgsnemu --help" no longer shows "osmo-ggsn" but
"sgsnemu" at the top of the help text.

Change-Id: Ifabc2435a503ef71aa5a002ca46833f329068b37
2017-09-24 10:53:53 +08:00
Harald Welte f621498129 sgsnemu: Re-generate cmdline.[ch] using gengetopt
This will replace the manual additions to cmdline.[ch] with
auto-generated code from gengetopt.  We need to fix-up the RAT Type in
sgsnemu.c as the manually-added code diverged from what gengetopt
generates.

Change-Id: Ia687e13d5cec1655a57078a767d2123aa022842c
2017-09-24 10:27:07 +08:00
Harald Welte 7c20148e39 sgsnemu: Fix up gengetopt file for --norecovery
In commit 3a4c67b4bf we introduced the
--norecovery command line option, but this was apparently done by
manually editing the C source code rather than adding it to the .ggo
and letting gengetopt do its magic.  Let's fix this up.

Change-Id: I1698280a699b17cea65651c3736ef149aba7e432
2017-09-24 08:56:14 +08:00
Harald Welte b6fc227763 sgsnemu: Fix up gengetopt file for RAI
In commit 41af5691ef we introduced the
--rai command line options, but this was apparently done by
manually editing the C source code rather than adding it to the .ggo
and letting gengetopt do its magic.  Let's fix this up.

Change-Id: Iaab404c3bcfc0c3943764f6616763f4f407d5644
2017-09-24 08:53:58 +08:00
Harald Welte 1d94585f96 sgsnemu: Fix up gengetopt file for rattype, userloc, mstz, imeisv
In commit 944dce3e66 we introduced various
command line options, but this was apparently done by manually editing
the C source code rather than adding it to the .ggo and letting
gengetopt do its magic.  Let's fix this up.

Change-Id: Ib8e7ef1cad5fc4423a1a4af628950aa93a4e073a
2017-09-24 08:51:02 +08:00
Harald Welte 05ac095006 sgsnemu: Fix up gengetopt file for QoS Extensions of 24.008
In commit 11a398fbc3 we introduced the
--qose{1,2,3,4} command line options, but this was apparently done by
manually editing the C source code rather than adding it to the .ggo
and letting gengetopt do its magic.  Let's fix this up.

Change-Id: I4cd827a96ac17f6eb9f824342f195727426d0e20
2017-09-24 08:41:14 +08:00
Harald Welte 73d28c9dda sgsnemu/cmdline.ggo: Remove 'unsigned' which is no longer supported
It seems like modern gengetopt no longer supports 'unsigned int'
argument types, and we need to use 'int' instead.  tested with 2.22.6

Change-Id: I34ca86cb3cc482400a7c4b3bf77c8668aaef562e
2017-09-24 08:34:36 +08:00
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 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 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 193e8b1b01 Added --net, --nsapi, --gtpversion options 2003-11-10 12:31:41 +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 f573244215 Removed defaultroute option 2003-01-28 23:21:44 +00:00
jjako 5da6845e83 Ping support 2003-01-28 16:08:47 +00:00
jjako 52c2414f6c Initial revision 2002-12-16 13:33:51 +00:00