]> The Tcpdump Group git mirrors - tcpdump/commit
Move the code to handle the "-C" flag into "tcpdump.c" from
authorguy <guy>
Wed, 3 Oct 2001 07:35:42 +0000 (07:35 +0000)
committerguy <guy>
Wed, 3 Oct 2001 07:35:42 +0000 (07:35 +0000)
commit8c98c4eb4b0aded15e059a915aa3e07fce21e4ff
tree647a7d8ed77259559b36b140234eea82fa346b0d
parentbe7b63b1530c6e305c3e8e5b7912ecf3e70bc9df
Move the code to handle the "-C" flag into "tcpdump.c" from
"pcap-dump-trunc.c".

Don't make the variables "dump_and_trunc()" manipulates external or even
static; fill in a structure with their values and pass a pointer to that
structure to "dump_and_trunc()".  "dump_and_trunc()" will update the
"pcap_dumper_t" pointer in that structure if it rotates capture files,
so that the next call to "dump_and_trunc()" will supply the updated
pointer (the previous code was just opening a new capture, but not
updating the variable passed to "dump_and_trunc()").

Instead of duplicating an old version of the "pcap_dump()" code (a
version that didn't write out time stamps as 32-bit seconds and
microsecond values on platforms where the fields in a "struct timeval"
are 64-bit) in "dump_and_trunc()", just call "pcap_dump()" from
"dump_and_trunc()".
Makefile.in
interface.h
pcap-dump-trunc.c [deleted file]
tcpdump.c