On Tue, 5 Jul 2005, Guy Harris wrote:

Guy Harris wrote:

> Here's a patch that has separate routines for "-A", "-x", and "-X",  and
> that separately tests Aflag, xflag, and Xflag, and gives them all
> appropriate names.

Ok, *here's* the patch.

It also changes "-A" not to print the "\n\t" stuff before the last bufferful
of ASCII data; I *presume* that wasn't a feature, given that it's not printed
before any other buffers.

In addition, it means that the "default" print routine prints in hex and ASCII
regardless of the setting of "-A"; again, I presume that wasn't a feature.

However, I also noticed that, while "-x" suppresses the default printing, in
the link-layer printers, of packets not printed by any other routines, "-X"
doesn't do so, and never did, as "-X" didn't set "xflag", it set only "Xflag".
"-A" set "xflag", so it suppressed that default printing; "-A" no longer sets
"xflag", so it no longer suppresses that default printing.  I don't know
whether it should or not - "-A" is useful, I suspect, mainly for printing text
protocols, so a hex dump of a non-text protocol might still be useful.

"-X", however, should probably suppress that default printing, just as "-x"
does.

heheh cool, you seem to have come to the same conclusions as me... and i've got a regression test at http://arctic.org/~dean/patches/tcpdump-3.9.1-test-print-flags.patch

i tried posting this earlier but i exceeded the 40k posting limit.

note that 3.8 doesn't pass this test both because of the -A "\n\t" difference, and because 3.8's -x flag is totally broken and behaves exactly like -X as far as i can tell.

-dean
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.

Reply via email to