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.
Type `make' to compile kernel and userspace code. After that, you should
see gtp.ko kernel module that you can insmod.
The rudimentary userspace tools are:
* gtp-link-add, that allows you to bring up the gtp0 device (via
rtnetlink).
* gtp-tunnel-add, to create tunnels via genetlink.
This is also using using genl-family-get to obtain the (dynamic) genetlink
family for the gtp operations, but that code is scheduled to be merged to
gtp-tunnel-add.
The tunneling code does not work yet, it triggers a crash, so it's been
temporarily disabled.
Original work from Harald Welte, I added the netlink interfaces and got
this compiling.