]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ascii.c
bgp: Parse BGP extended message support capability
[tcpdump] / print-ascii.c
index 2f5fe8547f6dc10da6e803c3de0e8ec7d8a4e676..b4789435f0bda15217767d8ddcb3662c1fca5148 100644 (file)
@@ -102,7 +102,7 @@ ascii_print(netdissect_options *ndo,
 }
 
 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;
@@ -135,7 +135,7 @@ hex_and_ascii_print_with_offset(netdissect_options *ndo, const char *ident,
                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;
@@ -154,7 +154,7 @@ hex_and_ascii_print_with_offset(netdissect_options *ndo, const char *ident,
        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)
@@ -162,10 +162,10 @@ hex_and_ascii_print_with_offset(netdissect_options *ndo, const char *ident,
 }
 
 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);
 }
 
 /*
@@ -173,7 +173,7 @@ hex_and_ascii_print(netdissect_options *ndo, const char *ident,
  */
 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;
@@ -190,7 +190,7 @@ hex_print_with_offset(netdissect_options *ndo,
        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);
@@ -201,7 +201,7 @@ hex_print_with_offset(netdissect_options *ndo,
        }
        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)
@@ -210,9 +210,9 @@ hex_print_with_offset(netdissect_options *ndo,
 
 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