Lines Matching full:length
44 * Length of an Ethernet header; note that some compilers may pad
136 ether_common_print(netdissect_options *ndo, const u_char *p, u_int length, in ether_common_print() argument
151 if (length < caplen) { in ether_common_print()
152 ND_PRINT("[length %u < caplen %u]", length, caplen); in ether_common_print()
154 return length; in ether_common_print()
164 orig_length = length; in ether_common_print()
176 length -= 2*MAC_ADDR_LEN; in ether_common_print()
190 length -= switch_tag_len; in ether_common_print()
196 * Get the length/type field, skip past it, and print it in ether_common_print()
202 length -= 2; in ether_common_print()
218 ND_PRINT(", length %u: ", orig_length); in ether_common_print()
222 int ret = macsec_print(ndo, &p, &length, &caplen, &hdrlen, in ether_common_print()
235 * Keep processing type/length fields. in ether_common_print()
240 length -= 2; in ether_common_print()
264 if (length < 4) { in ether_common_print()
267 return hdrlen + length; in ether_common_print()
274 ND_PRINT(", length %u: ", orig_length); in ether_common_print()
283 length -= 4; in ether_common_print()
289 * We now have the final length/type field. in ether_common_print()
293 * It's a length field, containing the length of the in ether_common_print()
297 if (length_type < length) { in ether_common_print()
298 length = length_type; in ether_common_print()
299 if (caplen > length) in ether_common_print()
300 caplen = length; in ether_common_print()
304 * Cut off the snapshot length to the end of the in ether_common_print()
307 if (!nd_push_snaplen(ndo, p, length)) { in ether_common_print()
315 ND_PRINT(", length %u: ", length); in ether_common_print()
319 * An LLC header follows the length. Print that and in ether_common_print()
322 llc_hdrlen = llc_print(ndo, p, length, caplen, &src, &dst); in ether_common_print()
342 llc_hdrlen = llc_print(ndo, p, length, caplen, &src, &dst); in ether_common_print()
355 if (length < 2) { in ether_common_print()
357 return hdrlen + length; in ether_common_print()
360 ND_PRINT(", length %u: ", orig_length); in ether_common_print()
361 int bytesConsumed = arista_ethertype_print(ndo, p, length); in ether_common_print()
364 length -= bytesConsumed; in ether_common_print()
373 ND_PRINT(", length %u: ", orig_length); in ether_common_print()
385 ND_PRINT(", length %u: ", orig_length); in ether_common_print()
389 if (ethertype_print(ndo, length_type, p, length, caplen, &src, &dst) == 0) { in ether_common_print()
401 ND_PRINT(", length %u: ", orig_length); in ether_common_print()
414 * length.
422 ether_switch_tag_print(netdissect_options *ndo, const u_char *p, u_int length, in ether_switch_tag_print() argument
427 return ether_common_print(ndo, p, length, caplen, print_switch_tag, in ether_switch_tag_print()
441 const u_char *p, u_int length, u_int caplen, in ether_print() argument
446 return ether_common_print(ndo, p, length, caplen, NULL, 0, in ether_print()
452 * to the ether header of the packet, 'h->len' is the length
467 * to the ether header of the packet, 'h->len' is the length
492 * to the ether header of the packet, 'h->len' is the length
528 u_int length, u_int caplen, in ethertype_print() argument
534 ip_print(ndo, p, length); in ethertype_print()
538 ip6_print(ndo, p, length); in ethertype_print()
543 arp_print(ndo, p, length, caplen); in ethertype_print()
547 decnet_print(ndo, p, length, caplen); in ethertype_print()
553 atalk_print(ndo, p, length); in ethertype_print()
557 aarp_print(ndo, p, length); in ethertype_print()
562 ipx_print(ndo, p, length); in ethertype_print()
566 if (length == 0 || caplen == 0) { in ethertype_print()
574 isoclns_print(ndo, p + 1, length - 1); in ethertype_print()
581 pppoe_print(ndo, p, length); in ethertype_print()
589 rtl_print(ndo, p, length, src, dst); in ethertype_print()
593 if (length) { in ethertype_print()
595 ppp_print(ndo, p, length); in ethertype_print()
600 mpcp_print(ndo, p, length); in ethertype_print()
604 slow_print(ndo, p, length); in ethertype_print()
609 cfm_print(ndo, p, length); in ethertype_print()
613 lldp_print(ndo, p, length); in ethertype_print()
617 nsh_print(ndo, p, length); in ethertype_print()
621 loopback_print(ndo, p, length); in ethertype_print()
626 mpls_print(ndo, p, length); in ethertype_print()
630 tipc_print(ndo, p, length, caplen); in ethertype_print()
639 geonet_print(ndo, p, length, src); in ethertype_print()
643 calm_fast_print(ndo, p, length, src); in ethertype_print()
647 aoe_print(ndo, p, length); in ethertype_print()
651 ptp_print(ndo, p, length); in ethertype_print()