Lines Matching refs:caplen
195 * We interchanged the caplen and len fields at version 2.3,
201 * number of 543.0, and with the caplen and len fields in the
331 hdr->caplen = SWAPLONG(sf_hdr.caplen);
336 hdr->caplen = sf_hdr.caplen;
341 /* Swap the caplen and len fields, if necessary. */
348 if (hdr->caplen <= hdr->len) {
358 t = hdr->caplen;
359 hdr->caplen = hdr->len;
364 if (hdr->caplen > p->bufsize) {
368 * correctly in the savefile header. If the caplen isn't
374 if (hdr->caplen > 65535) {
380 if (tsize < hdr->caplen) {
381 tsize = ((hdr->caplen + 1023) / 1024) * 1024;
392 amt_read = fread((char *)tp, 1, hdr->caplen, fp);
393 if (amt_read != hdr->caplen) {
401 hdr->caplen, (unsigned long)amt_read);
407 * caplen > p->bufsize is exactly how we got here,
409 * and must drop the remainder. Adjust caplen accordingly,
413 hdr->caplen = p->bufsize;
417 amt_read = fread(p->buffer, 1, hdr->caplen, fp);
418 if (amt_read != hdr->caplen) {
426 hdr->caplen, (unsigned long)amt_read);
486 sf_hdr.caplen = h->caplen;
490 (void)fwrite(sp, h->caplen, 1, f);