From 166bd033b4e3397a6408b253f27a7dc8234d9c7b Mon Sep 17 00:00:00 2001 From: sake Date: Fri, 4 Feb 2011 21:09:55 +0000 Subject: [PATCH] From Jason Masker (bug 5240): ` Allow editcap to chop from beginning of packet for decapsulation git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35832 f5534014-38df-0310-8fa8-9805f1628bb7 --- doc/editcap.pod | 10 ++++++---- editcap.c | 26 ++++++++++++++++---------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/doc/editcap.pod b/doc/editcap.pod index 7101ea7d00..bf699723b5 100644 --- a/doc/editcap.pod +++ b/doc/editcap.pod @@ -80,11 +80,13 @@ opened. The default is to use a single output file. =item -C EchoplenE -Sets the chop length to use when writing the packet data. -Each packet is chopped at the packet end by a few bytes of data. +Sets the chop length to use when writing the packet data. Each packet is +chopped by a few bytes of data. Positive values chop at the packet +beginning while negative values chop at the packet end. -This is useful in the rare case that the conversion between two file -formats leaves some random bytes at the end of each packet. +This is useful for chopping headers for decapsulation of an entire capture or +in the rare case that the conversion between two file formats leaves some random +bytes at the end of each packet. =item -d diff --git a/editcap.c b/editcap.c index 89ecb33a10..770781b75d 100644 --- a/editcap.c +++ b/editcap.c @@ -699,7 +699,9 @@ usage(gboolean is_error) fprintf(output, "\n"); fprintf(output, "Packet manipulation:\n"); fprintf(output, " -s truncate each packet to max. bytes of data.\n"); - fprintf(output, " -C chop each packet at the end by bytes.\n"); + fprintf(output, " -C chop each packet by bytes. Positive values\n"); + fprintf(output, " chop at the packet beginning, negative values at the\n"); + fprintf(output, " packet end.\n"); fprintf(output, " -t