GTPv1 tunnel use separate 32bit Tunnel Endpoint Identifier's for each
direction while GTPv0 uses only one 64bit Tunnel IDentifier.
Signed-off-by: Andreas Schultz <aschultz@tpip.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
openggsn already sets up the UDP sockets that we need for the control
and user planes of GTP. Since we cannot bind two UDP sockets (one from
userspace and another from the kernel) to the same port, change the
current code to pass the socket descriptors that has been allocated
by openggsn (or whatever daemon which uses the GTP kernel
infrastructure).
Two new attributes are added to set up the tunnel device: IFLA_GTP_FD0
(for GTP0) and IFLA_GTP_FD1 (for GTP1u), which specify the UDP socket
created from userspace. Thus, the GTP kernel code only takes care of
enabling the kernel UDP encapsulation routine.
This patch adds the libgtpnl library. Harald mentioned that he wanted
that the specific code that is added is well encapsulated, so let's
start a small library to interact with the GTP kernel module via netlink
interface.
This was done a bit while in the rush, so the interfaces are not nice
at all and the tools need to be ported on top of this library.
This library will be used to integrate openggsn with the GTP kernel
module.