Commit Graph

5 Commits

Author SHA1 Message Date
Pablo Neira Ayuso e24258f4b1 genl: ix crash due to missing wrong prototype
In function genl_socket_talk().
2014-01-21 18:09:17 +01:00
Pablo Neira Ayuso fa4c10f4d7 genl: introduce genl_nlmsg_build_hdr and use it
Add new generic function to build the netlink and genetlink headers.
2014-01-21 17:42:08 +01:00
Pablo Neira Ayuso 85dfd1ab09 call if_nametoindex out of the loop
This uses a rtnetlink socket to look up for the interface index.
This should speed up tunnel creation.
2014-01-21 14:23:30 +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 24782b2aa7 initial import
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.
2014-01-20 13:42:39 +01:00