return l2info.header_len;
}
- if (p[0] == 0x03) { /* Cisco style NLPID encaps ? */
+ if (EXTRACT_U_1(p) == 0x03) { /* Cisco style NLPID encaps ? */
isoclns_print(ndo, p + 1, l2info.length - 1);
/* FIXME check if frame was recognized */
return l2info.header_len;
return l2info.header_len;
}
- if (p[0] == 0x03) { /* Cisco style NLPID encaps ? */
+ if (EXTRACT_U_1(p) == 0x03) { /* Cisco style NLPID encaps ? */
isoclns_print(ndo, p + 1, l2info.length - 1);
/* FIXME check if frame was recognized */
return l2info.header_len;
ip_heuristic_guess(netdissect_options *ndo,
register const u_char *p, u_int length)
{
- switch(p[0]) {
+ switch(EXTRACT_U_1(p)) {
case 0x45:
case 0x46:
case 0x47:
l2info->cookie_len += lp->cookie_len;
- switch (p[0]) {
+ switch (EXTRACT_U_1(p)) {
case LS_COOKIE_ID:
l2info->cookie_type = LS_COOKIE_ID;
l2info->cookie_len += 2;
#ifdef DLT_JUNIPER_MFR
/* MFR child links don't carry cookies */
if (l2info->pictype == DLT_JUNIPER_MFR &&
- (p[0] & MFR_BE_MASK) == MFR_BE_MASK) {
+ (EXTRACT_U_1(p) & MFR_BE_MASK) == MFR_BE_MASK) {
l2info->cookie_len = 0;
}
#endif