summaryrefslogtreecommitdiff
path: root/print-ascii.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't run past the snapshot length when doing hex/ASCII dumps.Guy Harris2015-01-061-0/+12
|
* Have "ascii_print()" do the "-A" output, and nothing but the "-A"guy2005-07-061-48/+46
| | | | | | | | | | | | | | output. Have "hex_and_ascii_print_with_offset()" and "hex_and_ascii_print()" to the "-X"-style offset, leaving "hex_print_with_offset()" and "hex_print()" doing the "-x"-style output. Don't have any of them check "xflag", "Xflag", or "Aflag" - they print what they're intended to print, and the caller should check the flags in question. Don't have "-A" set "xflag" or "Xflag". This cleans up some problems with "-A" printing hex informatioin - it's not supposed to.
* The first argument to "ascii_print_with_offset()", "ascii_print()",guy2004-07-211-5/+5
| | | | | | | | | | | | "hex_print_with_offset()", and "hex_print()" is a string used as a tag; make it a "const char *", not a "const u_char *". Copy the declaration of "strsep()" from "interface.h" to "netdissect.h", and get rid of the include of "interface.h" from "print-esp.c", as it includes "netdissect.h". Update the "ND_TTEST2()" macro to do the same overflow checks that "TTEST2()" now does.
* pass on ident string to hex_print()hannes2003-12-291-6/+6
|
* elimitate tabs as they mess up the multi-line outputhannes2003-12-291-3/+3
|
* pass an identation string to the ascii printerhannes2003-12-291-9/+11
|
* Have the configure script arrange that the Makefile define _U_guy2003-11-161-4/+4
| | | | | | | | | | appropriately, and that GNUmakefile and the MSVC++ project file define it apppriately, as we do with libpcap, rather than defining it in "interface.h". Undo the rcsid-shuffling and addition of extra #includes, as we no longer need to arrange that "interface.h" be included before using _U_ in an RCS ID or copyright.
* From Neil Spring:guy2003-11-151-4/+4
| | | | | | | | | | | use "_U_" in the definitions of "rcsid[]", to eliminate complaints about those variables being unused; move the definitions after the include of "interface.h", or add an include of "interface.h", so that "_U_" is defined. Include "config.h" before including "tcpdump-stdinc.h" in "missing/datalinks.c".
* Add a few more GCC warnings on GCC >= 2 for ".devel" builds.guy2002-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Neil T. Spring: fixes for many of those warnings: addrtoname.c, configure.in: Linux needs netinet/ether.h for ether_ntohost print-*.c: change char *foo = "bar" to const char *foo = "bar" to appease -Wwrite-strings; should affect no run-time behavior. print-*.c: make some variables unsigned. print-bgp.c: plen ('prefix len') is unsigned, no reason to validate by comparing to zero. print-cnfp.c, print-rx.c: use intoa, provided by addrtoname, instead of inet_ntoa. print-domain.c: unsigned int l; (l=foo()) < 0 is guaranteed to be false, so check for (u_int)-1, which represents failure, explicitly. print-isakmp.c: complete initialization of attrmap objects. print-lwres.c: "if(x); print foo;" seemed much more likely to be intended to be "if(x) { print foo; }". print-smb.c: complete initialization of some structures. In addition, add some fixes for the signed vs. unsigned comparison warnings: extract.h: cast the result of the byte-extraction-and-combining, as, at least for the 16-bit version, C's integral promotions will turn "u_int16_t" into "int" if there are other "int"s nearby. print-*.c: make some more variables unsigned, or add casts to an unsigned type of signed values known not to be negative, or add casts to "int" of unsigned values known to fit in an "int", and make other changes needed to handle the aforementioned variables now being unsigned. print-isakmp.c: clean up the handling of error/status indicators in notify messages. print-ppp.c: get rid of a check that an unsigned quantity is >= 0. print-radius.c: clean up some of the bounds checking. print-smb.c: extract the word count into a "u_int" to avoid the aforementioned problems with C's integral promotions. print-snmp.c: change a check that an unsigned variable is >= 0 to a check that it's != 0. Also, fix some formats to use "%u" rather than "%d" for unsigned quantities.
* Added support for Win32, based on WinPcap.risso2002-08-011-3/+2
|
* whitespace cleanupitojun2002-06-111-3/+3
|
* "-A" flag to print packet data in ASCII, from Jørgen Thomsenguy2002-04-241-19/+43
| | | | <jth@jth.net>.
* fix ascii dump with -X. due to mistake in snprintf() fixes.itojun2000-01-291-3/+5
| | | | (no need to pull into 3.5)
* s/sprintf/snprintf/.itojun2000-01-171-3/+3
| | | | | there seem to be couple of unsafe use of strcat and strcpy - we should bring in strl{cat,cpy}.
* Unify rcsid[]'s.fenner2000-01-091-6/+2
|
* <sys/cdefs.h>: conditionalizeassar2000-01-071-0/+2
|
* comment out __RCSID (netbsd only).itojun1999-12-231-0/+2
|
* add print-ascii.c and print-telnet.c from netbsd.itojun1999-12-221-0/+158
- add -X option for ascii printing. - telnet command sequences (ff xx xx) will be dumped with -vvv -X.