Lines Matching full:length

36 #define L2TP_FLAG_LENGTH	0x4000	/* Length */
47 #define L2TP_AVP_HDR_LEN_MASK 0x03ff /* Length Mask */
251 "Length is wrong",
266 print_string(netdissect_options *ndo, const u_char *dat, u_int length)
269 for (i=0; i<length; i++) {
276 print_octets(netdissect_options *ndo, const u_char *dat, u_int length)
279 for (i=0; i<length; i++) {
301 l2tp_msgtype_print(netdissect_options *ndo, const u_char *dat, u_int length)
303 if (length < 2) {
312 l2tp_result_code_print(netdissect_options *ndo, const u_char *dat, u_int length)
315 if (length < 2) {
321 length -= 2;
324 if (length == 0)
326 if (length < 2) {
332 length -= 2;
335 if (length == 0)
338 print_string(ndo, dat, length);
342 l2tp_proto_ver_print(netdissect_options *ndo, const u_char *dat, u_int length)
344 if (length < 2) {
353 l2tp_framing_cap_print(netdissect_options *ndo, const u_char *dat, u_int length)
355 if (length < 4) {
368 l2tp_bearer_cap_print(netdissect_options *ndo, const u_char *dat, u_int length)
370 if (length < 4) {
383 l2tp_q931_cc_print(netdissect_options *ndo, const u_char *dat, u_int length)
385 if (length < 3) {
392 length -= 3;
393 if (length != 0) {
395 print_string(ndo, dat, length);
400 l2tp_bearer_type_print(netdissect_options *ndo, const u_char *dat, u_int length)
402 if (length < 4) {
415 l2tp_framing_type_print(netdissect_options *ndo, const u_char *dat, u_int length)
417 if (length < 4) {
436 l2tp_proxy_auth_type_print(netdissect_options *ndo, const u_char *dat, u_int length)
438 if (length < 2) {
447 l2tp_proxy_auth_id_print(netdissect_options *ndo, const u_char *dat, u_int length)
449 if (length < 2) {
457 l2tp_call_errors_print(netdissect_options *ndo, const u_char *dat, u_int length)
461 if (length < 2) {
466 length -= 2;
468 if (length < 4) {
472 val = GET_BE_U_4(dat); dat += 4; length -= 4;
475 if (length < 4) {
479 val = GET_BE_U_4(dat); dat += 4; length -= 4;
482 if (length < 4) {
486 val = GET_BE_U_4(dat); dat += 4; length -= 4;
489 if (length < 4) {
493 val = GET_BE_U_4(dat); dat += 4; length -= 4;
496 if (length < 4) {
500 val = GET_BE_U_4(dat); dat += 4; length -= 4;
503 if (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)
516 if (length < 2) {
521 length -= 2;
523 if (length < 4) {
527 val = GET_BE_U_4(dat); dat += 4; length -= 4;
530 if (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)
541 if (length < 5) {
548 length -= 2;
552 length -= 2;
557 length--;
559 if (length != 0) {
561 print_string(ndo, (const u_char *)dat, length);
566 l2tp_avp_print(netdissect_options *ndo, const u_char *dat, u_int length)
573 /* Flags & Length */
580 /* If it goes past the end of the remaining length of the packet,
582 if (len > (u_int)length)
585 /* If it goes past the end of the remaining length of the captured
591 * the length of the captured data; however, we *do* need to
735 l2tp_print(netdissect_options *ndo, const u_char *dat, u_int length)
814 if (length < l2tp_len) {
815 ND_PRINT(" Length %u larger than packet", l2tp_len);
818 length = l2tp_len;
820 if (length < cnt) {
821 ND_PRINT(" Length %u smaller than header length", length);
826 ND_PRINT(" No length");
829 if (length - cnt == 0) {
835 while (length - cnt != 0) {
838 avp_length = l2tp_avp_print(ndo, ptr, length - cnt);
851 ppp_print(ndo, ptr, length - cnt);