#include "oui.h"
#include "signature.h"
-static const char tstr[] = " [|isis]";
/*
* IS-IS is defined in ISO 10589. Look there for protocol definitions.
void
isoclns_print(netdissect_options *ndo, const u_char *p, u_int length)
{
- if (!ND_TTEST_1(p)) { /* enough bytes on the wire ? */
- ND_PRINT("|OSI");
- return;
- }
+ ndo->ndo_protocol = "isoclns";
+ ND_TCHECK_1(p); /* enough bytes on the wire ? */
if (ndo->ndo_eflag)
ND_PRINT("OSI NLPID %s (0x%02x): ", tok2str(nlpid_values, "Unknown", EXTRACT_U_1(p)), EXTRACT_U_1(p));
print_unknown_data(ndo, p, "\n\t", length);
break;
}
+ return;
+trunc:
+ nd_print_trunc(ndo);
}
#define CLNP_PDU_ER 1
const struct clnp_segment_header_t *clnp_segment_header;
uint8_t rfd_error,rfd_error_major,rfd_error_minor;
+ ndo->ndo_protocol = "clnp";
clnp_header = (const struct clnp_header_t *) pptr;
ND_TCHECK_SIZE(clnp_header);
return (1);
trunc:
- ND_PRINT("[|clnp]");
+ nd_print_trunc(ndo);
return (1);
}
u_int li, version, esis_pdu_type, source_address_length, source_address_number;
const struct esis_header_t *esis_header;
+ ndo->ndo_protocol = "esis";
if (!ndo->ndo_eflag)
ND_PRINT("ES-IS");
pptr += opli;
}
trunc:
- ND_PRINT("[|esis]");
+ nd_print_trunc(ndo);
}
static void
ND_TCHECK_SIZE(mcid);
ND_PRINT("ID: %u, Name: ", EXTRACT_U_1(mcid->format_id));
- if (fn_printzp(ndo, mcid->name, 32, ndo->ndo_snapend))
+ if (nd_printzp(ndo, mcid->name, 32, ndo->ndo_snapend))
goto trunc;
ND_PRINT("\n\t Lvl: %u", EXTRACT_BE_U_2(mcid->revision_lvl));
ND_PRINT("%.2x ", mcid->digest[i]);
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
}
static int
return 0;
trunc:
- ND_PRINT("\n\t\t");
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return(1);
}
return 0;
trunc:
- ND_PRINT("\n\t\t");
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return(1);
}
return(1);
trunc:
- ND_PRINT("%s", ident);
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return(0);
}
u_int i,vendor_id;
int sigcheck;
+ ndo->ndo_protocol = "isis";
packet_len=length;
optr = p; /* initialize the _o_riginal pointer to the packet start -
need it for parsing the checksum TLV and authentication
switch (EXTRACT_U_1(tptr)) {
case ISIS_SUBTLV_AUTH_SIMPLE:
- if (fn_printzp(ndo, tptr + 1, tlv_len - 1, ndo->ndo_snapend))
+ if (nd_printzp(ndo, tptr + 1, tlv_len - 1, ndo->ndo_snapend))
goto trunc;
break;
case ISIS_SUBTLV_AUTH_MD5:
case ISIS_TLV_HOSTNAME:
ND_PRINT("\n\t Hostname: ");
- if (fn_printzp(ndo, tptr, tmp, ndo->ndo_snapend))
+ if (nd_printzp(ndo, tptr, tmp, ndo->ndo_snapend))
goto trunc;
break;
return (1);
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return (1);
}
}
}
}
-
-/*
- * Local Variables:
- * c-style: whitesmith
- * c-basic-offset: 8
- * End:
- */