summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcap.3pcap.in6
-rw-r--r--pcap_breakloop.3pcap15
-rw-r--r--pcap_compile.3pcap.in9
-rw-r--r--pcap_datalink_name_to_val.3pcap6
-rw-r--r--pcap_dump_flush.3pcap6
-rw-r--r--pcap_dump_ftell.3pcap9
-rw-r--r--pcap_fileno.3pcap5
-rw-r--r--pcap_findalldevs.3pcap11
-rw-r--r--pcap_get_required_select_timeout.3pcap9
-rw-r--r--pcap_get_selectable_fd.3pcap21
-rw-r--r--pcap_inject.3pcap14
-rw-r--r--pcap_list_datalinks.3pcap.in4
-rw-r--r--pcap_lookupnet.3pcap9
-rw-r--r--pcap_loop.3pcap24
-rw-r--r--pcap_next_ex.3pcap11
-rw-r--r--pcap_set_datalink.3pcap9
-rw-r--r--pcap_setdirection.3pcap9
-rw-r--r--pcap_setfilter.3pcap9
-rw-r--r--pcap_setnonblock.3pcap10
-rw-r--r--pcap_stats.3pcap11
20 files changed, 137 insertions, 70 deletions
diff --git a/pcap.3pcap.in b/pcap.3pcap.in
index 397fa864..8736adff 100644
--- a/pcap.3pcap.in
+++ b/pcap.3pcap.in
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP 3PCAP "20 April 2018"
+.TH PCAP 3PCAP "25 July 2018"
.SH NAME
pcap \- Packet Capture library
.SH SYNOPSIS
@@ -638,7 +638,9 @@ from the device.
.PP
Not all handles have such a descriptor available;
.BR pcap_get_selectable_fd ()
-will return \-1 if no such descriptor is available. If no such
+will return
+.B PCAP_ERROR
+if no such descriptor is available. If no such
descriptor is available, this may be because the device must be polled
periodically for packets; in that case,
.BR pcap_get_required_select_timeout ()
diff --git a/pcap_breakloop.3pcap b/pcap_breakloop.3pcap
index f3cb52e2..cc000d2e 100644
--- a/pcap_breakloop.3pcap
+++ b/pcap_breakloop.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_BREAKLOOP 3PCAP "8 November 2017"
+.TH PCAP_BREAKLOOP 3PCAP "25 July 2018"
.SH NAME
pcap_breakloop \- force a pcap_dispatch() or pcap_loop() call to return
.SH SYNOPSIS
@@ -37,8 +37,9 @@ sets a flag that will force
or
.B pcap_loop(3PCAP)
to return rather than looping; they will return the number of packets
-that have been processed so far, or \-2 if no packets have been
-processed so far.
+that have been processed so far, or
+.B PCAP_ERROR_BREAK
+if no packets have been processed so far.
.PP
This routine is safe to use inside a signal handler on UNIX or a console
control handler on Windows, as it merely sets a flag that is checked
@@ -99,12 +100,16 @@ or
.B pcap_loop()
after it is called; at most one more packet might be processed.
.PP
-If \-2 is returned from
+If
+.B PCAP_ERROR_BREAK
+is returned from
.B pcap_dispatch()
or
.BR pcap_loop() ,
the flag is cleared, so a subsequent call will resume reading packets.
If a positive number is returned, the flag is not cleared, so a
-subsequent call will return \-2 and clear the flag.
+subsequent call will return
+.B PCAP_ERROR_BREAK
+and clear the flag.
.SH SEE ALSO
pcap(3PCAP)
diff --git a/pcap_compile.3pcap.in b/pcap_compile.3pcap.in
index bc38e9ec..31a64e6c 100644
--- a/pcap_compile.3pcap.in
+++ b/pcap_compile.3pcap.in
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_COMPILE 3PCAP "24 March 2017"
+.TH PCAP_COMPILE 3PCAP "25 July 2018"
.SH NAME
pcap_compile \- compile a filter expression
.SH SYNOPSIS
@@ -67,8 +67,11 @@ in multiple threads in a single process without some form of mutual
exclusion allowing only one thread to call it at any given time.
.SH RETURN VALUE
.B pcap_compile()
-returns 0 on success and \-1 on failure.
-If \-1 is returned,
+returns 0 on success and
+.B PCAP_ERROR
+on failure. If
+.B PCAP_ERROR
+is returned,
.B pcap_geterr(3PCAP)
or
.B pcap_perror(3PCAP)
diff --git a/pcap_datalink_name_to_val.3pcap b/pcap_datalink_name_to_val.3pcap
index e6419f25..dd4688f0 100644
--- a/pcap_datalink_name_to_val.3pcap
+++ b/pcap_datalink_name_to_val.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_DATALINK_NAME_TO_VAL 3PCAP "12 October 2016"
+.TH PCAP_DATALINK_NAME_TO_VAL 3PCAP "25 July 2018"
.SH NAME
pcap_datalink_name_to_val \- get the link-layer header type value
corresponding to a header type name
@@ -41,7 +41,9 @@ removed, to the corresponding link-layer header type value. The
translation is case-insensitive.
.SH RETURN VALUE
.B pcap_datalink_name_to_val()
-returns the type value on success and \-1 if the name is not a known
+returns the type value on success and
+.B PCAP_ERROR
+if the name is not a known
type name..
.SH SEE ALSO
pcap(3PCAP)
diff --git a/pcap_dump_flush.3pcap b/pcap_dump_flush.3pcap
index a2bd1418..5d174745 100644
--- a/pcap_dump_flush.3pcap
+++ b/pcap_dump_flush.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_DUMP_FLUSH 3PCAP "3 January 2014"
+.TH PCAP_DUMP_FLUSH 3PCAP "25 July 2018"
.SH NAME
pcap_dump_flush \- flush to a savefile packets dumped
.SH SYNOPSIS
@@ -38,6 +38,8 @@ written with
but not yet written to the ``savefile'' will be written.
.SH RETURN VALUE
.B pcap_dump_flush()
-returns 0 on success and \-1 on failure.
+returns 0 on success and
+.B PCAP_ERROR
+on failure.
.SH SEE ALSO
pcap(3PCAP), pcap_dump_open(3PCAP)
diff --git a/pcap_dump_ftell.3pcap b/pcap_dump_ftell.3pcap
index a5af338f..20cb995e 100644
--- a/pcap_dump_ftell.3pcap
+++ b/pcap_dump_ftell.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_DUMP_FTELL 3PCAP "29 September 2017"
+.TH PCAP_DUMP_FTELL 3PCAP "25 July 2018"
.SH NAME
pcap_dump_ftell, pcap_dump_ftell64 \- get the current file offset for a savefile being written
.SH SYNOPSIS
@@ -39,8 +39,8 @@ number of bytes written by
.B pcap_dump_open(3PCAP)
and
.BR pcap_dump(3PCAP) .
-\-1 is returned on error.
-If the current file position does not fit in a
+.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.
@@ -52,6 +52,7 @@ so if file offsets that don't fit in a
but that fit in a
.B int64_t
are supported, this will return the file offset without truncation.
-\-1 is returned on error.
+.B PCAP_ERROR
+is returned on error.
.SH SEE ALSO
pcap(3PCAP)
diff --git a/pcap_fileno.3pcap b/pcap_fileno.3pcap
index 03465188..60ac1294 100644
--- a/pcap_fileno.3pcap
+++ b/pcap_fileno.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_FILENO 3PCAP "7 April 2014"
+.TH PCAP_FILENO 3PCAP "25 July 2018"
.SH NAME
pcap_fileno \- get the file descriptor for a live capture
.SH SYNOPSIS
@@ -59,6 +59,7 @@ that was created with
.B pcap_create()
but that has not yet been activated with
.BR pcap_activate() ,
-it returns \-1.
+it returns
+.BR PCAP_ERROR .
.SH SEE ALSO
pcap(3PCAP)
diff --git a/pcap_findalldevs.3pcap b/pcap_findalldevs.3pcap
index e2bd12bb..dc52c2e8 100644
--- a/pcap_findalldevs.3pcap
+++ b/pcap_findalldevs.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_FINDALLDEVS 3PCAP "29 April 2018"
+.TH PCAP_FINDALLDEVS 3PCAP "25 July 2018"
.SH NAME
pcap_findalldevs, pcap_freealldevs \- get a list of capture devices, and
free that list
@@ -199,10 +199,13 @@ which frees the list pointed to by
.IR alldevs .
.SH RETURN VALUE
.B pcap_findalldevs()
-returns 0 on success and \-1 on failure; as indicated, finding no
+returns 0 on success and
+.B PCAP_ERROR
+on failure; as indicated, finding no
devices is considered success, rather than failure, so 0 will be
-returned in that case.
-If \-1 is returned,
+returned in that case. If
+.B PCAP_ERROR
+is returned,
.I errbuf
is filled in with an appropriate error message.
.I errbuf
diff --git a/pcap_get_required_select_timeout.3pcap b/pcap_get_required_select_timeout.3pcap
index ecae7a5c..bc0ab779 100644
--- a/pcap_get_required_select_timeout.3pcap
+++ b/pcap_get_required_select_timeout.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_GET_REQUIRED_SELECT_TIMEOUT 3PCAP "20 January 2018"
+.TH PCAP_GET_REQUIRED_SELECT_TIMEOUT 3PCAP "25 July 2018"
.SH NAME
pcap_get_required_select_timeout \- get a file descriptor on which a
select() can be done for a live capture
@@ -43,7 +43,8 @@ and
.B kevent()
calls if
.B pcap_get_selectable_fd(3PCAP)
-returns \-1.
+returns
+.BR PCAP_ERROR .
.PP
The timeout that should be used in those calls must be no larger than
the smallest of all timeouts returned by
@@ -52,7 +53,9 @@ for devices from which packets will be captured.
.PP
The device for which
.B pcap_get_selectable_fd()
-returned \-1 must be put in non-blocking mode with
+returned
+.B PCAP_ERROR
+must be put in non-blocking mode with
.BR pcap_setnonblock(3PCAP) ,
and an attempt must always be made to read packets from the device
when the
diff --git a/pcap_get_selectable_fd.3pcap b/pcap_get_selectable_fd.3pcap
index c7b31607..7f43db39 100644
--- a/pcap_get_selectable_fd.3pcap
+++ b/pcap_get_selectable_fd.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_GET_SELECTABLE_FD 3PCAP "20 January 2018"
+.TH PCAP_GET_SELECTABLE_FD 3PCAP "25 July 2018"
.SH NAME
pcap_get_selectable_fd \- get a file descriptor on which a select() can
be done for a live capture
@@ -42,7 +42,9 @@ do a
.BR kevent() ,
or other such call
to wait for it to be possible to read packets without blocking, if such
-a descriptor exists, or \-1, if no such descriptor exists.
+a descriptor exists, or
+.BR PCAP_ERROR ,
+if no such descriptor exists.
.PP
Some network devices opened with
.B pcap_create(3PCAP)
@@ -51,17 +53,21 @@ and
or with
.BR pcap_open_live(3PCAP) ,
do not support those calls (for example, regular network devices on
-FreeBSD 4.3 and 4.4, and Endace DAG devices), so \-1 is returned for
+FreeBSD 4.3 and 4.4, and Endace DAG devices), so
+.B PCAP_ERROR
+is returned for
those devices. In that case, those calls must be given a timeout less
than or equal to the timeout returned by
.B pcap_get_required_select_timeout(3PCAP)
for the device for which
.B pcap_get_selectable_fd()
-returned \-1, the device must be put in non-blocking mode with a call to
-.BR pcap_setnonblock(3PCAP) ,
+returned
+.BR PCAP_ERROR ,
+the device must be put in non-blocking mode with a call to
+.BR \%pcap_setnonblock(3PCAP) ,
and an attempt must always be made to read packets from the device
when the call returns. If
-.B pcap_get_required_select_timeout()
+.B \%pcap_get_required_select_timeout()
returns
.BR NULL ,
it is not possible to wait for packets to arrive on the device in an
@@ -138,7 +144,8 @@ work on that descriptor in Mac OS X 10.6 and later.
.B pcap_get_selectable_fd()
is not available on Windows.
.SH RETURN VALUE
-A selectable file descriptor is returned if one exists; otherwise, \-1
+A selectable file descriptor is returned if one exists; otherwise,
+.B PCAP_ERROR
is returned.
.SH SEE ALSO
pcap(3PCAP), kqueue(2)
diff --git a/pcap_inject.3pcap b/pcap_inject.3pcap
index 821f4211..92a92638 100644
--- a/pcap_inject.3pcap
+++ b/pcap_inject.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_INJECT 3PCAP "3 January 2014"
+.TH PCAP_INJECT 3PCAP "25 July 2018"
.SH NAME
pcap_inject, pcap_sendpacket \- transmit a packet
.SH SYNOPSIS
@@ -72,12 +72,18 @@ comes from OpenBSD;
comes from WinPcap. Both are provided for compatibility.)
.SH RETURN VALUE
.B pcap_inject()
-returns the number of bytes written on success and \-1 on failure.
+returns the number of bytes written on success and
+.B PCAP_ERROR
+on failure.
.PP
.B pcap_sendpacket()
-returns 0 on success and \-1 on failure.
+returns 0 on success and
+.B PCAP_ERROR
+on failure.
.PP
-If \-1 is returned,
+If
+.B PCAP_ERROR
+is returned,
.B pcap_geterr(3PCAP)
or
.B pcap_perror(3PCAP)
diff --git a/pcap_list_datalinks.3pcap.in b/pcap_list_datalinks.3pcap.in
index d0c5afd1..60ba478f 100644
--- a/pcap_list_datalinks.3pcap.in
+++ b/pcap_list_datalinks.3pcap.in
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_LIST_DATALINKS 3PCAP "8 March 2015"
+.TH PCAP_LIST_DATALINKS 3PCAP "25 July 2018"
.SH NAME
pcap_list_datalinks, pcap_free_datalinks \- get a list of link-layer header
types supported by a capture device, and free that list
@@ -57,7 +57,7 @@ returns the number of link-layer header types in the array on success,
if called on a capture handle that has been created but not activated,
and
.B PCAP_ERROR
-(\-1) on other errors.
+on other errors.
If
.B PCAP_ERROR
is returned,
diff --git a/pcap_lookupnet.3pcap b/pcap_lookupnet.3pcap
index c38ff3a8..f6094453 100644
--- a/pcap_lookupnet.3pcap
+++ b/pcap_lookupnet.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_LOOKUPNET 3PCAP "3 January 2014"
+.TH PCAP_LOOKUPNET 3PCAP "25 July 2018"
.SH NAME
pcap_lookupnet \- find the IPv4 network number and netmask for a device
.SH SYNOPSIS
@@ -51,8 +51,11 @@ are
pointers.
.SH RETURN VALUE
.B pcap_lookupnet()
-returns 0 on success and \-1 on failure.
-If \-1 is returned,
+returns 0 on success and
+.B PCAP_ERROR
+on failure. If
+.B PCAP_ERROR
+is returned,
.I errbuf
is filled in with an appropriate error message.
.I errbuf
diff --git a/pcap_loop.3pcap b/pcap_loop.3pcap
index de140da1..0193714b 100644
--- a/pcap_loop.3pcap
+++ b/pcap_loop.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_LOOP 3PCAP "20 January 2017"
+.TH PCAP_LOOP 3PCAP "25 July 2018"
.SH NAME
pcap_loop, pcap_dispatch \- process packets from a live capture or savefile
.SH SYNOPSIS
@@ -160,8 +160,11 @@ for Ethernet.
returns 0 if
.I cnt
is exhausted or if, when reading from a ``savefile'', no more packets
-are available. It returns \-1 if an error occurs or \-2 if the loop
-terminated due to a call to
+are available. It returns
+.B PCAP_ERROR
+if an error occurs or
+.B PCAP_ERROR_BREAK
+if the loop terminated due to a call to
.B pcap_breakloop()
before any packets were processed.
It does
@@ -177,17 +180,22 @@ platforms that support a packet buffer timeout that starts before any
packets arrive, the timeout expires before any packets arrive, or if the
file descriptor for the capture device is in non-blocking mode and no
packets were available to be read) or if no more packets are available
-in a ``savefile.'' It returns \-1 if an error occurs or \-2 if the loop
-terminated due to a call to
+in a ``savefile.'' It returns
+.B PCAP_ERROR
+if an error occurs or
+.B PCAP_ERROR_BREAK
+if the loop terminated due to a call to
.B pcap_breakloop()
before any packets were processed.
.ft B
If your application uses pcap_breakloop(),
-make sure that you explicitly check for \-1 and \-2, rather than just
-checking for a return value < 0.
+make sure that you explicitly check for PCAP_ERROR and PCAP_ERROR_BREAK,
+rather than just checking for a return value < 0.
.ft R
.PP
-If \-1 is returned,
+If
+.B PCAP_ERROR
+is returned,
.B pcap_geterr(3PCAP)
or
.B pcap_perror(3PCAP)
diff --git a/pcap_next_ex.3pcap b/pcap_next_ex.3pcap
index 983d4100..f0eb82d1 100644
--- a/pcap_next_ex.3pcap
+++ b/pcap_next_ex.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_NEXT_EX 3PCAP "20 January 2017"
+.TH PCAP_NEXT_EX 3PCAP "25 July 2018"
.SH NAME
pcap_next_ex, pcap_next \- read the next packet from a pcap_t
.SH SYNOPSIS
@@ -114,9 +114,14 @@ for Ethernet.
.B pcap_next_ex()
returns 1 if the packet was read without problems, 0 if packets are
being read from a live capture and the packet buffer timeout expired,
-\-1 if an error occurred while reading the packet, and \-2 if packets
+.B PCAP_ERROR
+if an error occurred while reading the packet, and
+.B PCAP_ERROR_BREAK
+if packets
are being read from a ``savefile'' and there are no more packets to read
-from the savefile. If \-1 is returned,
+from the savefile. If
+.B PCAP_ERROR
+is returned,
.B pcap_geterr(3PCAP)
or
.B pcap_perror(3PCAP)
diff --git a/pcap_set_datalink.3pcap b/pcap_set_datalink.3pcap
index 7613a58a..66cfdb1e 100644
--- a/pcap_set_datalink.3pcap
+++ b/pcap_set_datalink.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_SET_DATALINK 3PCAP "3 January 2014"
+.TH PCAP_SET_DATALINK 3PCAP "25 July 2018"
.SH NAME
pcap_set_datalink \- set the link-layer header type to be used by a
capture device
@@ -38,8 +38,11 @@ to the type specified by
.IR dlt .
.SH RETURN VALUE
.B pcap_set_datalink()
-returns 0 on success and \-1 on failure.
-If \-1 is returned,
+returns 0 on success and
+.B PCAP_ERROR
+on failure. If
+.B PCAP_ERROR
+is returned,
.B pcap_geterr(3PCAP)
or
.B pcap_perror(3PCAP)
diff --git a/pcap_setdirection.3pcap b/pcap_setdirection.3pcap
index 11fef513..f174b98f 100644
--- a/pcap_setdirection.3pcap
+++ b/pcap_setdirection.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_SETDIRECTION 3PCAP "8 March 2015"
+.TH PCAP_SETDIRECTION 3PCAP "25 July 2018"
.SH NAME
pcap_setdirection \- set the direction for which packets will be captured
.SH SYNOPSIS
@@ -57,8 +57,11 @@ support
This operation is not supported if a ``savefile'' is being read.
.SH RETURN VALUE
.B pcap_setdirection()
-returns 0 on success and \-1 on failure.
-If \-1 is returned,
+returns 0 on success and
+.B PCAP_ERROR
+on failure. If
+.B PCAP_ERROR
+is returned,
.B pcap_geterr(3PCAP)
or
.B pcap_perror(3PCAP)
diff --git a/pcap_setfilter.3pcap b/pcap_setfilter.3pcap
index ca910127..87296939 100644
--- a/pcap_setfilter.3pcap
+++ b/pcap_setfilter.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_SETFILTER 3PCAP "7 April 2014"
+.TH PCAP_SETFILTER 3PCAP "25 July 2018"
.SH NAME
pcap_setfilter \- set the filter
.SH SYNOPSIS
@@ -40,8 +40,11 @@ struct, usually the result of a call to
.BR \%pcap_compile(3PCAP) .
.SH RETURN VALUE
.B pcap_setfilter()
-returns 0 on success and \-1 on failure.
-If \-1 is returned,
+returns 0 on success and
+.B PCAP_ERROR
+on failure. If
+.B PCAP_ERROR
+is returned,
.B pcap_geterr(3PCAP)
or
.B pcap_perror(3PCAP)
diff --git a/pcap_setnonblock.3pcap b/pcap_setnonblock.3pcap
index 1b138b80..e8adebea 100644
--- a/pcap_setnonblock.3pcap
+++ b/pcap_setnonblock.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_SETNONBLOCK 3PCAP "18 October 2014"
+.TH PCAP_SETNONBLOCK 3PCAP "25 July 2018"
.SH NAME
pcap_setnonblock, pcap_getnonblock \- set or get the state of
non-blocking mode on a capture device
@@ -43,7 +43,9 @@ puts a capture handle into ``non-blocking'' mode, or takes it out
of ``non-blocking'' mode, depending on whether the
.I nonblock
argument is non-zero or zero. It has no effect on ``savefiles''.
-If there is an error, \-1 is returned and
+If there is an error,
+.B PCAP_ERROR
+is returned and
.I errbuf
is filled in with an appropriate error message; otherwise, 0 is
returned.
@@ -69,7 +71,9 @@ is required in order to put it into ``non-blocking'' mode.
.B pcap_getnonblock()
returns the current ``non-blocking'' state of the capture descriptor; it
always returns 0 on ``savefiles''.
-If there is an error, \-1 is returned and
+If there is an error,
+.B PCAP_ERROR
+is returned and
.I errbuf
is filled in with an appropriate error message.
.PP
diff --git a/pcap_stats.3pcap b/pcap_stats.3pcap
index f10ba832..465dada4 100644
--- a/pcap_stats.3pcap
+++ b/pcap_stats.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_STATS 3PCAP "3 January 2014"
+.TH PCAP_STATS 3PCAP "25 July 2018"
.SH NAME
pcap_stats \- get capture statistics
.SH SYNOPSIS
@@ -83,10 +83,13 @@ statistic is unavailable, so it should not be treated as an indication
that the interface did not drop any packets.
.SH RETURN VALUE
.B pcap_stats()
-returns 0 on success and returns \-1 if there is an error or if
+returns 0 on success and returns
+.B PCAP_ERROR
+if there is an error or if
.I p
-doesn't support packet statistics.
-If \-1 is returned,
+doesn't support packet statistics. If
+.B PCAP_ERROR
+is returned,
.B pcap_geterr(3PCAP)
or
.B pcap_perror(3PCAP)