Lines Matching refs:ndo

267 print_string(netdissect_options *ndo, const u_char *dat, u_int length)  in print_string()  argument
271 ND_PRINT((ndo, "%c", *dat++)); in print_string()
276 print_octets(netdissect_options *ndo, const u_char *dat, u_int length) in print_octets() argument
280 ND_PRINT((ndo, "%02x", *dat++)); in print_octets()
285 print_16bits_val(netdissect_options *ndo, const uint16_t *dat) in print_16bits_val() argument
287 ND_PRINT((ndo, "%u", EXTRACT_16BITS(dat))); in print_16bits_val()
291 print_32bits_val(netdissect_options *ndo, const uint32_t *dat) in print_32bits_val() argument
293 ND_PRINT((ndo, "%lu", (u_long)EXTRACT_32BITS(dat))); in print_32bits_val()
300 l2tp_msgtype_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_msgtype_print() argument
305 ND_PRINT((ndo, "AVP too short")); in l2tp_msgtype_print()
308 ND_PRINT((ndo, "%s", tok2str(l2tp_msgtype2str, "MSGTYPE-#%u", in l2tp_msgtype_print()
313 l2tp_result_code_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_result_code_print() argument
319 ND_PRINT((ndo, "AVP too short")); in l2tp_result_code_print()
322 ND_PRINT((ndo, "%u", EXTRACT_16BITS(ptr))); in l2tp_result_code_print()
330 ND_PRINT((ndo, " AVP too short")); in l2tp_result_code_print()
333 ND_PRINT((ndo, "/%u", EXTRACT_16BITS(ptr))); in l2tp_result_code_print()
340 ND_PRINT((ndo, " ")); in l2tp_result_code_print()
341 print_string(ndo, (const u_char *)ptr, length); in l2tp_result_code_print()
345 l2tp_proto_ver_print(netdissect_options *ndo, const uint16_t *dat, u_int length) in l2tp_proto_ver_print() argument
348 ND_PRINT((ndo, "AVP too short")); in l2tp_proto_ver_print()
351 ND_PRINT((ndo, "%u.%u", (EXTRACT_16BITS(dat) >> 8), in l2tp_proto_ver_print()
356 l2tp_framing_cap_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_framing_cap_print() argument
361 ND_PRINT((ndo, "AVP too short")); in l2tp_framing_cap_print()
365 ND_PRINT((ndo, "A")); in l2tp_framing_cap_print()
368 ND_PRINT((ndo, "S")); in l2tp_framing_cap_print()
373 l2tp_bearer_cap_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_bearer_cap_print() argument
378 ND_PRINT((ndo, "AVP too short")); in l2tp_bearer_cap_print()
382 ND_PRINT((ndo, "A")); in l2tp_bearer_cap_print()
385 ND_PRINT((ndo, "D")); in l2tp_bearer_cap_print()
390 l2tp_q931_cc_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_q931_cc_print() argument
393 ND_PRINT((ndo, "AVP too short")); in l2tp_q931_cc_print()
396 print_16bits_val(ndo, (const uint16_t *)dat); in l2tp_q931_cc_print()
397 ND_PRINT((ndo, ", %02x", dat[2])); in l2tp_q931_cc_print()
401 ND_PRINT((ndo, " ")); in l2tp_q931_cc_print()
402 print_string(ndo, dat, length); in l2tp_q931_cc_print()
407 l2tp_bearer_type_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_bearer_type_print() argument
412 ND_PRINT((ndo, "AVP too short")); in l2tp_bearer_type_print()
416 ND_PRINT((ndo, "A")); in l2tp_bearer_type_print()
419 ND_PRINT((ndo, "D")); in l2tp_bearer_type_print()
424 l2tp_framing_type_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_framing_type_print() argument
429 ND_PRINT((ndo, "AVP too short")); in l2tp_framing_type_print()
433 ND_PRINT((ndo, "A")); in l2tp_framing_type_print()
436 ND_PRINT((ndo, "S")); in l2tp_framing_type_print()
441 l2tp_packet_proc_delay_print(netdissect_options *ndo) in l2tp_packet_proc_delay_print() argument
443 ND_PRINT((ndo, "obsolete")); in l2tp_packet_proc_delay_print()
447 l2tp_proxy_auth_type_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_proxy_auth_type_print() argument
452 ND_PRINT((ndo, "AVP too short")); in l2tp_proxy_auth_type_print()
455 ND_PRINT((ndo, "%s", tok2str(l2tp_authentype2str, in l2tp_proxy_auth_type_print()
460 l2tp_proxy_auth_id_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_proxy_auth_id_print() argument
465 ND_PRINT((ndo, "AVP too short")); in l2tp_proxy_auth_id_print()
468 ND_PRINT((ndo, "%u", EXTRACT_16BITS(ptr) & L2TP_PROXY_AUTH_ID_MASK)); in l2tp_proxy_auth_id_print()
472 l2tp_call_errors_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_call_errors_print() argument
478 ND_PRINT((ndo, "AVP too short")); in l2tp_call_errors_print()
485 ND_PRINT((ndo, "AVP too short")); in l2tp_call_errors_print()
490 ND_PRINT((ndo, "CRCErr=%u ", (val_h<<16) + val_l)); in l2tp_call_errors_print()
493 ND_PRINT((ndo, "AVP too short")); in l2tp_call_errors_print()
498 ND_PRINT((ndo, "FrameErr=%u ", (val_h<<16) + val_l)); in l2tp_call_errors_print()
501 ND_PRINT((ndo, "AVP too short")); in l2tp_call_errors_print()
506 ND_PRINT((ndo, "HardOver=%u ", (val_h<<16) + val_l)); in l2tp_call_errors_print()
509 ND_PRINT((ndo, "AVP too short")); in l2tp_call_errors_print()
514 ND_PRINT((ndo, "BufOver=%u ", (val_h<<16) + val_l)); in l2tp_call_errors_print()
517 ND_PRINT((ndo, "AVP too short")); in l2tp_call_errors_print()
522 ND_PRINT((ndo, "Timeout=%u ", (val_h<<16) + val_l)); in l2tp_call_errors_print()
525 ND_PRINT((ndo, "AVP too short")); in l2tp_call_errors_print()
530 ND_PRINT((ndo, "AlignErr=%u ", (val_h<<16) + val_l)); in l2tp_call_errors_print()
534 l2tp_accm_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_accm_print() argument
540 ND_PRINT((ndo, "AVP too short")); in l2tp_accm_print()
547 ND_PRINT((ndo, "AVP too short")); in l2tp_accm_print()
552 ND_PRINT((ndo, "send=%08x ", (val_h<<16) + val_l)); in l2tp_accm_print()
555 ND_PRINT((ndo, "AVP too short")); in l2tp_accm_print()
560 ND_PRINT((ndo, "recv=%08x ", (val_h<<16) + val_l)); in l2tp_accm_print()
564 l2tp_ppp_discon_cc_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_ppp_discon_cc_print() argument
569 ND_PRINT((ndo, "AVP too short")); in l2tp_ppp_discon_cc_print()
573 ND_PRINT((ndo, "%04x, ", EXTRACT_16BITS(dat))); in l2tp_ppp_discon_cc_print()
577 ND_PRINT((ndo, "%04x ", EXTRACT_16BITS(dat))); in l2tp_ppp_discon_cc_print()
581 ND_PRINT((ndo, "%s", tok2str(l2tp_cc_direction2str, in l2tp_ppp_discon_cc_print()
587 ND_PRINT((ndo, " ")); in l2tp_ppp_discon_cc_print()
588 print_string(ndo, (const u_char *)ptr, length); in l2tp_ppp_discon_cc_print()
593 l2tp_avp_print(netdissect_options *ndo, const u_char *dat, int length) in l2tp_avp_print() argument
604 ND_PRINT((ndo, " ")); in l2tp_avp_print()
629 ND_PRINT((ndo, "*")); in l2tp_avp_print()
633 ND_PRINT((ndo, "?")); in l2tp_avp_print()
639 ND_PRINT((ndo, "VENDOR%04x:", EXTRACT_16BITS(ptr))); ptr++; in l2tp_avp_print()
640 ND_PRINT((ndo, "ATTR%04x", EXTRACT_16BITS(ptr))); ptr++; in l2tp_avp_print()
641 ND_PRINT((ndo, "(")); in l2tp_avp_print()
642 print_octets(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
643 ND_PRINT((ndo, ")")); in l2tp_avp_print()
648 ND_PRINT((ndo, "%s", tok2str(l2tp_avp2str, "AVP-#%u", attr_type))); in l2tp_avp_print()
649 ND_PRINT((ndo, "(")); in l2tp_avp_print()
651 ND_PRINT((ndo, "???")); in l2tp_avp_print()
655 l2tp_msgtype_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
658 l2tp_result_code_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
661 l2tp_proto_ver_print(ndo, ptr, len-6); in l2tp_avp_print()
664 l2tp_framing_cap_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
667 l2tp_bearer_cap_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
671 ND_PRINT((ndo, "AVP too short")); in l2tp_avp_print()
674 print_octets(ndo, (const u_char *)ptr, 8); in l2tp_avp_print()
681 ND_PRINT((ndo, "AVP too short")); in l2tp_avp_print()
684 print_16bits_val(ndo, ptr); in l2tp_avp_print()
693 print_string(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
702 print_octets(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
705 l2tp_q931_cc_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
709 ND_PRINT((ndo, "AVP too short")); in l2tp_avp_print()
712 print_octets(ndo, (const u_char *)ptr, 16); in l2tp_avp_print()
721 ND_PRINT((ndo, "AVP too short")); in l2tp_avp_print()
724 print_32bits_val(ndo, (const uint32_t *)ptr); in l2tp_avp_print()
727 l2tp_bearer_type_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
730 l2tp_framing_type_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
733 l2tp_packet_proc_delay_print(ndo); in l2tp_avp_print()
736 l2tp_proxy_auth_type_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
739 l2tp_proxy_auth_id_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
742 l2tp_call_errors_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
745 l2tp_accm_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
750 l2tp_ppp_discon_cc_print(ndo, (const u_char *)ptr, len-6); in l2tp_avp_print()
756 ND_PRINT((ndo, ")")); in l2tp_avp_print()
759 l2tp_avp_print(ndo, dat+len, length-len); in l2tp_avp_print()
763 ND_PRINT((ndo, "|...")); in l2tp_avp_print()
768 l2tp_print(netdissect_options *ndo, const u_char *dat, u_int length) in l2tp_print() argument
780 ND_PRINT((ndo, " l2tp:")); in l2tp_print()
782 ND_PRINT((ndo, " l2f:")); in l2tp_print()
785 ND_PRINT((ndo, " Unknown Version, neither L2F(1) nor L2TP(2)")); in l2tp_print()
789 ND_PRINT((ndo, "[")); in l2tp_print()
792 ND_PRINT((ndo, "T")); in l2tp_print()
796 ND_PRINT((ndo, "L")); in l2tp_print()
800 ND_PRINT((ndo, "S")); in l2tp_print()
804 ND_PRINT((ndo, "O")); in l2tp_print()
807 ND_PRINT((ndo, "P")); in l2tp_print()
808 ND_PRINT((ndo, "]")); in l2tp_print()
823 ND_PRINT((ndo, "(%u/", EXTRACT_16BITS(ptr))); in l2tp_print()
827 ND_PRINT((ndo, "%u)", EXTRACT_16BITS(ptr))); in l2tp_print()
833 ND_PRINT((ndo, "Ns=%u,", EXTRACT_16BITS(ptr))); in l2tp_print()
837 ND_PRINT((ndo, "Nr=%u", EXTRACT_16BITS(ptr))); in l2tp_print()
851 ND_PRINT((ndo, " Length %u larger than packet", l2tp_len)); in l2tp_print()
857 ND_PRINT((ndo, " Length %u smaller than header length", length)); in l2tp_print()
862 ND_PRINT((ndo, " No length")); in l2tp_print()
866 ND_PRINT((ndo, " ZLB")); in l2tp_print()
868 l2tp_avp_print(ndo, ptr, length - cnt); in l2tp_print()
871 ND_PRINT((ndo, " {")); in l2tp_print()
872 ppp_print(ndo, ptr, length - cnt); in l2tp_print()
873 ND_PRINT((ndo, "}")); in l2tp_print()
879 ND_PRINT((ndo, "%s", tstr)); in l2tp_print()