aboutsummaryrefslogtreecommitdiff
path: root/pcap_get_selectable_fd.3pcap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-11-23 20:56:35 -0800
committerGuy Harris <guy@alum.mit.edu>2019-11-23 20:56:35 -0800
commit48fbe321170f30de3e0c2aed5927aff9b0893a66 (patch)
treeca007998219e42ea1660767ff19ebd7c57d9adbb /pcap_get_selectable_fd.3pcap
parentb262e73dfdda6599b3b08750fcd6ff2a6a5a16c0 (diff)
Style cleanup.
Use the BSD house style, in which, in foobar() returns 17 on success and 137 on failure. "foobar" is boldfaced but "()" isn't.
Diffstat (limited to 'pcap_get_selectable_fd.3pcap')
-rw-r--r--pcap_get_selectable_fd.3pcap42
1 files changed, 21 insertions, 21 deletions
diff --git a/pcap_get_selectable_fd.3pcap b/pcap_get_selectable_fd.3pcap
index bf496128..883aae8c 100644
--- a/pcap_get_selectable_fd.3pcap
+++ b/pcap_get_selectable_fd.3pcap
@@ -32,7 +32,7 @@ int pcap_get_selectable_fd(pcap_t *p);
.ft
.fi
.SH DESCRIPTION
-.B pcap_get_selectable_fd()
+.BR pcap_get_selectable_fd ()
returns, on UNIX, a file descriptor number for a file descriptor on
which one can
do a
@@ -60,14 +60,14 @@ those devices. In that case, those calls must be given a timeout less
than or equal to the timeout returned by
.BR pcap_get_required_select_timeout (3PCAP)
for the device for which
-.B pcap_get_selectable_fd()
+.BR pcap_get_selectable_fd ()
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()
+.BR \%pcap_get_required_select_timeout ()
returns
.BR NULL ,
it is not possible to wait for packets to arrive on the device in an
@@ -91,18 +91,18 @@ OpenBSD prior to OpenBSD 2.4;
.IP
Mac OS X prior to Mac OS X 10.7;
.PP
-.BR select() ,
-.BR poll() ,
+.BR select (),
+.BR poll (),
and
-.B kevent()
+.BR kevent ()
do not work correctly on BPF devices;
-.B pcap_get_selectable_fd()
+.BR pcap_get_selectable_fd ()
will return a file descriptor on most of those versions (the exceptions
being FreeBSD 4.3 and 4.4), but a simple
-.BR select() ,
-.BR poll() ,
+.BR select (),
+.BR poll (),
or
-.B kevent()
+.BR kevent ()
call will not indicate that the descriptor is readable until a full
buffer's worth of packets is received, even if the packet timeout
expires before then. To work around this, code that uses
@@ -119,29 +119,29 @@ work correctly on BPF devices, so the workaround isn't necessary,
although it does no harm.)
.PP
Note also that
-.B poll()
+.BR poll ()
and
-.B kevent()
+.BR kevent ()
doesn't work on character special files, including BPF devices, in Mac
OS X 10.4 and 10.5, so, while
-.B select()
+.BR select ()
can be used on the descriptor returned by
-.BR pcap_get_selectable_fd() ,
-.B poll()
+.BR pcap_get_selectable_fd (),
+.BR poll ()
and
-.B kevent()
+.BR kevent ()
cannot be used on it those versions of Mac OS X.
-.BR poll() ,
+.BR poll (),
but not
-.BR kevent() ,
+.BR kevent (),
works on that descriptor in Mac OS X releases prior to
10.4;
-.B poll()
+.BR poll ()
and
-.B kevent()
+.BR kevent ()
work on that descriptor in Mac OS X 10.6 and later.
.PP
-.B pcap_get_selectable_fd()
+.BR pcap_get_selectable_fd ()
is not available on Windows.
.SH RETURN VALUE
A selectable file descriptor is returned if one exists; otherwise,