Home | History | Annotate | Download | only in libpcap

Lines Matching refs:FILE

26  * a file, and then read them later.
27 * The first record in the file contains saved values for the machine
28 * dependent values so we can print the dump file on any architecture.
82 * because time is at a premium when we are writing the file.
91 * machine (if the file was written in little-end order).
117 * We don't write DLT_* values to the capture file header, because
160 * Do *NOT* assume that any values after the largest value in this file
162 * file, and new values after that one might have been assigned. Also,
303 * your private versions of capture-file-reading tools to read; in
854 sf_write_header(FILE *fp, int linktype, int thiszone, int snaplen)
888 * This is a savefile, not a live capture file, so never say
898 * This is a savefile, not a live capture file, so ignore
944 FILE *fp;
979 pcap_fopen_offline(FILE *fp, char *errbuf)
999 "error reading dump file: %s",
1003 "truncated dump file; tried to read %lu file header bytes, only got %lu",
1014 "bad dump file format");
1030 * the first two packets of the file with each of the
1042 snprintf(errbuf, PCAP_ERRBUF_SIZE, "archaic file format");
1058 * be in a packet in the file would be p->snapshot + 14.
1177 FILE *fp = p->sf.rfile;
1184 * libpcap, but if the file has the magic number for an
1192 "error reading dump file: %s",
1198 "truncated dump file; tried to read %d header bytes, only got %lu",
1274 "error reading dump file: %s",
1278 "truncated dump file; tried to read %u captured bytes, only got %lu",
1299 "error reading dump file: %s",
1303 "truncated dump file; tried to read %u captured bytes, only got %lu",
1313 * Print out packets stored in the file initialized by sf_read_init().
1362 * Output a packet to the initialized dump file.
1367 register FILE *f;
1370 f = (FILE *)user;
1381 pcap_setup_dump(pcap_t *p, int linktype, FILE *f, const char *fname)
1408 * Initialize so that sf_write() will output to the file named 'fname'.
1413 FILE *f;
1446 pcap_dump_fopen(pcap_t *p, FILE *f)
1461 FILE *
1464 return ((FILE *)p);
1470 return (ftell((FILE *)p));
1477 if (fflush((FILE *)p) == EOF)
1488 if (ferror((FILE *)p))
1492 (void)fclose((FILE *)p);