]> The Tcpdump Group git mirrors - libpcap/commitdiff
Spell PCAP_ERROR and PCAP_ERROR_BREAK in the man pages.
authorDenis Ovsienko <[email protected]>
Wed, 25 Jul 2018 16:32:12 +0000 (16:32 +0000)
committerDenis Ovsienko <[email protected]>
Wed, 25 Jul 2018 16:32:49 +0000 (16:32 +0000)
[skip ci]

20 files changed:
pcap.3pcap.in
pcap_breakloop.3pcap
pcap_compile.3pcap.in
pcap_datalink_name_to_val.3pcap
pcap_dump_flush.3pcap
pcap_dump_ftell.3pcap
pcap_fileno.3pcap
pcap_findalldevs.3pcap
pcap_get_required_select_timeout.3pcap
pcap_get_selectable_fd.3pcap
pcap_inject.3pcap
pcap_list_datalinks.3pcap.in
pcap_lookupnet.3pcap
pcap_loop.3pcap
pcap_next_ex.3pcap
pcap_set_datalink.3pcap
pcap_setdirection.3pcap
pcap_setfilter.3pcap
pcap_setnonblock.3pcap
pcap_stats.3pcap

index 397fa864f06b8134c9ae9d1b899441d40c473ec8..8736adff38cb69f1ea476047db6a15eff9076864 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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 ()
 .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 ()
 descriptor is available, this may be because the device must be polled
 periodically for packets; in that case,
 .BR pcap_get_required_select_timeout ()
index f3cb52e23235fafaed2678e75ed2fc30a5522be7..cc000d2e075ce01ae91b2deca0771c944de7d750 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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
 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
 .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
 .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
 .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)
 .SH SEE ALSO
 pcap(3PCAP)
index bc38e9ec3f3e444611188b77211a26cad7c2529e..31a64e6cb245a469ad5b196cf97eaadbbffdd4ff 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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()
 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)
 .B pcap_geterr(3PCAP)
 or
 .B pcap_perror(3PCAP)
index e6419f25c69567da9443d5dea749d187b7c8f267..dd4688f0a26025cffb1dd47a40e6b95851e8a805 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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()
 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)
 type name..
 .SH SEE ALSO
 pcap(3PCAP)
index a2bd141864f5b9d28ecaf51efb13da3c698cb1e2..5d1747452d3edc9feddb68d40f8d71078aea9d1a 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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()
 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)
 .SH SEE ALSO
 pcap(3PCAP), pcap_dump_open(3PCAP)
index a5af338fb26fcdb019d891e4fef45ed5baa55726..20cb995eab35b13c6f77dde67bc4df0167ea2772 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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) .
 .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.
 .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.
 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)
 .SH SEE ALSO
 pcap(3PCAP)
index 0346518875d578c04bfe922c7d4824c0dcb59eb6..60ac12945dd1a16d0e8a8c71bf1e6d7b1a07d1eb 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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() ,
 .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)
 .SH SEE ALSO
 pcap(3PCAP)
index e2bd12bb40a51be46060f963aad0e03ba7a9d40b..dc52c2e86fc50b486aef558ddb6ee5ba58c87a57 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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()
 .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
 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
 .I errbuf
 is filled in with an appropriate error message.
 .I errbuf
index ecae7a5cc1f0f4a97cf2907845e45d61cf61f399..bc0ab7797fbb3905cb457c175902e83748e2c65b 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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)
 .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
 .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()
 .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
 .BR pcap_setnonblock(3PCAP) ,
 and an attempt must always be made to read packets from the device
 when the
index c7b3160741bdb6a978819ac4cacfa7c4c9f9370b..7f43db398e61c6a7eec20c51a5269fbed6c8cd2e 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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
 .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)
 .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
 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()
 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
 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
 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
 .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)
 is returned.
 .SH SEE ALSO
 pcap(3PCAP), kqueue(2)
index 821f42112dbba7fca342d7f7a33cdb7b2f85c2c7..92a92638849b190630c703376ebf2f23a292b093 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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()
 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()
 .PP
 .B pcap_sendpacket()
-returns 0 on success and \-1 on failure.
+returns 0 on success and
+.B PCAP_ERROR
+on failure.
 .PP
 .PP
-If \-1 is returned,
+If
+.B PCAP_ERROR
+is returned,
 .B pcap_geterr(3PCAP)
 or
 .B pcap_perror(3PCAP)
 .B pcap_geterr(3PCAP)
 or
 .B pcap_perror(3PCAP)
index d0c5afd13c03f7dfcbad524956ae8529db44b993..60ba478f7466777f26a5609d9d80dfc8a0f45f1c 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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
 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,
 If
 .B PCAP_ERROR
 is returned,
index c38ff3a8e339a57d878b9427849a65ebba767c35..f609445311c46d076016bb3e86fc7f1e0fdec3a4 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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()
 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
 .I errbuf
 is filled in with an appropriate error message.
 .I errbuf
index de140da1624ab9c81031a8350edb99dfa4b985fb..0193714b885bb8f631f302dd7d64c57b0f41b4d8 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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
 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
 .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
 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(),
 .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
 .ft R
 .PP
-If \-1 is returned,
+If
+.B PCAP_ERROR
+is returned,
 .B pcap_geterr(3PCAP)
 or
 .B pcap_perror(3PCAP)
 .B pcap_geterr(3PCAP)
 or
 .B pcap_perror(3PCAP)
index 983d4100591160cd6f982e506f85dcec8d83a5ec..f0eb82d1ea0f39c842df0ca7be4a35789c9df8c6 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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,
 .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
 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)
 .B pcap_geterr(3PCAP)
 or
 .B pcap_perror(3PCAP)
index 7613a58add13e7b40f633c1b7217a535feb254ae..66cfdb1e7a9a84009324efdac558c750db190660 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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()
 .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)
 .B pcap_geterr(3PCAP)
 or
 .B pcap_perror(3PCAP)
index 11fef513c235a6677de415de9aefcfb801e5c3d7..f174b98f902424409a5456d7bc1c9212d3d07c8f 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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()
 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)
 .B pcap_geterr(3PCAP)
 or
 .B pcap_perror(3PCAP)
index ca9101277beb9ce755d8c3e306b646de9c17ad9a..872969398469ffaac4ed3ff451ba3846e9067c7f 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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()
 .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)
 .B pcap_geterr(3PCAP)
 or
 .B pcap_perror(3PCAP)
index 1b138b8041d69e1629d8d17c4f7d755ac64417cd..e8adebea0fa2bb7d4a5f4f7f9abbdb2be1feaf3b 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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''.
 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.
 .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''.
 .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
 .I errbuf
 is filled in with an appropriate error message.
 .PP
index f10ba83228240192d69affb8ad2195c8499ba34a..465dada48ea7ccc485c55213888cc3b1d709a087 100644 (file)
@@ -17,7 +17,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" 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
 .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()
 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
 .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)
 .B pcap_geterr(3PCAP)
 or
 .B pcap_perror(3PCAP)