aboutsummaryrefslogtreecommitdiff
path: root/pcap_activate.3pcap
diff options
context:
space:
mode:
Diffstat (limited to 'pcap_activate.3pcap')
-rw-r--r--pcap_activate.3pcap35
1 files changed, 22 insertions, 13 deletions
diff --git a/pcap_activate.3pcap b/pcap_activate.3pcap
index 162a929331e4..169a7565f1cf 100644
--- a/pcap_activate.3pcap
+++ b/pcap_activate.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_ACTIVATE 3PCAP "31 July 2016"
+.TH PCAP_ACTIVATE 3PCAP "24 November 2019"
.SH NAME
pcap_activate \- activate a capture handle
.SH SYNOPSIS
@@ -31,13 +31,15 @@ int pcap_activate(pcap_t *p);
.ft
.fi
.SH DESCRIPTION
-.B pcap_activate()
+.BR pcap_activate ()
is used to activate a packet capture handle to look
at packets on the network, with the options that were set on the handle
being in effect.
.SH RETURN VALUE
-.B pcap_activate()
-returns 0 on success without warnings, a non-zero positive value on
+.BR pcap_activate ()
+returns
+.B 0
+on success without warnings, a non-zero positive value on
success with warnings, and a negative value on error.
A non-zero return value indicates what warning or error condition
occurred.
@@ -50,15 +52,15 @@ promiscuous mode.
.TP
.B PCAP_WARNING_TSTAMP_TYPE_NOTSUP
The time stamp type specified in a previous
-.B pcap_set_tstamp_type(3PCAP)
+.BR pcap_set_tstamp_type (3PCAP)
call isn't supported by the capture source (the time stamp type is
left as the default),
.TP
.B PCAP_WARNING
Another warning condition occurred;
-.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 a message describing the warning
@@ -89,9 +91,9 @@ The capture source device is not up.
.TP
.B PCAP_ERROR
Another error occurred.
-.B pcap_geterr()
+.BR pcap_geterr ()
or
-.B pcap_perror()
+.BR pcap_perror ()
may be called with
.I p
as an argument to fetch or display a message describing the error.
@@ -102,9 +104,9 @@ If
or
.B PCAP_ERROR_PERM_DENIED
is returned,
-.B pcap_geterr()
+.BR pcap_geterr ()
or
-.B pcap_perror()
+.BR pcap_perror ()
may be called with
.I p
as an argument to fetch or display an message giving additional details
@@ -115,8 +117,15 @@ Additional warning and error codes may be added in the future; a program
should check for positive, negative, and zero return codes, and treat
all positive return codes as warnings and all negative return
codes as errors.
-.B pcap_statustostr(3PCAP)
+.BR pcap_statustostr (3PCAP)
can be called, with a warning or error code as an argument, to fetch a
message describing the warning or error code.
+.LP
+If
+.BR pcap_activate ()
+fails, the
+.I pcap_t *
+is not closed and freed; it should be closed using
+.BR pcap_close ().
.SH SEE ALSO
-pcap(3PCAP)
+.BR pcap (3PCAP)