diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-05-09 15:46:38 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2014-05-09 15:46:38 +0200 |
commit | 9a40de458b3884d9f526172110392501f075bd87 (patch) | |
tree | ff621d506b408a74a0ccea32e5f3f97b5ad0a210 /astraceroute.c | |
parent | 61a233a283171832a1ac5d580cf9487f9b7aec0a (diff) |
ring: Merge common ring_{rx,tx} initialization into own function
Instead of having to perform the individual steps to initialize a ring
and open coding them in multiple places, provide convenience functions
to do all at once. This has the nice side effect of allowing to make
most of these *_{rx,tx}_ring() functions static in their respective
module.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'astraceroute.c')
-rw-r--r-- | astraceroute.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/astraceroute.c b/astraceroute.c index 19c8017..e9d876d 100644 --- a/astraceroute.c +++ b/astraceroute.c @@ -44,7 +44,7 @@ #include "csum.h" #include "sock.h" #include "geoip.h" -#include "ring_rx.h" +#include "ring.h" #include "built_in.h" struct ctx { @@ -899,7 +899,7 @@ static int main_trace(struct ctx *ctx) inject_filter(ctx, fd_cap); ifindex = device_ifindex(ctx->dev); - bind_rx_ring(fd_cap, &dummy_ring, ifindex); + bind_ring_generic(fd_cap, &dummy_ring, ifindex, false); if (ctx->totlen < af_ops[ctx->proto].min_len_tcp) { ctx->totlen = af_ops[ctx->proto].min_len_tcp; |