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.
This patch converts GTP_CMD_CFG_* genetlink commands to rtnl to
configure the socket address and the hashtable. The trick is to
use a workqueue to configure the socket.
This simplifies the netlink interface, now we have two:
* One to bring up the interface and the socket via rtnl.
* Another to configure tunnels / GTP version.
Before the socket configuration was separated from the the device
setup, which was sloppy.
This patch detaches the hashtable and the UDP setup from the
GTP_CMD_TUNNEL_* command. The gtp kernel modules needs to support
UDP socket reconfiguration.
After this patch, the steps to bring up a tunnel are:
1st) bring up the device gtp0 via rtnetlink using the "gtp" link type.
2nd) attach a configuration to the gtp0 device, it includes the
initialization of the hashes and the UDP socket, via genetlink
"gtp" family using the GTP_CMD_CFG_NEW command.
3rd) add/delete tunnels using genetlink "gtp" family and GTP_CMD_TUNNEL_*
commands.
Still unusable, but the netlink interface looks in better shape.