summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-05-31 15:36:31 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-05-31 15:36:31 +0200
commitdd630bd8fb8b974302bc60226af7289624008ee5 (patch)
tree5f815a255c45468755fe85ffdf385c3825a8daa1
parentcfdc25dbcd0e17de870aebf222b2fdbc7789312a (diff)
netsniff-ng: enable jumbo frames on default in tpacket_v3
Since frames are stored more compressed and contiguous, we can also enable jumbo support in pcap dumps by default, since we have no further restrictions in terms of ring buffer frame size. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rw-r--r--netsniff-ng.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c
index 4211386..e8eb3d4 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -699,7 +699,7 @@ static int next_multi_pcap_file(struct ctx *ctx, int fd)
panic("Error writing pcap header!\n");
if (__pcap_io->prepare_access_pcap) {
- ret = __pcap_io->prepare_access_pcap(fd, PCAP_MODE_WR, ctx->jumbo);
+ ret = __pcap_io->prepare_access_pcap(fd, PCAP_MODE_WR, true);
if (ret)
panic("Error prepare writing pcap!\n");
}
@@ -728,7 +728,7 @@ static int begin_multi_pcap_file(struct ctx *ctx)
panic("Error writing pcap header!\n");
if (__pcap_io->prepare_access_pcap) {
- ret = __pcap_io->prepare_access_pcap(fd, PCAP_MODE_WR, ctx->jumbo);
+ ret = __pcap_io->prepare_access_pcap(fd, PCAP_MODE_WR, true);
if (ret)
panic("Error prepare writing pcap!\n");
}
@@ -780,7 +780,7 @@ static int begin_single_pcap_file(struct ctx *ctx)
panic("Error writing pcap header!\n");
if (__pcap_io->prepare_access_pcap) {
- ret = __pcap_io->prepare_access_pcap(fd, PCAP_MODE_WR, ctx->jumbo);
+ ret = __pcap_io->prepare_access_pcap(fd, PCAP_MODE_WR, true);
if (ret)
panic("Error prepare writing pcap!\n");
}
@@ -912,7 +912,7 @@ static void recv_only_or_dump(struct ctx *ctx)
set_sockopt_hwtimestamp(sock, ctx->device_in);
- setup_rx_ring_layout(sock, &rx_ring, size, ctx->jumbo, true);
+ setup_rx_ring_layout(sock, &rx_ring, size, true, true);
create_rx_ring(sock, &rx_ring, ctx->verbose);
mmap_rx_ring(sock, &rx_ring);
alloc_rx_ring_frames(sock, &rx_ring);