]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-babel.c
Fix small misspellings
[tcpdump] / print-babel.c
index c7fef600ca287048fd85496e55503d263ec11898..fb70a7fc51abf925de7e9060abd9459c9d794abd 100644 (file)
@@ -41,7 +41,6 @@
 #include "addrtoname.h"
 #include "extract.h"
 
-static const char tstr[] = "[|babel]";
 
 static void babel_print_v2(netdissect_options *, const u_char *cp, u_int length);
 
@@ -49,6 +48,7 @@ void
 babel_print(netdissect_options *ndo,
             const u_char *cp, u_int length)
 {
+    ndo->ndo_protocol = "babel";
     ND_PRINT("babel");
 
     ND_TCHECK_4(cp);
@@ -72,7 +72,7 @@ babel_print(netdissect_options *ndo,
     return;
 
  trunc:
-    ND_PRINT(" %s", tstr);
+    nd_print_trunc(ndo);
     return;
 }
 
@@ -251,7 +251,7 @@ network_address(int ae, const unsigned char *a, unsigned int len,
  * o Type 1 stands for PadN sub-TLV with the same encoding as the PadN TLV.
  * o Type 2 stands for Diversity sub-TLV, which propagates diversity routing
  *   data. Its body is a variable-length sequence of 8-bit unsigned integers,
- *   each representing per-hop number of interferring radio channel for the
+ *   each representing per-hop number of interfering radio channel for the
  *   prefix. Channel 0 is invalid and must not be used in the sub-TLV, channel
  *   255 interferes with any other channel.
  * o Type 3 stands for Timestamp sub-TLV, used to compute RTT between
@@ -336,7 +336,7 @@ subtlvs_print(netdissect_options *ndo,
     return;
 
  invalid:
-    ND_PRINT("%s", istr);
+    nd_print_invalid(ndo);
 }
 
 #define ICHECK(i, l) \
@@ -448,7 +448,7 @@ babel_print_v2(netdissect_options *ndo,
                 ae = EXTRACT_U_1(message + 2);
                 rc = network_address(ae, message + 8,
                                      len - 6, address);
-                if(rc < 0) { ND_PRINT("%s", tstr); break; }
+                if(rc < 0) { nd_print_trunc(ndo); break; }
                 ND_PRINT("%s rxcost %u interval %s",
                        ae == 0 ? "any" : format_address(ndo, address),
                        rxcost, format_interval(interval));
@@ -728,10 +728,10 @@ babel_print_v2(netdissect_options *ndo,
     return;
 
  trunc:
-    ND_PRINT(" %s", tstr);
+    nd_print_trunc(ndo);
     return;
 
  invalid:
-    ND_PRINT("%s", istr);
+    nd_print_invalid(ndo);
     return;
 }