summaryrefslogtreecommitdiff
path: root/netsniff-ng.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-05-31 12:11:09 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-05-31 12:11:09 +0200
commitcacb34f95fb7937e81b1fe8add7b5dca91e3a4c5 (patch)
tree607d72816c4d810050996f37f2acef583757cd8b /netsniff-ng.c
parent0f765f49ac231d99f493f00c0f0986fbeff2615d (diff)
ring: setup frame structure for v2/v3 in a generic way
Prepare TPACKET_V3 for allowing to transparently setting up the frame structure such that we do not need to change much in the netsniff-ng/trafgen code. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'netsniff-ng.c')
-rw-r--r--netsniff-ng.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c
index 76fafed..e5e91ed 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -226,7 +226,7 @@ static void pcap_to_xmit(struct ctx *ctx)
setup_tx_ring_layout(tx_sock, &tx_ring, size, ctx->jumbo);
create_tx_ring(tx_sock, &tx_ring, ctx->verbose);
mmap_tx_ring(tx_sock, &tx_ring);
- alloc_tx_ring_frames(&tx_ring);
+ alloc_tx_ring_frames(tx_sock, &tx_ring);
bind_tx_ring(tx_sock, &tx_ring, ifindex);
dissector_init_all(ctx->print_mode);
@@ -375,7 +375,7 @@ static void receive_to_xmit(struct ctx *ctx)
setup_rx_ring_layout(rx_sock, &rx_ring, size_in, ctx->jumbo, false);
create_rx_ring(rx_sock, &rx_ring, ctx->verbose);
mmap_rx_ring(rx_sock, &rx_ring);
- alloc_rx_ring_frames(&rx_ring);
+ alloc_rx_ring_frames(rx_sock, &rx_ring);
bind_rx_ring(rx_sock, &rx_ring, ifindex_in);
prepare_polling(rx_sock, &rx_poll);
@@ -383,7 +383,7 @@ static void receive_to_xmit(struct ctx *ctx)
setup_tx_ring_layout(tx_sock, &tx_ring, size_out, ctx->jumbo);
create_tx_ring(tx_sock, &tx_ring, ctx->verbose);
mmap_tx_ring(tx_sock, &tx_ring);
- alloc_tx_ring_frames(&tx_ring);
+ alloc_tx_ring_frames(tx_sock, &tx_ring);
bind_tx_ring(tx_sock, &tx_ring, ifindex_out);
dissector_init_all(ctx->print_mode);
@@ -854,7 +854,7 @@ static void recv_only_or_dump(struct ctx *ctx)
setup_rx_ring_layout(sock, &rx_ring, size, ctx->jumbo, false);
create_rx_ring(sock, &rx_ring, ctx->verbose);
mmap_rx_ring(sock, &rx_ring);
- alloc_rx_ring_frames(&rx_ring);
+ alloc_rx_ring_frames(sock, &rx_ring);
bind_rx_ring(sock, &rx_ring, ifindex);
prepare_polling(sock, &rx_poll);