aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tun.h
AgeCommit message (Collapse)AuthorFilesLines
2017-10-16tun: Convert tun_ipv6_linklocal_get to be more genericPau Espin Pedrol1-1/+12
Add support for IPv4 and IPv6 global IPs. Also return the prefix length of the IP address by using a in46_prefix. Change-Id: I277af191dc611b6bbcb83479f4ae338083740322
2017-10-13Remove trailing whitespacePau Espin Pedrol1-3/+3
Change-Id: I8e24f95a88bef3a59006a89c219871e6156963d7
2017-09-24ICMPv6: Send router advertisement from own link-local addressHarald Welte1-0/+2
I'm not quite sure how I ended up doing this, but for some strange reason the code before this commit is sending the ICMPv6 Router Advertisements from some weird non-standard source address. This is a violation of RFC4861 which clearly states that the source address of router advertisements "MUST be the link-local address assigned to the interface from which this message is sent." Change-Id: Ib444af70fc8f0b433d371281601fd5a37b29039e
2017-09-06Introduce a VTY, factually turning OpenGGSN into an Osmocom programHarald Welte1-1/+1
Change-Id: I9613ca3436e77ea132c47f0096df7c5050d7e826
2017-09-05lib/tun: Add 'void *priv' pointer to tun_tHarald Welte1-0/+2
This allows the application to attach some private state to the tun device, such as the context from which it was created/allocated Change-Id: Ief43b9b5fab5830fa8e28362c795f88f0b4d353b
2017-09-05lib/tun: Add missing #include to net/if.h for IFNAMSIZHarald Welte1-0/+2
Change-Id: I979867d643c9fa912884fe55105333dbad39ab97
2017-08-11Support setting TUN device IPv6 address + prefixHarald Welte1-2/+5
As we can now have PDP contexts with IPv6 user IP payload, it is useful to extend the TUN related code to be able to configure the tun device IPv6 address + prefix length Change-Id: I899d21e52d02e0b8384af29ddd489ff19c8f2cf6
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
2011-11-02Convert all code to Linux coding styleHarald Welte1-32/+29
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-10-20IFNAMSIZ includes terminating 0Emmanuel Bretelle1-1/+1
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-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 Bretelle1-0/+74
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>