* draft-ietf-babel-source-specific-0
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
#include "addrtoname.h"
#include "extract.h"
-
static void babel_print_v2(netdissect_options *, const u_char *cp, u_int length);
void
const u_char *cp, u_int length)
{
ndo->ndo_protocol = "babel";
- ND_PRINT("babel");
+ nd_print_protocol(ndo);
ND_TCHECK_4(cp);
trunc:
nd_print_trunc(ndo);
- return;
}
/* TLVs */
u_char v4_prefix[16] =
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0, 0 };
u_char v6_prefix[16] = {0};
-
+
i = 0;
while(i < tlvs_length) {
const u_char *message;
message = cp + i;
ICHECK(i, 1);
- ND_TCHECK_1(message);
if((type = GET_U_1(message)) == MESSAGE_PAD1) {
ND_PRINT(ndo->ndo_vflag ? "\n\tPad 1" : " pad1");
i += 1;
case MESSAGE_MAC: {
if (!ndo->ndo_vflag)
ND_PRINT(" mac");
- else {
+ else {
ND_PRINT("\n\tMAC ");
ND_PRINT("len %u", len);
}
/* If there's a trailer, process the TLVs in the trailer */
if (length != 0) {
- if(ndo->ndo_vflag) ND_PRINT("\n\t----");
- else ND_PRINT(" |");
- babel_print_v2_tlvs(ndo, cp, length, length);
+ if(ndo->ndo_vflag) ND_PRINT("\n\t----");
+ else ND_PRINT(" |");
+ ret = babel_print_v2_tlvs(ndo, cp, length, length);
if (ret == -1)
goto trunc;
if (ret == -2)
invalid:
nd_print_invalid(ndo);
- return;
}