Lines Matching full:dat

266 print_string(netdissect_options *ndo, const u_char *dat, u_int length)
270 fn_print_char(ndo, GET_U_1(dat));
271 dat++;
276 print_octets(netdissect_options *ndo, const u_char *dat, u_int length)
280 ND_PRINT("%02x", GET_U_1(dat));
281 dat++;
286 print_16bits_val(netdissect_options *ndo, const uint8_t *dat)
288 ND_PRINT("%u", GET_BE_U_2(dat));
292 print_32bits_val(netdissect_options *ndo, const uint8_t *dat)
294 ND_PRINT("%u", GET_BE_U_4(dat));
301 l2tp_msgtype_print(netdissect_options *ndo, const u_char *dat, u_int length)
308 GET_BE_U_2(dat)));
312 l2tp_result_code_print(netdissect_options *ndo, const u_char *dat, u_int length)
319 ND_PRINT("%u", GET_BE_U_2(dat));
320 dat += 2;
330 ND_PRINT("/%u", GET_BE_U_2(dat));
331 dat += 2;
338 print_string(ndo, dat, length);
342 l2tp_proto_ver_print(netdissect_options *ndo, const u_char *dat, u_int length)
348 ND_PRINT("%u.%u", (GET_BE_U_2(dat) >> 8),
349 (GET_BE_U_2(dat) & 0xff));
353 l2tp_framing_cap_print(netdissect_options *ndo, const u_char *dat, u_int length)
359 if (GET_BE_U_4(dat) & L2TP_FRAMING_CAP_ASYNC_MASK) {
362 if (GET_BE_U_4(dat) & L2TP_FRAMING_CAP_SYNC_MASK) {
368 l2tp_bearer_cap_print(netdissect_options *ndo, const u_char *dat, u_int length)
374 if (GET_BE_U_4(dat) & L2TP_BEARER_CAP_ANALOG_MASK) {
377 if (GET_BE_U_4(dat) & L2TP_BEARER_CAP_DIGITAL_MASK) {
383 l2tp_q931_cc_print(netdissect_options *ndo, const u_char *dat, u_int length)
389 print_16bits_val(ndo, dat);
390 ND_PRINT(", %02x", GET_U_1(dat + 2));
391 dat += 3;
395 print_string(ndo, dat, length);
400 l2tp_bearer_type_print(netdissect_options *ndo, const u_char *dat, u_int length)
406 if (GET_BE_U_4(dat) & L2TP_BEARER_TYPE_ANALOG_MASK) {
409 if (GET_BE_U_4(dat) & L2TP_BEARER_TYPE_DIGITAL_MASK) {
415 l2tp_framing_type_print(netdissect_options *ndo, const u_char *dat, u_int length)
421 if (GET_BE_U_4(dat) & L2TP_FRAMING_TYPE_ASYNC_MASK) {
424 if (GET_BE_U_4(dat) & L2TP_FRAMING_TYPE_SYNC_MASK) {
436 l2tp_proxy_auth_type_print(netdissect_options *ndo, const u_char *dat, u_int length)
443 "AuthType-#%u", GET_BE_U_2(dat)));
447 l2tp_proxy_auth_id_print(netdissect_options *ndo, const u_char *dat, u_int length)
453 ND_PRINT("%u", GET_BE_U_2(dat) & L2TP_PROXY_AUTH_ID_MASK);
457 l2tp_call_errors_print(netdissect_options *ndo, const u_char *dat, u_int length)
465 dat += 2; /* skip "Reserved" */
472 val = GET_BE_U_4(dat); dat += 4; length -= 4;
479 val = GET_BE_U_4(dat); dat += 4; length -= 4;
486 val = GET_BE_U_4(dat); dat += 4; length -= 4;
493 val = GET_BE_U_4(dat); dat += 4; length -= 4;
500 val = GET_BE_U_4(dat); dat += 4; length -= 4;
507 val = GET_BE_U_4(dat); dat += 4; length -= 4;
512 l2tp_accm_print(netdissect_options *ndo, const u_char *dat, u_int length)
520 dat += 2; /* skip "Reserved" */
527 val = GET_BE_U_4(dat); dat += 4; length -= 4;
534 val = GET_BE_U_4(dat); dat += 4; length -= 4;
539 l2tp_ppp_discon_cc_print(netdissect_options *ndo, const u_char *dat, u_int length)
546 ND_PRINT("%04x, ", GET_BE_U_2(dat));
547 dat += 2;
550 ND_PRINT("%04x ", GET_BE_U_2(dat));
551 dat += 2;
555 "Direction-#%u", GET_U_1(dat)));
556 dat++;
561 print_string(ndo, (const u_char *)dat, length);
566 l2tp_avp_print(netdissect_options *ndo, const u_char *dat, u_int length)
574 len = GET_BE_U_2(dat) & L2TP_AVP_HDR_LEN_MASK;
587 ND_TCHECK_LEN(dat, len);
595 if (GET_BE_U_2(dat) & L2TP_AVP_HDR_FLAG_MANDATORY) {
598 if (GET_BE_U_2(dat) & L2TP_AVP_HDR_FLAG_HIDDEN) {
602 dat += 2;
604 if (GET_BE_U_2(dat)) {
606 ND_PRINT("VENDOR%04x:", GET_BE_U_2(dat)); dat += 2;
607 ND_PRINT("ATTR%04x", GET_BE_U_2(dat)); dat += 2;
609 print_octets(ndo, dat, len-6);
613 dat += 2;
614 attr_type = GET_BE_U_2(dat); dat += 2;
622 l2tp_msgtype_print(ndo, dat, len-6);
625 l2tp_result_code_print(ndo, dat, len-6);
628 l2tp_proto_ver_print(ndo, dat, len-6);
631 l2tp_framing_cap_print(ndo, dat, len-6);
634 l2tp_bearer_cap_print(ndo, dat, len-6);
641 print_octets(ndo, dat, 8);
651 print_16bits_val(ndo, dat);
660 print_string(ndo, dat, len-6);
669 print_octets(ndo, dat, len-6);
672 l2tp_q931_cc_print(ndo, dat, len-6);
679 print_octets(ndo, dat, 16);
691 print_32bits_val(ndo, dat);
694 l2tp_bearer_type_print(ndo, dat, len-6);
697 l2tp_framing_type_print(ndo, dat, len-6);
703 l2tp_proxy_auth_type_print(ndo, dat, len-6);
706 l2tp_proxy_auth_id_print(ndo, dat, len-6);
709 l2tp_call_errors_print(ndo, dat, len-6);
712 l2tp_accm_print(ndo, dat, len-6);
717 l2tp_ppp_discon_cc_print(ndo, dat, len-6);
735 l2tp_print(netdissect_options *ndo, const u_char *dat, u_int length)
737 const u_char *ptr = dat;