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