#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);
babel_print(netdissect_options *ndo,
const u_char *cp, u_int length)
{
+ ndo->ndo_protocol = "babel";
ND_PRINT("babel");
ND_TCHECK_4(cp);
return;
trunc:
- ND_PRINT(" %s", tstr);
+ nd_print_trunc(ndo);
return;
}
* 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
return;
invalid:
- ND_PRINT("%s", istr);
+ nd_print_invalid(ndo);
}
#define ICHECK(i, l) \
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));
return;
trunc:
- ND_PRINT(" %s", tstr);
+ nd_print_trunc(ndo);
return;
invalid:
- ND_PRINT("%s", istr);
+ nd_print_invalid(ndo);
return;
}