/* \summary: ASCII packet dump printer */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
truncated = TRUE;
}
ND_PRINT("\n");
- while (length > 0) {
+ while (length != 0) {
s = GET_U_1(cp);
cp++;
length--;
{
hex_print_with_offset(ndo, indent, cp, length, 0);
}
-
-#ifdef MAIN
-int
-main(int argc, char *argv[])
-{
- hex_print("\n\t", "Hello, World!\n", 14);
- printf("\n");
- hex_and_ascii_print("\n\t", "Hello, World!\n", 14);
- printf("\n");
- ascii_print("Hello, World!\n", 14);
- printf("\n");
-#define TMSG "Now is the winter of our discontent...\n"
- hex_print_with_offset("\n\t", TMSG, sizeof(TMSG) - 1, 0x100);
- printf("\n");
- hex_and_ascii_print_with_offset("\n\t", TMSG, sizeof(TMSG) - 1, 0x100);
- printf("\n");
- exit(0);
-}
-#endif /* MAIN */