Commit Graph

2 Commits

Author SHA1 Message Date
Pablo Neira Ayuso f40a5721ea gtp: reorganize headers
* gtp_nl.h now contains exported netlink attributes and commands to
  userspace.

* gtp.h contains internal definition for the GTP protocol implementation.
2014-02-10 18:04:26 +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