This facilitates the use from other projects such as ASL licensed
software. We think there is no point in others having to re-implement
the GTP specific message parsing/encoding on top of libmnl, which is
LGPL anyway.
Please note that the tools are still licensed under GPL, just the
library has been changed.
0 is a valid file descriptor and it is the default value after calloc(),
so set this -1 so we don't send it through netlink as used init_netns.
Fixes: 200b2f4 ("gtp-rtnl: and netns support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
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>
This patch adds a gtp_tunnel structure to avoid having to deal with
functions with lots of parameters. This should also help to extend
the interfaces and the gtp_tunnel object without breaking the binary
interface (which will be good by when ipv6 support will be added).