On Thu, Jan 29, 2015 at 09:02:52AM +0100, Bradain Foley wrote:
> >Synopsis:    Add example to ifconfig(8) for wireless monitor mode
> >Category:    documentation
> >Environment:
>       System      : OpenBSD 5.6
>       Details     : OpenBSD 5.6 (GENERIC) #310: Fri Aug  8 00:14:24 MDT 2014
>                        
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC
> 
>       Architecture: OpenBSD.amd64
>       Machine     : amd64
> >Description:
> It would be helpful to add an example of how to put a wireless card
> into monitor (rfmon) mode. The man pages for various wireless cards 

> (such as athn(4), urtwn(4)) mention monitor mode but not how to set 
> it.
> I scoured ifconfig(8) and device man pages for days without finding 
> a hint. Finally I resorted to writing a C program with libpcap to 
> turn on monitor mode. Only then did I notice in ifconfig output 
> that monitor mode is related to mediaopt.
> There is a hint in ifconfig(8) already to look at output from:
>     # ifconfig interface media 
> but it was too oblique for me to appreciate the connection.
> >Fix:
> Here is a patch.

I agree with this idea because searching ifconifg(8) for 'monitor'
currently yields nothing.

> --- src/sbin/ifconfig/ifconfig.8.orig Fri Jan 30 04:00:54 2015
> +++ src/sbin/ifconfig/ifconfig.8      Fri Jan 30 04:47:19 2015
> @@ -1568,6 +1568,12 @@
>  Scan for wireless networks using bwi0:
>  .Pp
>  .Dl # ifconfig bwi0 scan
> +.Pp
> +Put the athn0 wireless interface into monitor (rfmon) mode.

"rfmon" is a bit of an obscure acronym I think.
Saying just "monitor mode" is sufficient.

> +Refer to the interface's driver-specific man page to see if
> +the card supports monitor mode:

The above seems unnecessary. Most drivers support monitor mode. If I'm
grepping correctly the only ones that don't are atu(4), atw(4), and rsu(4).

> +.Pp
> +.Dl # ifconfig athn0 mediaopt monitor
>  .Sh DIAGNOSTICS
>  Messages indicating the specified interface does not exist, the
>  requested address is unknown, or the user is not privileged and

Reply via email to