diff options
Diffstat (limited to 'pcap_dump_ftell.3pcap')
-rw-r--r-- | pcap_dump_ftell.3pcap | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/pcap_dump_ftell.3pcap b/pcap_dump_ftell.3pcap index 6d5c828..20cb995 100644 --- a/pcap_dump_ftell.3pcap +++ b/pcap_dump_ftell.3pcap @@ -17,9 +17,9 @@ .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" -.TH PCAP_DUMP_FTELL 3PCAP "5 April 2008" +.TH PCAP_DUMP_FTELL 3PCAP "25 July 2018" .SH NAME -pcap_dump_ftell \- get the current file offset for a savefile being written +pcap_dump_ftell, pcap_dump_ftell64 \- get the current file offset for a savefile being written .SH SYNOPSIS .nf .ft B @@ -28,15 +28,31 @@ pcap_dump_ftell \- get the current file offset for a savefile being written .LP .ft B long pcap_dump_ftell(pcap_dumper_t *p); +.ft B +int64_t pcap_dump_ftell64(pcap_dumper_t *p); .ft .fi .SH DESCRIPTION .B pcap_dump_ftell() returns the current file position for the ``savefile'', representing the number of bytes written by -.B pcap_dump_open() +.B pcap_dump_open(3PCAP) and -.BR pcap_dump() . -\-1 is returned on error. +.BR pcap_dump(3PCAP) . +.B PCAP_ERROR +is returned on error. If the current file position does not fit in a +.BR long , +it will be truncated; this can happen on 32-bit UNIX-like systems with +large file support and on Windows. +.B pcap_dump_ftell64() +returns the current file position in a +.BR int64_t , +so if file offsets that don't fit in a +.B long +but that fit in a +.B int64_t +are supported, this will return the file offset without truncation. +.B PCAP_ERROR +is returned on error. .SH SEE ALSO -pcap(3PCAP), pcap_dump_open(3PCAP), pcap_dump(3PCAP) +pcap(3PCAP) |