Lines Matching refs:ptr

272 	u_int16_t *ptr = (u_int16_t*)dat;  in l2tp_msgtype_print()  local
275 EXTRACT_16BITS(ptr))); in l2tp_msgtype_print()
281 u_int16_t *ptr = (u_int16_t *)dat; in l2tp_result_code_print() local
283 printf("%u", EXTRACT_16BITS(ptr)); ptr++; /* Result Code */ in l2tp_result_code_print()
285 printf("/%u", EXTRACT_16BITS(ptr)); ptr++; in l2tp_result_code_print()
289 print_string((u_char *)ptr, length - 4); in l2tp_result_code_print()
303 u_int32_t *ptr = (u_int32_t *)dat; in l2tp_framing_cap_print() local
305 if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_CAP_ASYNC_MASK) { in l2tp_framing_cap_print()
308 if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_CAP_SYNC_MASK) { in l2tp_framing_cap_print()
316 u_int32_t *ptr = (u_int32_t *)dat; in l2tp_bearer_cap_print() local
318 if (EXTRACT_32BITS(ptr) & L2TP_BEARER_CAP_ANALOG_MASK) { in l2tp_bearer_cap_print()
321 if (EXTRACT_32BITS(ptr) & L2TP_BEARER_CAP_DIGITAL_MASK) { in l2tp_bearer_cap_print()
340 u_int32_t *ptr = (u_int32_t *)dat; in l2tp_bearer_type_print() local
342 if (EXTRACT_32BITS(ptr) & L2TP_BEARER_TYPE_ANALOG_MASK) { in l2tp_bearer_type_print()
345 if (EXTRACT_32BITS(ptr) & L2TP_BEARER_TYPE_DIGITAL_MASK) { in l2tp_bearer_type_print()
353 u_int32_t *ptr = (u_int32_t *)dat; in l2tp_framing_type_print() local
355 if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_TYPE_ASYNC_MASK) { in l2tp_framing_type_print()
358 if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_TYPE_SYNC_MASK) { in l2tp_framing_type_print()
372 u_int16_t *ptr = (u_int16_t *)dat; in l2tp_proxy_auth_type_print() local
375 "AuthType-#%u", EXTRACT_16BITS(ptr))); in l2tp_proxy_auth_type_print()
381 u_int16_t *ptr = (u_int16_t *)dat; in l2tp_proxy_auth_id_print() local
383 printf("%u", EXTRACT_16BITS(ptr) & L2TP_PROXY_AUTH_ID_MASK); in l2tp_proxy_auth_id_print()
389 u_int16_t *ptr = (u_int16_t *)dat; in l2tp_call_errors_print() local
392 ptr++; /* skip "Reserved" */ in l2tp_call_errors_print()
394 val_h = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
395 val_l = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
398 val_h = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
399 val_l = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
402 val_h = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
403 val_l = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
406 val_h = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
407 val_l = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
410 val_h = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
411 val_l = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
414 val_h = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
415 val_l = EXTRACT_16BITS(ptr); ptr++; in l2tp_call_errors_print()
422 u_int16_t *ptr = (u_int16_t *)dat; in l2tp_accm_print() local
425 ptr++; /* skip "Reserved" */ in l2tp_accm_print()
427 val_h = EXTRACT_16BITS(ptr); ptr++; in l2tp_accm_print()
428 val_l = EXTRACT_16BITS(ptr); ptr++; in l2tp_accm_print()
431 val_h = EXTRACT_16BITS(ptr); ptr++; in l2tp_accm_print()
432 val_l = EXTRACT_16BITS(ptr); ptr++; in l2tp_accm_print()
439 u_int16_t *ptr = (u_int16_t *)dat; in l2tp_ppp_discon_cc_print() local
441 printf("%04x, ", EXTRACT_16BITS(ptr)); ptr++; /* Disconnect Code */ in l2tp_ppp_discon_cc_print()
442 printf("%04x ", EXTRACT_16BITS(ptr)); ptr++; /* Control Protocol Number */ in l2tp_ppp_discon_cc_print()
444 "Direction-#%u", *((u_char *)ptr++))); in l2tp_ppp_discon_cc_print()
448 print_string((const u_char *)ptr, length-5); in l2tp_ppp_discon_cc_print()
456 const u_int16_t *ptr = (u_int16_t *)dat; in l2tp_avp_print() local
466 TCHECK(*ptr); /* Flags & Length */ in l2tp_avp_print()
467 len = EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_LEN_MASK; in l2tp_avp_print()
480 TCHECK2(*ptr, len); in l2tp_avp_print()
483 if (EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_FLAG_MANDATORY) { in l2tp_avp_print()
486 if (EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_FLAG_HIDDEN) { in l2tp_avp_print()
490 ptr++; in l2tp_avp_print()
492 if (EXTRACT_16BITS(ptr)) { in l2tp_avp_print()
494 printf("VENDOR%04x:", EXTRACT_16BITS(ptr)); ptr++; in l2tp_avp_print()
495 printf("ATTR%04x", EXTRACT_16BITS(ptr)); ptr++; in l2tp_avp_print()
497 print_octets((u_char *)ptr, len-6); in l2tp_avp_print()
501 ptr++; in l2tp_avp_print()
502 attr_type = EXTRACT_16BITS(ptr); ptr++; in l2tp_avp_print()
510 l2tp_msgtype_print((u_char *)ptr); in l2tp_avp_print()
513 l2tp_result_code_print((u_char *)ptr, len-6); in l2tp_avp_print()
516 l2tp_proto_ver_print(ptr); in l2tp_avp_print()
519 l2tp_framing_cap_print((u_char *)ptr); in l2tp_avp_print()
522 l2tp_bearer_cap_print((u_char *)ptr); in l2tp_avp_print()
525 print_octets((u_char *)ptr, 8); in l2tp_avp_print()
531 print_16bits_val(ptr); in l2tp_avp_print()
540 print_string((u_char *)ptr, len-6); in l2tp_avp_print()
549 print_octets((u_char *)ptr, len-6); in l2tp_avp_print()
552 l2tp_q931_cc_print((u_char *)ptr, len-6); in l2tp_avp_print()
555 print_octets((u_char *)ptr, 16); in l2tp_avp_print()
563 print_32bits_val((u_int32_t *)ptr); in l2tp_avp_print()
566 l2tp_bearer_type_print((u_char *)ptr); in l2tp_avp_print()
569 l2tp_framing_type_print((u_char *)ptr); in l2tp_avp_print()
575 l2tp_proxy_auth_type_print((u_char *)ptr); in l2tp_avp_print()
578 l2tp_proxy_auth_id_print((u_char *)ptr); in l2tp_avp_print()
581 l2tp_call_errors_print((u_char *)ptr); in l2tp_avp_print()
584 l2tp_accm_print((u_char *)ptr); in l2tp_avp_print()
589 l2tp_ppp_discon_cc_print((u_char *)ptr, len-6); in l2tp_avp_print()
609 const u_char *ptr = dat; in l2tp_print() local
617 TCHECK2(*ptr, 2); /* Flags & Version */ in l2tp_print()
618 if ((EXTRACT_16BITS(ptr) & L2TP_VERSION_MASK) == L2TP_VERSION_L2TP) { in l2tp_print()
620 } else if ((EXTRACT_16BITS(ptr) & L2TP_VERSION_MASK) == L2TP_VERSION_L2F) { in l2tp_print()
629 if (EXTRACT_16BITS(ptr) & L2TP_FLAG_TYPE) { in l2tp_print()
633 if (EXTRACT_16BITS(ptr) & L2TP_FLAG_LENGTH) { in l2tp_print()
637 if (EXTRACT_16BITS(ptr) & L2TP_FLAG_SEQUENCE) { in l2tp_print()
641 if (EXTRACT_16BITS(ptr) & L2TP_FLAG_OFFSET) { in l2tp_print()
645 if (EXTRACT_16BITS(ptr) & L2TP_FLAG_PRIORITY) in l2tp_print()
649 ptr += 2; in l2tp_print()
653 TCHECK2(*ptr, 2); /* Length */ in l2tp_print()
654 l2tp_len = EXTRACT_16BITS(ptr); in l2tp_print()
655 ptr += 2; in l2tp_print()
661 TCHECK2(*ptr, 2); /* Tunnel ID */ in l2tp_print()
662 printf("(%u/", EXTRACT_16BITS(ptr)); in l2tp_print()
663 ptr += 2; in l2tp_print()
665 TCHECK2(*ptr, 2); /* Session ID */ in l2tp_print()
666 printf("%u)", EXTRACT_16BITS(ptr)); in l2tp_print()
667 ptr += 2; in l2tp_print()
671 TCHECK2(*ptr, 2); /* Ns */ in l2tp_print()
672 printf("Ns=%u,", EXTRACT_16BITS(ptr)); in l2tp_print()
673 ptr += 2; in l2tp_print()
675 TCHECK2(*ptr, 2); /* Nr */ in l2tp_print()
676 printf("Nr=%u", EXTRACT_16BITS(ptr)); in l2tp_print()
677 ptr += 2; in l2tp_print()
682 TCHECK2(*ptr, 2); /* Offset Size */ in l2tp_print()
683 pad = EXTRACT_16BITS(ptr); in l2tp_print()
684 ptr += (2 + pad); in l2tp_print()
707 l2tp_avp_print(ptr, length - cnt); in l2tp_print()
711 ppp_print(ptr, length - cnt); in l2tp_print()