Home
last modified time | relevance | path

Searched refs:caplen (Results 1 – 25 of 70) sorted by relevance

123

/external/tcpdump/
Dprint-arcnet.c104 u_int length, u_int caplen);
176 u_int caplen = h->caplen; in arcnet_if_print() local
184 if (caplen < ARC_HDRLEN || length < ARC_HDRLEN) { in arcnet_if_print()
186 return (caplen); in arcnet_if_print()
205 if (caplen < ARC_HDRNEWLEN || length < ARC_HDRNEWLEN) { in arcnet_if_print()
208 return (caplen); in arcnet_if_print()
212 if (caplen < ARC_HDRNEWLEN_EXC || length < ARC_HDRNEWLEN_EXC) { in arcnet_if_print()
215 return (caplen); in arcnet_if_print()
235 caplen -= archdrlen; in arcnet_if_print()
245 if (!arcnet_encap_print(ndo, arc_type, p, length, caplen)) in arcnet_if_print()
[all …]
Dprint-ether.c128 const u_char *p, u_int length, u_int caplen, in ether_print() argument
136 if (caplen < ETHER_HDRLEN || length < ETHER_HDRLEN) { in ether_print()
149 caplen -= ETHER_HDRLEN; in ether_print()
161 if (llc_print(ndo, p, length, caplen, ESRC(ep), EDST(ep), in ether_print()
171 ND_DEFAULTPRINT(p, caplen); in ether_print()
181 if (caplen < 4 || length < 4) { in ether_print()
196 caplen -= 4; in ether_print()
209 if (llc_print(ndo, p, length, caplen, ESRC(ep), EDST(ep), in ether_print()
219 ND_DEFAULTPRINT(p, caplen); in ether_print()
222 if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) { in ether_print()
[all …]
Dprint-atm.c131 const u_char *p, int length, int caplen) in atm_llc_print() argument
135 if (!llc_print(ndo, p, length, caplen, NULL, NULL, in atm_llc_print()
143 ND_DEFAULTPRINT(p, caplen); in atm_llc_print()
163 u_int caplen = h->caplen; in atm_if_print() local
168 if (caplen < 1 || length < 1) { in atm_if_print()
170 return (caplen); in atm_if_print()
177 isoclns_print(ndo, p + 1, length - 1, caplen - 1); in atm_if_print()
185 if (caplen < 3 || length < 3) { in atm_if_print()
187 return (caplen); in atm_if_print()
217 if (caplen < 20 || length < 20) { in atm_if_print()
[all …]
Dprint-llc.c144 llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, in llc_print() argument
154 if (caplen < 3 || length < 3) { in llc_print()
156 ND_DEFAULTPRINT((u_char *)p, caplen); in llc_print()
180 if (caplen < 4 || length < 4) { in llc_print()
182 ND_DEFAULTPRINT((u_char *)p, caplen); in llc_print()
243 if (caplen < 4 || length < 4) { in llc_print()
245 ND_DEFAULTPRINT((u_char *)p, caplen); in llc_print()
298 isoclns_print(ndo, p + 3, length - 3, caplen - 3); in llc_print()
309 ret = snap_print(ndo, p+3, length-3, caplen-3, 2); in llc_print()
369 snap_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, u_int bridge_pad) in snap_print() argument
[all …]
Dprint-802_15_4.c93 u_int caplen = h->caplen; in ieee802_15_4_if_print() local
98 if (caplen < 3) { in ieee802_15_4_if_print()
99 ND_PRINT((ndo, "[|802.15.4] %x", caplen)); in ieee802_15_4_if_print()
100 return caplen; in ieee802_15_4_if_print()
109 caplen -= 3; in ieee802_15_4_if_print()
116 return caplen; in ieee802_15_4_if_print()
122 caplen -= hdrlen; in ieee802_15_4_if_print()
173 caplen -= hdrlen; in ieee802_15_4_if_print()
177 ND_DEFAULTPRINT(p, caplen); in ieee802_15_4_if_print()
Dprint-sll.c197 u_int caplen = h->caplen; in sll_if_print() local
203 if (caplen < SLL_HDR_LEN) { in sll_if_print()
210 return (caplen); in sll_if_print()
222 caplen -= SLL_HDR_LEN; in sll_if_print()
250 if (llc_print(ndo, p, length, caplen, NULL, NULL, in sll_if_print()
268 ND_DEFAULTPRINT(p, caplen); in sll_if_print()
276 if (caplen < 4 || length < 4) { in sll_if_print()
295 caplen -= 4; in sll_if_print()
298 if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) { in sll_if_print()
303 ND_DEFAULTPRINT(p, caplen); in sll_if_print()
Dprint-nflog.c76 u_int caplen = h->caplen; in nflog_if_print() local
79 if (caplen < (int) sizeof(nflog_hdr_t) || length < (int) sizeof(nflog_hdr_t)) { in nflog_if_print()
94 caplen -= sizeof(nflog_hdr_t); in nflog_if_print()
98 if (caplen < sizeof(nflog_tlv_t) || length < sizeof(nflog_tlv_t)) { in nflog_if_print()
117 if (caplen < size || length < size) { in nflog_if_print()
132 caplen -= sizeof(nflog_tlv_t); in nflog_if_print()
139 caplen -= size; in nflog_if_print()
160 ND_DEFAULTPRINT(p, caplen); in nflog_if_print()
Dprint-symantec.c77 u_int caplen = h->caplen; in symantec_if_print() local
81 if (caplen < sizeof (struct symantec_header)) { in symantec_if_print()
83 return caplen; in symantec_if_print()
90 caplen -= sizeof (struct symantec_header); in symantec_if_print()
102 ND_DEFAULTPRINT(p, caplen); in symantec_if_print()
103 } else if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) { in symantec_if_print()
109 ND_DEFAULTPRINT(p, caplen); in symantec_if_print()
Dprint-sunatm.c68 u_int caplen = h->caplen; in sunatm_if_print() local
74 if (caplen < PKT_BEGIN_POS) { in sunatm_if_print()
76 return (caplen); in sunatm_if_print()
102 caplen -= PKT_BEGIN_POS; in sunatm_if_print()
104 atm_print(ndo, vpi, vci, traftype, p, length, caplen); in sunatm_if_print()
Dprint-pflog.c112 u_int caplen = h->caplen; in pflog_if_print() local
117 if (caplen < sizeof(uint8_t)) { in pflog_if_print()
119 return (caplen); in pflog_if_print()
130 if (caplen < hdrlen) { in pflog_if_print()
144 caplen -= hdrlen; in pflog_if_print()
171 ND_DEFAULTPRINT(p, caplen); in pflog_if_print()
Dprint-bt.c44 u_int caplen = h->caplen; in bt_if_print() local
47 if (caplen < BT_HDRLEN) { in bt_if_print()
51 caplen -= BT_HDRLEN; in bt_if_print()
58 ND_DEFAULTPRINT(p, caplen); in bt_if_print()
Dprint-null.c78 u_int caplen = h->caplen; in null_if_print() local
81 if (caplen < NULL_HDRLEN) { in null_if_print()
103 caplen -= NULL_HDRLEN; in null_if_print()
119 isoclns_print(ndo, p, length, caplen); in null_if_print()
135 ND_DEFAULTPRINT(p, caplen); in null_if_print()
Dprint-ap1394.c85 u_int caplen = h->caplen; in ap1394_if_print() local
89 if (caplen < FIREWIRE_HDRLEN) { in ap1394_if_print()
98 caplen -= FIREWIRE_HDRLEN; in ap1394_if_print()
103 if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) { in ap1394_if_print()
109 ND_DEFAULTPRINT(p, caplen); in ap1394_if_print()
Dprint-token.c149 token_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen) in token_print() argument
159 if (caplen < TOKEN_HDRLEN) { in token_print()
177 if (caplen < TOKEN_HDRLEN + 2) { in token_print()
183 if (caplen < hdr_len) { in token_print()
209 caplen -= hdr_len; in token_print()
214 if (llc_print(ndo, p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in token_print()
226 ND_DEFAULTPRINT(p, caplen); in token_print()
235 ND_DEFAULTPRINT(p, caplen); in token_print()
249 return (token_print(ndo, p, h->len, h->caplen)); in token_if_print()
Dprint-ipfc.c81 ipfc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen) in ipfc_print() argument
87 if (caplen < IPFC_HDRLEN) { in ipfc_print()
102 caplen -= IPFC_HDRLEN; in ipfc_print()
105 if (llc_print(ndo, p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in ipfc_print()
119 ND_DEFAULTPRINT(p, caplen); in ipfc_print()
132 ipfc_print(ndo, p, h->len, h->caplen); in ipfc_if_print()
Dprint-cip.c63 u_int caplen = h->caplen; in cip_if_print() local
67 if (memcmp(rfcllc, p, sizeof(rfcllc))==0 && caplen < RFC1483LLC_LEN) { in cip_if_print()
79 if (llc_print(ndo, p, length, caplen, NULL, NULL, in cip_if_print()
89 ND_DEFAULTPRINT(p, caplen); in cip_if_print()
Dprint-fddi.c282 fddi_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen) in fddi_print() argument
288 if (caplen < FDDI_HDRLEN) { in fddi_print()
304 caplen -= FDDI_HDRLEN; in fddi_print()
309 if (llc_print(ndo, p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in fddi_print()
323 ND_DEFAULTPRINT(p, caplen); in fddi_print()
326 fddi_smt_print(ndo, p, caplen); in fddi_print()
333 ND_DEFAULTPRINT(p, caplen); in fddi_print()
346 fddi_print(ndo, p, h->len, h->caplen); in fddi_if_print()
Dprint-ppi.c55 u_int caplen = h->caplen; in ppi_print() local
60 if (caplen < sizeof(ppi_header_t)) { in ppi_print()
71 if (caplen < len) { in ppi_print()
81 caplen -= len; in ppi_print()
93 ND_DEFAULTPRINT(p, caplen); in ppi_print()
Dprint-lane.c83 lane_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen) in lane_print() argument
87 if (caplen < sizeof(struct lane_controlhdr)) { in lane_print()
107 caplen -= 2; in lane_print()
114 ether_print(ndo, p, length, caplen, lane_hdr_print, p - 2); in lane_print()
120 lane_print(ndo, p, h->len, h->caplen); in lane_if_print()
/external/libpcap/
Dpcap-common.c1177 if (hdr->caplen < offset) in swap_linux_usb_header()
1184 if (hdr->caplen < offset) in swap_linux_usb_header()
1191 if (hdr->caplen < offset) in swap_linux_usb_header()
1196 if (hdr->caplen < offset) in swap_linux_usb_header()
1201 if (hdr->caplen < offset) in swap_linux_usb_header()
1206 if (hdr->caplen < offset) in swap_linux_usb_header()
1211 if (hdr->caplen < offset) in swap_linux_usb_header()
1217 if (hdr->caplen < offset) in swap_linux_usb_header()
1222 if (hdr->caplen < offset) in swap_linux_usb_header()
1249 if (hdr->caplen < offset) in swap_linux_usb_header()
[all …]
Dpcap-dag.c310 int caplen = 0; in dag_read() local
387 caplen = rlen; in dag_read()
410 if (caplen > packet_len) { in dag_read()
411 caplen = packet_len; in dag_read()
426 caplen = rlen - dag_record_size; in dag_read()
430 caplen = packet_len = ATM_CELL_SIZE; in dag_read()
436 caplen = rlen - dag_record_size - 4; in dag_read()
440 caplen -= (8 * num_ext_hdr); in dag_read()
443 caplen = packet_len = ATM_CELL_SIZE; in dag_read()
461 caplen -= ATM_HDR_SIZE; in dag_read()
[all …]
Dsf-pcap.c434 hdr->caplen = SWAPLONG(sf_hdr.caplen); in pcap_next_packet()
439 hdr->caplen = sf_hdr.caplen; in pcap_next_packet()
477 if (hdr->caplen <= hdr->len) { in pcap_next_packet()
487 t = hdr->caplen; in pcap_next_packet()
488 hdr->caplen = hdr->len; in pcap_next_packet()
493 if (hdr->caplen > p->bufsize) { in pcap_next_packet()
503 if (hdr->caplen > MAXIMUM_SNAPLEN) { in pcap_next_packet()
509 if (tsize < hdr->caplen) { in pcap_next_packet()
510 tsize = ((hdr->caplen + 1023) / 1024) * 1024; in pcap_next_packet()
521 amt_read = fread((char *)tp, 1, hdr->caplen, fp); in pcap_next_packet()
[all …]
Dpcap-win32.c237 register int caplen, hdrlen; in pcap_read_win32_npf() local
262 caplen = bhp->bh_caplen; in pcap_read_win32_npf()
277 bpf_filter(p->fcode.bf_insns, datap, bhp->bh_datalen, caplen)) { in pcap_read_win32_npf()
282 bp += Packet_WORDALIGN(caplen + hdrlen); in pcap_read_win32_npf()
292 bp += Packet_WORDALIGN(caplen + hdrlen); in pcap_read_win32_npf()
306 int packet_len = 0, caplen = 0; in pcap_read_win32_dag() local
357 caplen = ATM_SNAPLEN; in pcap_read_win32_dag()
365 caplen = erf_record_len - dag_record_size - 2; in pcap_read_win32_dag()
366 if (caplen > packet_len) in pcap_read_win32_dag()
368 caplen = packet_len; in pcap_read_win32_dag()
[all …]
Dpcap-septel.c78 int caplen = 0; in septel_read() local
129 caplen = p->snapshot ; in septel_read()
132 if (caplen > packet_len) { in septel_read()
134 caplen = packet_len; in septel_read()
137 if ((p->fcode.bf_insns == NULL) || bpf_filter(p->fcode.bf_insns, dp, packet_len, caplen)) { in septel_read()
156 pcap_header.caplen = caplen; in septel_read()
Ddlpisubs.c125 int n, caplen, origlen; in pcap_process_pkts() local
171 caplen = sbp->sbh_msglen; in pcap_process_pkts()
174 caplen = min(p->snapshot, len); in pcap_process_pkts()
176 bufp += caplen; in pcap_process_pkts()
179 if (bpf_filter(p->fcode.bf_insns, pk, origlen, caplen)) { in pcap_process_pkts()
187 pkthdr.caplen = caplen; in pcap_process_pkts()
189 if (pkthdr.caplen > p->snapshot) in pcap_process_pkts()
190 pkthdr.caplen = p->snapshot; in pcap_process_pkts()

123