From ba3a77bb9ad8cbb93c0b3019910ec1ac89f57155 Mon Sep 17 00:00:00 2001 From: Chris Maynard Date: Sun, 8 Sep 2013 21:35:24 +0000 Subject: [PATCH] Specify the optional offset as a positive value, regardless of chopping from packet beginning or packet end. I *think* this will be easier syntax to remember. svn path=/trunk/; revision=51848 --- doc/editcap.pod | 6 +++--- editcap.c | 14 ++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/editcap.pod b/doc/editcap.pod index d5abe28a1f..00422e4bcd 100644 --- a/doc/editcap.pod +++ b/doc/editcap.pod @@ -95,9 +95,9 @@ Sets the chop length to use when writing the packet data. Each packet is chopped by bytes of data. Positive values chop at the packet beginning while negative values chop at the packet end. -If the optional offset precedes the , then the bytes chopped will be -offset from that value. Positve offsets are from the packet beginning, while -negative offsets are from the packet end. +If an optional offset precedes the , then the bytes chopped will be +offset from that value. Offsets are expected to be positive values, regardless +of chopping from packet beginning or packet end. This is useful for chopping headers for decapsulation of an entire capture, removing tunneling headers, or in the rare case that the conversion between two diff --git a/editcap.c b/editcap.c index 0c7e2f7640..053776ac79 100644 --- a/editcap.c +++ b/editcap.c @@ -734,9 +734,9 @@ usage(gboolean is_error) fprintf(output, " chop at the packet beginning, negative values at the\n"); fprintf(output, " packet end. If an optional offset precedes the length,\n"); fprintf(output, " then the bytes chopped will be offset from that value.\n"); - fprintf(output, " Positve offsets are from the packet beginning,\n"); - fprintf(output, " negative offsets are from the packet end. You can use\n"); - fprintf(output, " this option more than once.\n"); + fprintf(output, " Offsets are expected to be positive values, regardless\n"); + fprintf(output, " of chopping from packet beginning or packet end. You\n"); + fprintf(output, " can use this option more than once.\n"); fprintf(output, " -L adjust the frame length when chopping and/or snapping\n"); fprintf(output, " -t