diff options
author | guy <guy> | 2005-06-03 20:36:19 +0000 |
---|---|---|
committer | guy <guy> | 2005-06-03 20:36:19 +0000 |
commit | 98bddc13841e3900dd6980fdbf93f6130e8b2638 (patch) | |
tree | 1626762daccb4ab57cd58f8deeefd075cdd788b0 /pcap.h | |
parent | 3a1174ec74ffc1dd8f36ff2b304f9eb6f26c302a (diff) | |
download | libpcap-98bddc13841e3900dd6980fdbf93f6130e8b2638.tar.gz |
Add a "pcap_dump_ftell()" routine, to fetch the current offset of a
pcap_dumper_t. (Just doing an "ftell()" on the result of
"pcap_dump_file()" won't necessarily work on Windows, as Microsoft, in
their infinite wisdom, have multiple different versions of the C library
runtime, and if a DLL is built using one version, and another DLL or an
executable is built with another version, file descriptors and FILE *'s
opened in one of them cannot be used in the other.)
Diffstat (limited to 'pcap.h')
-rw-r--r-- | pcap.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.53 2005-05-03 18:54:02 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.54 2005-06-03 20:36:20 guy Exp $ (LBL) */ #ifndef lib_pcap_h @@ -254,10 +254,11 @@ int pcap_fileno(pcap_t *); pcap_dumper_t *pcap_dump_open(pcap_t *, const char *); pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp); +FILE *pcap_dump_file(pcap_dumper_t *); +long pcap_dump_ftell(pcap_dumper_t *); int pcap_dump_flush(pcap_dumper_t *); void pcap_dump_close(pcap_dumper_t *); void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *); -FILE *pcap_dump_file(pcap_dumper_t *); int pcap_findalldevs(pcap_if_t **, char *); void pcap_freealldevs(pcap_if_t *); |