Home
last modified time | relevance | path

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

123

/external/tcpdump/
Dprint-arcnet.c42 u_int length, u_int caplen);
113 u_int caplen = h->caplen; in arcnet_if_print() local
121 if (caplen < ARC_HDRLEN) { in arcnet_if_print()
123 return (caplen); in arcnet_if_print()
142 if (caplen < ARC_HDRNEWLEN) { in arcnet_if_print()
145 return (caplen); in arcnet_if_print()
149 if (caplen < ARC_HDRNEWLEN_EXC) { in arcnet_if_print()
152 return (caplen); in arcnet_if_print()
172 caplen -= archdrlen; in arcnet_if_print()
182 if (!arcnet_encap_print(arc_type, p, length, caplen)) in arcnet_if_print()
[all …]
Dprint-ether.c133 const u_char *p, u_int length, u_int caplen, in ether_print() argument
141 if (caplen < ETHER_HDRLEN || length < ETHER_HDRLEN) { in ether_print()
154 caplen -= ETHER_HDRLEN; in ether_print()
166 if (llc_print(p, length, caplen, ESRC(ep), EDST(ep), in ether_print()
176 ndo->ndo_default_print(ndo, p, caplen); in ether_print()
186 if (caplen < 4 || length < 4) { in ether_print()
204 caplen -= 4; in ether_print()
217 if (llc_print(p, length, caplen, ESRC(ep), EDST(ep), in ether_print()
227 ndo->ndo_default_print(ndo, p, caplen); in ether_print()
230 if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) { in ether_print()
[all …]
Dprint-llc.c151 llc_print(const u_char *p, u_int length, u_int caplen, in llc_print() argument
161 if (caplen < 3) { in llc_print()
163 default_print((u_char *)p, caplen); in llc_print()
187 if (caplen < 4) { in llc_print()
189 default_print((u_char *)p, caplen); in llc_print()
290 caplen -= 3; in llc_print()
294 caplen -= 4; in llc_print()
302 isoclns_print(p + 3, length - 3, caplen - 3); in llc_print()
313 ret = snap_print(p+3, length-3, caplen-3, 2); in llc_print()
349 caplen -= 3; in llc_print()
[all …]
Dprint-802_15_4.c96 u_int caplen = h->caplen; in ieee802_15_4_if_print() local
101 if (caplen < 3) { in ieee802_15_4_if_print()
102 ND_PRINT((ndo, "[|802.15.4] %x", caplen)); in ieee802_15_4_if_print()
103 return caplen; in ieee802_15_4_if_print()
112 caplen -= 3; in ieee802_15_4_if_print()
119 return caplen; in ieee802_15_4_if_print()
125 caplen -= hdrlen; in ieee802_15_4_if_print()
176 caplen -= hdrlen; in ieee802_15_4_if_print()
180 (ndo->ndo_default_print)(ndo, p, caplen); in ieee802_15_4_if_print()
Dprint-sll.c117 u_int caplen = h->caplen; in sll_if_print() local
123 if (caplen < SLL_HDR_LEN) { in sll_if_print()
130 return (caplen); in sll_if_print()
142 caplen -= SLL_HDR_LEN; in sll_if_print()
170 if (llc_print(p, length, caplen, NULL, NULL, in sll_if_print()
188 default_print(p, caplen); in sll_if_print()
196 if (caplen < 4 || length < 4) { in sll_if_print()
218 caplen -= 4; in sll_if_print()
221 if (ethertype_print(gndo, ether_type, p, length, caplen) == 0) { in sll_if_print()
226 default_print(p, caplen); in sll_if_print()
Dprint-atm.c138 atm_llc_print(const u_char *p, int length, int caplen) in atm_llc_print() argument
142 if (!llc_print(p, length, caplen, NULL, NULL, in atm_llc_print()
150 default_print(p, caplen); in atm_llc_print()
169 u_int caplen = h->caplen; in atm_if_print() local
174 if (caplen < 8) { in atm_if_print()
176 return (caplen); in atm_if_print()
183 isoclns_print(p+1, length-1, caplen-1); in atm_if_print()
222 caplen -= 20; in atm_if_print()
225 atm_llc_print(p, length, caplen); in atm_if_print()
252 sig_print(const u_char *p, int caplen) in sig_print() argument
[all …]
Dprint-symantec.c84 u_int caplen = h->caplen; in symantec_if_print() local
88 if (caplen < sizeof (struct symantec_header)) { in symantec_if_print()
90 return caplen; in symantec_if_print()
97 caplen -= sizeof (struct symantec_header); in symantec_if_print()
109 default_print(p, caplen); in symantec_if_print()
110 } else if (ethertype_print(gndo, ether_type, p, length, caplen) == 0) { in symantec_if_print()
116 default_print(p, caplen); in symantec_if_print()
Dprint-nflog.c77 u_int caplen = h->caplen; in nflog_if_print() local
80 if (caplen < (int) sizeof(nflog_hdr_t) || length < (int) sizeof(nflog_hdr_t)) { in nflog_if_print()
95 caplen -= sizeof(nflog_hdr_t); in nflog_if_print()
99 if (caplen < sizeof(nflog_tlv_t) || length < sizeof(nflog_tlv_t)) { in nflog_if_print()
118 if (caplen < size || length < size) { in nflog_if_print()
133 caplen -= sizeof(nflog_tlv_t); in nflog_if_print()
140 caplen -= size; in nflog_if_print()
161 ndo->ndo_default_print(ndo, p, caplen); in nflog_if_print()
Dprint-sunatm.c75 u_int caplen = h->caplen; in sunatm_if_print() local
81 if (caplen < PKT_BEGIN_POS) { in sunatm_if_print()
83 return (caplen); in sunatm_if_print()
112 caplen -= PKT_BEGIN_POS; in sunatm_if_print()
114 atm_print(vpi, vci, traftype, p, length, caplen); in sunatm_if_print()
Dprint-token.c102 token_print(const u_char *p, u_int length, u_int caplen) in token_print() argument
112 if (caplen < TOKEN_HDRLEN) { in token_print()
130 if (caplen < TOKEN_HDRLEN + 2) { in token_print()
136 if (caplen < hdr_len) { in token_print()
162 caplen -= hdr_len; in token_print()
167 if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in token_print()
179 default_print(p, caplen); in token_print()
188 default_print(p, caplen); in token_print()
202 return (token_print(p, h->len, h->caplen)); in token_if_print()
Dprint-bt.c53 u_int caplen = h->caplen; in bt_if_print() local
56 if (caplen < BT_HDRLEN) { in bt_if_print()
60 caplen -= BT_HDRLEN; in bt_if_print()
67 default_print(p, caplen); in bt_if_print()
Dprint-pflog.c117 u_int caplen = h->caplen; in pflog_if_print() local
122 if (caplen < sizeof(u_int8_t)) { in pflog_if_print()
124 return (caplen); in pflog_if_print()
135 if (caplen < hdrlen) { in pflog_if_print()
149 caplen -= hdrlen; in pflog_if_print()
174 default_print(p, caplen); in pflog_if_print()
Dprint-ap1394.c91 u_int caplen = h->caplen; in ap1394_if_print() local
95 if (caplen < FIREWIRE_HDRLEN) { in ap1394_if_print()
104 caplen -= FIREWIRE_HDRLEN; in ap1394_if_print()
109 if (ethertype_print(gndo, ether_type, p, length, caplen) == 0) { in ap1394_if_print()
115 default_print(p, caplen); in ap1394_if_print()
Dprint-null.c90 u_int caplen = h->caplen; in null_if_print() local
93 if (caplen < NULL_HDRLEN) { in null_if_print()
115 caplen -= NULL_HDRLEN; in null_if_print()
133 isoclns_print(p, length, caplen); in null_if_print()
149 default_print(p, caplen); in null_if_print()
Dprint-ipfc.c81 ipfc_print(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(p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in ipfc_print()
119 default_print(p, caplen); in ipfc_print()
132 ipfc_print(p, h->len, h->caplen); in ipfc_if_print()
Dprint-cip.c72 u_int caplen = h->caplen; in cip_if_print() local
76 if (memcmp(rfcllc, p, sizeof(rfcllc))==0 && caplen < RFC1483LLC_LEN) { in cip_if_print()
88 if (llc_print(p, length, caplen, NULL, NULL, in cip_if_print()
98 default_print(p, caplen); in cip_if_print()
Dprint-lane.c78 lane_print(const u_char *p, u_int length, u_int caplen) in lane_print() argument
82 if (caplen < sizeof(struct lane_controlhdr)) { in lane_print()
102 caplen -= 2; in lane_print()
109 ether_print(gndo, p, length, caplen, lane_hdr_print, p - 2); in lane_print()
115 lane_print(p, h->len, h->caplen); in lane_if_print()
Dprint-fddi.c242 fddi_print(const u_char *p, u_int length, u_int caplen) in fddi_print() argument
248 if (caplen < FDDI_HDRLEN) { in fddi_print()
264 caplen -= FDDI_HDRLEN; in fddi_print()
269 if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr), in fddi_print()
283 default_print(p, caplen); in fddi_print()
286 fddi_smt_print(p, caplen); in fddi_print()
293 default_print(p, caplen); in fddi_print()
306 fddi_print(p, h->len, h->caplen); in fddi_if_print()
Dprint-sl.c54 register u_int caplen = h->caplen; in sl_if_print() local
58 if (caplen < SLIP_HDRLEN) { in sl_if_print()
60 return (caplen); in sl_if_print()
89 register u_int caplen = h->caplen; in sl_bsdos_if_print() local
93 if (caplen < SLIP_HDRLEN) { in sl_bsdos_if_print()
95 return (caplen); in sl_bsdos_if_print()
Dprint-ipnet.c47 ipnet_print(struct netdissect_options *ndo, const u_char *p, u_int length, u_int caplen) in ipnet_print() argument
51 if (caplen < sizeof(ipnet_hdr_t)) { in ipnet_print()
60 caplen -= sizeof(ipnet_hdr_t); in ipnet_print()
82 ndo->ndo_default_print(ndo, p, caplen); in ipnet_print()
97 ipnet_print(ndo, p, h->len, h->caplen); in ipnet_if_print()
/external/libpcap/
Dpcap-common.c1102 if (hdr->caplen < offset) in swap_linux_usb_header()
1109 if (hdr->caplen < offset) in swap_linux_usb_header()
1116 if (hdr->caplen < offset) in swap_linux_usb_header()
1121 if (hdr->caplen < offset) in swap_linux_usb_header()
1126 if (hdr->caplen < offset) in swap_linux_usb_header()
1131 if (hdr->caplen < offset) in swap_linux_usb_header()
1136 if (hdr->caplen < offset) in swap_linux_usb_header()
1142 if (hdr->caplen < offset) in swap_linux_usb_header()
1147 if (hdr->caplen < offset) in swap_linux_usb_header()
1163 if (hdr->caplen < offset) in swap_linux_usb_header()
[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 > 65535) { 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-dag.c313 int caplen = 0; in dag_read() local
390 caplen = rlen; in dag_read()
413 if (caplen > packet_len) { in dag_read()
414 caplen = packet_len; in dag_read()
429 caplen = rlen - dag_record_size; in dag_read()
433 caplen = packet_len = ATM_CELL_SIZE; in dag_read()
439 caplen = rlen - dag_record_size - 4; in dag_read()
443 caplen = packet_len = ATM_CELL_SIZE; in dag_read()
461 caplen -= ATM_HDR_SIZE; in dag_read()
472 caplen = rlen - dag_record_size - 2; in dag_read()
[all …]
Ddlpisubs.c129 int n, caplen, origlen; in pcap_process_pkts() local
175 caplen = sbp->sbh_msglen; in pcap_process_pkts()
178 caplen = min(p->snapshot, len); in pcap_process_pkts()
180 bufp += caplen; in pcap_process_pkts()
183 if (bpf_filter(p->fcode.bf_insns, pk, origlen, caplen)) { in pcap_process_pkts()
191 pkthdr.caplen = caplen; in pcap_process_pkts()
193 if (pkthdr.caplen > p->snapshot) in pcap_process_pkts()
194 pkthdr.caplen = p->snapshot; in pcap_process_pkts()
Dpcap-septel.c83 int caplen = 0; in septel_read() local
134 caplen = p->snapshot ; in septel_read()
137 if (caplen > packet_len) { in septel_read()
139 caplen = packet_len; in septel_read()
142 if ((p->fcode.bf_insns == NULL) || bpf_filter(p->fcode.bf_insns, dp, packet_len, caplen)) { in septel_read()
161 pcap_header.caplen = caplen; in septel_read()

123