summaryrefslogtreecommitdiff
path: root/pcap_can_set_rfmon.3pcap
diff options
context:
space:
mode:
Diffstat (limited to 'pcap_can_set_rfmon.3pcap')
-rw-r--r--pcap_can_set_rfmon.3pcap38
1 files changed, 24 insertions, 14 deletions
diff --git a/pcap_can_set_rfmon.3pcap b/pcap_can_set_rfmon.3pcap
index b579804..0baac7a 100644
--- a/pcap_can_set_rfmon.3pcap
+++ b/pcap_can_set_rfmon.3pcap
@@ -17,7 +17,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_CAN_SET_RFMON 3PCAP "18 May 2010"
+.TH PCAP_CAN_SET_RFMON 3PCAP "31 July 2016"
.SH NAME
pcap_can_set_rfmon \- check whether monitor mode can be set for a
not-yet-activated capture handle
@@ -37,26 +37,36 @@ the handle is activated.
.SH RETURN VALUE
.B pcap_can_set_rfmon()
returns 0 if monitor mode could not be set,
-1 if monitor mode could be set,
+1 if monitor mode could be set, and a negative value on error.
+A negative return value indicates what error condition occurred.
+The possible error values are:
+.TP
.B PCAP_ERROR_NO_SUCH_DEVICE
-if the capture source specified when the handle was created doesn't
-exist,
+The capture source specified when the handle was created doesn't
+exist.
+.TP
.B PCAP_ERROR_PERM_DENIED
-if the process doesn't have permission to check whether monitor mode
-could be supported,
+The process doesn't have permission to check whether monitor mode
+could be supported.
+.TP
.B PCAP_ERROR_ACTIVATED
-if called on a capture handle that has been activated, or
+The capture handle has already been activated.
+.TP
.B PCAP_ERROR
-if an error occurred.
-If
-.B PCAP_ERROR
-is returned,
-.B pcap_geterr()
+Another error occurred.
+.B pcap_geterr(3PCAP)
or
-.B pcap_perror()
+.B \%pcap_perror(3PCAP)
may be called with
.I p
-as an argument to fetch or display the error text.
+as an argument to fetch or display a message describing the error.
+.LP
+Additional error codes may be added in the future; a program should
+check for 0, 1, and negative, return codes, and treat all negative
+return codes as errors.
+.B 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.
.SH SEE ALSO
pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP),
pcap_set_rfmon(3PCAP)