aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2017-08-09IPv6 support for user IPHarald Welte2-0/+65
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-09ippool_new(): const-ify input argumentsHarald Welte2-2/+2
Change-Id: If3e53584e8c9c1f06bba4c183c9fd65fae913904
2017-08-09lib/tun.h: Remove non-endian-safe redefinition of IP headerHarald Welte1-15/+25
We can simply use 'struct iphdr' from netinet/ip.h to achieve the same goal (and be portable). Change-Id: Ieece22e127dc14a7ffdc3b05656628989ad00b32
2017-08-09ippool: Add IPv6 support to IP pool implementationHarald Welte5-124/+317
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
2016-05-12gtp: fix several compilation warningsPablo Neira Ayuso1-1/+0
CC gtpie.lo gtpie.c: In function 'gtpie_encaps': gtpie.c:437:22: warning: variable 'm' set but not used [-Wunused-but-set-variable] union gtpie_member *m; ^ gtpie.c: In function 'gtpie_encaps2': gtpie.c:537:22: warning: variable 'm' set but not used [-Wunused-but-set-variable] union gtpie_member *m; ^ lookup.c: In function ‘lookup’: lookup.c:40:24: warning: typedef ‘ub1’ locally defined but not used [-Wunused-local-typedefs] typedef unsigned char ub1; /* unsigned 1-byte quantities */ ^ Still one compilation warning left in cmdline.c, but that code is autogenerated.
2015-05-02openggsn: Check return codes and take error paths on failure.Michael McTernan1-3/+16
Return early when socket() returns -1, and check return codes where indicated by some TODOs. This removes 2 TODOs and fixes a compiler warning about assignment to a variable which then isn't used. Signed-off-by: Michael McTernan <mike.mcternan@wavemobile.com>
2014-12-23lib: Speculatively add libosmocore cflags to the libHolger Hans Peter Freyther1-1/+1
2014-12-04logging: Switch to using libosmocore logging for all the codeHolger Hans Peter Freyther6-124/+120
2014-12-04syserr: Remove unused error packet logging codeHolger Hans Peter Freyther2-44/+0
2014-03-23cli: Introduce a logfile command to log errors to a fileHolger Hans Peter Freyther2-4/+25
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
2012-11-05Remove out-of-bounds writeTobias Engel1-1/+0
This removes an out-of-bounds write. The whole statement can simply be removed since snprintf already adds the trailing 0 byte.
2011-11-02Convert all code to Linux coding styleHarald Welte11-2038/+2001
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-05-10properly build a library for the content of the lib directoryHarald Welte1-0/+7
2010-10-20IFNAMSIZ includes terminating 0Emmanuel Bretelle2-2/+2
http://www.delorie.com/gnu/docs/glibc/libc_308.html thus reverting devname to IFNAMSIZ and making sure (*tun)->devname[IFNAMSIZ-1] = 0; Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-10-20fixed compilation warning against gcc-4.4Emmanuel Bretelle1-10/+19
* Change arguments of tun_gifindex from: int tun_gifindex(struct tun_t *this, int *index) to int tun_gifindex(struct tun_t *this, __u32 *index) solves: ../lib/tun.c: In function ‘tun_addaddr’: ../lib/tun.c:265: warning: pointer targets in passing argument 2 of ‘tun_gifindex’ differ in signedness ../lib/tun.c:88: note: expected ‘int *’ but argument is of type ‘__u32 *’ * handle system return code and returns -1 if system failed solves: ../lib/tun.c: In function ‘tun_runscript’: ../lib/tun.c:895: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result * do not dereference a pointer cast and use it as an lvalue see http://www.mail-archive.com/svn-commits@lists.digium.com/msg50931.html solves: ../lib/tun.c: In function ‘tun_route’: ../lib/tun.c:533: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:533: note: initialized from here ../lib/tun.c:534: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:534: note: initialized from here ../lib/tun.c:535: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:535: note: initialized from here ../lib/tun.c: In function ‘tun_setaddr’: ../lib/tun.c:435: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:435: note: initialized from here ../lib/tun.c:452: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:452: note: initialized from here ../lib/tun.c:465: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:465: note: initialized from here Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-10-20Set tun devname to IFNAMESIZ+1 to avoid warningEmmanuel Bretelle1-1/+1
Relevant output from make: ../lib/tun.c: In function ‘tun_new’: ../lib/tun.c:688: warning: array subscript is above array bounds Caused by assignement: (*tun)->devname[IFNAMSIZ] = 0; while devname defined as: char devname[IFNAMSIZ]; Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-10-20Move common sgsnemu/ggsn files to directory "lib"Emmanuel Bretelle11-0/+3222
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>