aboutsummaryrefslogtreecommitdiff
path: root/contrib/libpcap/pcap_setfilter.3pcap
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libpcap/pcap_setfilter.3pcap')
-rw-r--r--contrib/libpcap/pcap_setfilter.3pcap22
1 files changed, 13 insertions, 9 deletions
diff --git a/contrib/libpcap/pcap_setfilter.3pcap b/contrib/libpcap/pcap_setfilter.3pcap
index 872969398469..e063ae0ea2fb 100644
--- a/contrib/libpcap/pcap_setfilter.3pcap
+++ b/contrib/libpcap/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 "25 July 2018"
+.TH PCAP_SETFILTER 3PCAP "5 March 2022"
.SH NAME
pcap_setfilter \- set the filter
.SH SYNOPSIS
@@ -31,25 +31,29 @@ int pcap_setfilter(pcap_t *p, struct bpf_program *fp);
.ft
.fi
.SH DESCRIPTION
-.B pcap_setfilter()
+.BR pcap_setfilter ()
is used to specify a filter program.
.I fp
is a pointer to a
.I bpf_program
struct, usually the result of a call to
-.BR \%pcap_compile(3PCAP) .
+.BR \%pcap_compile (3PCAP).
.SH RETURN VALUE
-.B pcap_setfilter()
-returns 0 on success and
+.BR pcap_setfilter ()
+returns
+.B 0
+on success,
+.B PCAP_ERROR_NOT_ACTIVATED
+if called on a capture handle that has been created but not activated, or
.B PCAP_ERROR
-on failure. If
+on other errors. If
.B PCAP_ERROR
is returned,
-.B pcap_geterr(3PCAP)
+.BR pcap_geterr (3PCAP)
or
-.B pcap_perror(3PCAP)
+.BR pcap_perror (3PCAP)
may be called with
.I p
as an argument to fetch or display the error text.
.SH SEE ALSO
-pcap(3PCAP)
+.BR pcap (3PCAP)