aboutsummaryrefslogtreecommitdiffstats
path: root/ggsn/cmdline.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-10ggsn: cmdline: no need to specify interface anymorePablo Neira Ayuso1-23/+23
--gtpnl is now gone, instead you have --gtpkernel that behaves as an on/off toggle. We full rely on the kernel routing base to select the real device to transmit. I have updated ggsn/cmdline.ggo and then run 'gengetopt' to refresh the automatic code generation for command line options that openggsn uses.
2015-12-21ggsn: add support for GTP kernel data encapsulationPablo Neira Ayuso1-11/+28
This patch adds the -g, --gtpnl=device option that allows you to enable the GTP kernel tunneling mode in openggsn. You have to specify the real downlink device that will be used to tunnel traffic, eg. -g=eth0 This means that the gtp0 device will be created and it will use eth0 as the real device to encapsulate packet coming from the Internet that are addressed to the MS (so the tunnel devuce encapsulates these IP packets in GTP packets when traveling to the SGSN). Alternatively, you can also add this to the ggsn.conf configuration file: gtpnl eth0 The device has to be the real device that can route packets to the SGSN, if you select the wrong device, the kernel routing code may not find a way to reach the SSGN, you've been warned. Therefore, if this option is set, the operational becomes the following: 1) A gtp0 device is created via rtnetlink and configure the socket encapsulation infrastructure in the kernel. 2) Whenever a PDP context is created, this adds the necessary tunnel configuration via genetlink GTP interface. 3) Whenever a PDP context is destroyed, this deletes the tunnel via genetlink GTP interface. 4) Destroy the gtp0 device if ggsn is stopped, including all of the existing tunnels. You require the osmo-ggsn.git tree, which contains the kernel module gtp.ko and the libgtpnl library that you have to compile and install. Make sure you have loaded the gtp.ko kernel module before launching the ggsn daemon using the kernel driver mode, otherwise you will get a nice "operation not supported" error message ;-). This patch also adds supports for "ipup" configuration option to invoke an external script after the gtp0 device has been brought up. Typical command to add the route to reach the MS behind the GGSN is required, eg. ip route add 10.0.0.0/8 dev gtp0. The (horrible) ggsn parser has been manually extended to support the new configuration option. That code doesn't look nice, but it just mimics what we already have there for consistency, please don't blame me for that. If you want to run in debugging mode, I suggest you to use: sudo ggsn -c ggsn.conf -f -d Note that you do have to run openggsn as root to bring up the gtp0 device. You have to see this message that announce that the GTP kernel mode is enabled. openggsn[1106]: ggsn.c: 656: Using the GTP kernel mode (genl ID is 25) This patch also automagically sets up route to reach MS from Internet just like tun mode does. This is fundamental to get this working, better don't leave to the admin, he may forget to add this route. In this patch, I tried to encapsulate this new feature as much as possible as Harald initially suggested. To compile this feature, you have to pass --enable-gtp-kernel, ie. ./configire --enable-gtp-kernel Otherwise, the code to interact with the gtp kernel part is not compiled. Signed-off-by: Andreas Schultz <aschultz@tpip.net>
2014-12-04ggsn: Be able to set the log level for the text fileHolger Hans Peter Freyther1-0/+26
Fixes: SYS#599
2014-03-23cli: Introduce a logfile command to log errors to a fileHolger Hans Peter Freyther1-0/+24
The evolution would be to introduce libosmocore and start using the logging framework. But even then we can map this option to the file target. Fixes: SYS#263
2014-03-23cli: Manually patch the generated code to fix compiler warningHolger Hans Peter Freyther1-2/+0
cmdline.c: In function ‘cmdline_parser_internal’: cmdline.c:588:7: warning: variable ‘check_required’ set but not used [-Wunused-but-set-variable] int check_required; ^
2014-03-23cli: Re-generate the cmdline.c/cmdline.h with newer gengetoptHolger Hans Peter Freyther1-1022/+987
2011-11-02Convert all code to Linux coding styleHarald Welte1-957/+1017
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.
2010-05-04Use newer gengetopt which also frees memoryHarald Welte1-454/+832
Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=1811521&group_id=68956&atid=522957
2003-04-11Corrected pointer error in ggsn.cjjako1-4/+4
2003-04-11added ippool.h and ippool.cjjako1-64/+163
2003-01-28Support for external ipup scriptjjako1-2/+68
2003-01-05Compiles with gengetopt 2.8jjako1-2/+2
2002-12-16Initial revisionjjako1-0/+529