aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
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>