Re: Add example to ifconfig(8) for wireless monitor mode

2015-02-02 Thread Jason McIntyre
On Sun, Feb 01, 2015 at 06:37:28AM +0100, Bradain Foley wrote:
> > > > >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.
> > 
> > > "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).
> > > 
>  
> Thank you Stefan and Jason for the helpful suggestions. 
> An updated patch incorporating feedback. Is this ok?
> 

fixed, thanks.
jmc

> --- src/sbin/ifconfig/ifconfig.8.orig Fri Jan 30 04:00:54 2015
> +++ src/sbin/ifconfig/ifconfig.8  Sat Jan 31 19:20:25 2015
> @@ -1565,9 +1565,9 @@
>  .Pp
>  .Dl # ifconfig gif1 create
>  .Pp
> -Scan for wireless networks using bwi0:
> +Put the athn0 wireless interface into monitor mode.
>  .Pp
> -.Dl # ifconfig bwi0 scan
> +.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
> 



Re: Add example to ifconfig(8) for wireless monitor mode

2015-01-31 Thread Bradain Foley
> > > >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.
> 
> > "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).
> > 
 
Thank you Stefan and Jason for the helpful suggestions. 
An updated patch incorporating feedback. Is this ok?

--- src/sbin/ifconfig/ifconfig.8.orig   Fri Jan 30 04:00:54 2015
+++ src/sbin/ifconfig/ifconfig.8Sat Jan 31 19:20:25 2015
@@ -1565,9 +1565,9 @@
 .Pp
 .Dl # ifconfig gif1 create
 .Pp
-Scan for wireless networks using bwi0:
+Put the athn0 wireless interface into monitor mode.
 .Pp
-.Dl # ifconfig bwi0 scan
+.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



Re: Add example to ifconfig(8) for wireless monitor mode

2015-01-29 Thread Jason McIntyre
On Thu, Jan 29, 2015 at 12:19:26PM +0100, Stefan Sperling wrote:
> 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
> >  
> > dera...@amd64.openbsd.org:/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.
> 

well, ifconfig is already a big page. you could argue the text is wrong
if it's missing important detail. still i'm inclined to agree with the
diff because we already have a wireless example in ifconfig(8), how to
scan, which is largely redundant, since the wireless pages also have it.

i propose we swap examples.

> > --- src/sbin/ifconfig/ifconfig.8.orig   Fri Jan 30 04:00:54 2015
> > +++ src/sbin/ifconfig/ifconfig.8Fri 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
> 

i totally agree with both points above.

jmc



Re: Add example to ifconfig(8) for wireless monitor mode

2015-01-29 Thread Stefan Sperling
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
>
> dera...@amd64.openbsd.org:/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



Add example to ifconfig(8) for wireless monitor mode

2015-01-29 Thread Bradain Foley
>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
 
dera...@amd64.openbsd.org:/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.

--- src/sbin/ifconfig/ifconfig.8.orig   Fri Jan 30 04:00:54 2015
+++ src/sbin/ifconfig/ifconfig.8Fri 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.
+Refer to the interface's driver-specific man page to see if
+the card supports monitor mode:
+.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