}
static void
-hex_and_ascii_print_with_offset(netdissect_options *ndo, const char *ident,
+hex_and_ascii_print_with_offset(netdissect_options *ndo, const char *indent,
const u_char *cp, u_int length, u_int oset)
{
u_int caplength;
if (i >= HEXDUMP_SHORTS_PER_LINE) {
*hsp = *asp = '\0';
ND_PRINT("%s0x%04x: %-*s %s",
- ident, oset, HEXDUMP_HEXSTUFF_PER_LINE,
+ indent, oset, HEXDUMP_HEXSTUFF_PER_LINE,
hexstuff, asciistuff);
i = 0; hsp = hexstuff; asp = asciistuff;
oset += HEXDUMP_BYTES_PER_LINE;
if (i > 0) {
*hsp = *asp = '\0';
ND_PRINT("%s0x%04x: %-*s %s",
- ident, oset, HEXDUMP_HEXSTUFF_PER_LINE,
+ indent, oset, HEXDUMP_HEXSTUFF_PER_LINE,
hexstuff, asciistuff);
}
if (truncated)
}
void
-hex_and_ascii_print(netdissect_options *ndo, const char *ident,
+hex_and_ascii_print(netdissect_options *ndo, const char *indent,
const u_char *cp, u_int length)
{
- hex_and_ascii_print_with_offset(ndo, ident, cp, length, 0);
+ hex_and_ascii_print_with_offset(ndo, indent, cp, length, 0);
}
/*
*/
void
hex_print_with_offset(netdissect_options *ndo,
- const char *ident, const u_char *cp, u_int length,
+ const char *indent, const u_char *cp, u_int length,
u_int oset)
{
u_int caplength;
i = 0;
while (nshorts != 0) {
if ((i++ % 8) == 0) {
- ND_PRINT("%s0x%04x: ", ident, oset);
+ ND_PRINT("%s0x%04x: ", indent, oset);
oset += HEXDUMP_BYTES_PER_LINE;
}
s = GET_U_1(cp);
}
if (length & 1) {
if ((i % 8) == 0)
- ND_PRINT("%s0x%04x: ", ident, oset);
+ ND_PRINT("%s0x%04x: ", indent, oset);
ND_PRINT(" %02x", GET_U_1(cp));
}
if (truncated)
void
hex_print(netdissect_options *ndo,
- const char *ident, const u_char *cp, u_int length)
+ const char *indent, const u_char *cp, u_int length)
{
- hex_print_with_offset(ndo, ident, cp, length, 0);
+ hex_print_with_offset(ndo, indent, cp, length, 0);
}
#ifdef MAIN