aboutsummaryrefslogtreecommitdiffstats
path: root/pcap.3
diff options
context:
space:
mode:
authorguy <guy>2005-06-03 20:36:19 +0000
committerguy <guy>2005-06-03 20:36:19 +0000
commit98bddc13841e3900dd6980fdbf93f6130e8b2638 (patch)
tree1626762daccb4ab57cd58f8deeefd075cdd788b0 /pcap.3
parent3a1174ec74ffc1dd8f36ff2b304f9eb6f26c302a (diff)
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.3')
-rw-r--r--pcap.312
1 files changed, 11 insertions, 1 deletions
diff --git a/pcap.3 b/pcap.3
index e028068..39ffcf5 100644
--- a/pcap.3
+++ b/pcap.3
@@ -1,4 +1,4 @@
-.\" @(#) $Header: /tcpdump/master/libpcap/Attic/pcap.3,v 1.67 2005-05-23 20:37:30 guy Exp $
+.\" @(#) $Header: /tcpdump/master/libpcap/Attic/pcap.3,v 1.68 2005-06-03 20:36:19 guy Exp $
.\"
.\" Copyright (c) 1994, 1996, 1997
.\" The Regents of the University of California. All rights reserved.
@@ -123,6 +123,7 @@ const char *pcap_lib_version(void)
.ft B
void pcap_close(pcap_t *p)
int pcap_dump_flush(pcap_dumper_t *p)
+long pcap_dump_ftell(pcap_dumper_t *p)
FILE *pcap_dump_file(pcap_dumper_t *p)
void pcap_dump_close(pcap_dumper_t *p)
.ft
@@ -1260,6 +1261,15 @@ but not yet written to the ``savefile'' will be written.
.B \-1
is returned on error, 0 on success.
.PP
+.B pcap_dump_ftell()
+returns the current file position for the ``savefile'', representing the
+number of bytes written by
+.B pcap_dump_open()
+and
+.BR pcap_dump() .
+.B \-1
+is returned on error.
+.PP
.B pcap_dump_close()
closes the ``savefile.''
.PP