Commit Graph

9 Commits

Author SHA1 Message Date
Andreas Schultz 785aa50a6b build: update Makefile for simpler out of tree builds
Signed-off-by: Andreas Schultz <aschultz@tpip.net>
Signed-off-by: Pablo Neira Ayuso <pablo@soleta.eu>
2015-11-07 17:50:27 +01:00
Pablo Neira Ayuso c7e6ffadb4 add libgtpnl
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.
2014-02-20 19:41:29 +01:00
Pablo Neira Ayuso 943da964ec gtp: remove GTP_CMD_CFG_* genetlink and use rtnetlink interface
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.
2014-02-18 19:20:11 +01:00
Pablo Neira Ayuso de47c7a03d add gtp-tunnel command line tool
Merge gtp-tunnel-add and gtp-tunnel-get. Then, add the deletion feature.
Useful to inspect kernel configuration and for testing purposes.
2014-02-10 17:41:52 +01:00
Pablo Neira Ayuso 2fa9f8e151 gtp-tunnel-add: add gtp_build_payload
Simple refactoring to prepare the tunnel deletion operation.
2014-02-10 17:14:54 +01:00
Pablo Neira Ayuso c156be41fd gtp: add GTP_CMD_CFG_* commands
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.
2014-01-22 21:02:37 +01:00
Pablo Neira Ayuso acbbbc3e5a add gtp-tunnel-get
This allows listing the existing tunnels.
2014-01-21 18:08:23 +01:00
Pablo Neira Ayuso b0ff3b67ef provide simple genl library
So we can get rid of genl-family-get.c to look up for the genetlink
family ID.
2014-01-21 14:21:58 +01:00
Pablo Neira Ayuso d539883390 Add missing Makefile 2014-01-20 13:43:54 +01:00