Re: Call for testers: wireless module for bsnmpd(1)

2010-07-19 Thread Shteryana Shopova
Hi all,

Thanks for the feedback and comments.
I've uploaded an updated tarball at
http://people.freebsd.org/~syrinx/snmp/snmp_wlan-20100719-01.tar .

On Sun, Jul 11, 2010 at 8:23 PM, Gabor PALI p...@freebsd.org wrote:

 A few comments:

 - I think there should be bsnmpd(1) instead of bsnmpd(8) in the NAME
 section of snmp_wlan(3).

Fixed in the latest sources.

 - It creates an /usr/lib/snmp_wlan.so. file which seems a bit strange
 for me.

Yes, indeed - this weird naming happens when an bsnmp module is built
outside the source tree and SHLIB_MAJOR is not defined - the
bsd.snmpmod.mk file names a module based on
snmp_${MOD}.so.${SHLIB_MAJOR} - this should be resolved once the
module is made part of the source tree.

 - It produces the following on my machine:

 snmpd[3871]: SNMP wlan loaded wlan_wlan_acl module
 snmpd[3871]: send: Connection refused
 snmpd[3871]: iface wlan0 - get param: ioctl(41) failed: Invalid argument
 snmpd[3871]: iface wlan0 - get param: ioctl(41) failed: Invalid argument
 snmpd[3871]: iface wlan0 - get param: ioctl(41) failed: Invalid argument
 snmpd[3871]: iface wlan0 - get param: ioctl(41) failed: Invalid argument


This is because ioctl(wname, IEEE80211_IOC_MACCMD, ...) returns EINVAL
when no MAC ACL policy has been configured in the interface - should
be resolved in the latest sources.



On Wed, Jul 14, 2010 at 5:40 AM, Adrian Chadd adr...@freebsd.org wrote:
 Howdy!

 Compiling this on MIPS gives this error:

 Warning: Object directory not changed from original 
 /usr/home/adrian/w/snmp_wlan
 cc -fpic -DPIC -O -pipe -EB -msoft-float -G0 -mno-dsp -mabicalls
 -DSNMPTREE_TYPES -g -I. -std=gnu99 -Wsystem-headers -Werror -Wall
 -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes
 -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual
 -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter
 -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
 -Wold-style-definition -Wno-pointer-sign -c wlan_sys.c -o wlan_sys.So
 cc1: warnings being treated as errors
 wlan_sys.c: In function 'wlan_get_scan_results':
 wlan_sys.c:2221: warning: cast increases required alignment of target type
 wlan_sys.c: In function 'wlan_get_peerinfo':
 wlan_sys.c:2713: warning: cast increases required alignment of target type
 *** Error code 1


In the latest sources, I replaced the cast with memcopy's which shold
fix the errors, but I haven't tested it since I don't have a MIPS
platform to test. It'll be good to know the errors have been actually
fixed.



On Wed, Jul 14, 2010 at 6:16 AM, Adrian Chadd adr...@freebsd.org wrote:
 I've already emailed you about the alignment warnings.

 The returned error value is an SNMPv2 error (SNMP_ERR_INCONS_VALUE)
 which causes v1 requests to error out. Is it at all possible to return
 something valid if a v1 request is made?

The SNMP_ERR_INCONS_VALUE is only returned in responce to SET requests
when the value requested for SET is not valid - in such case if the
packet is SNMPv1 packet the SNMP agent should itself replace any
SNMPv2 error code with a corresponding SNMPv1 code (e.g
SNMP_ERR_BADVALUE should be returned instead of
SNMP_ERR_INCONS_VALUE); could you please specify your agent config and
what exact client command and aparameters are you issueing to produce
the problem.

 snmpwalk'ing to inspect what -is- returned fails, even when querying in v2 
 mode:

 BEGEMOT-WIRELESS-MIB::wlanIfaceDot11nRIFS.wlan0 = INTEGER: false(2)
 BEGEMOT-WIRELESS-MIB::wlanIfaceDot11nShortGI.wlan0 = INTEGER: false(2)
 BEGEMOT-WIRELESS-MIB::wlanIfaceDot11nSMPSMode.wlan0 = INTEGER: disabled(1)
 Error in packet.
 Reason: (genError) A general failure occured
 Failed object: BEGEMOT-WIRELESS-MIB::wlanIfaceDot11nSMPSMode.wlan0

 The daemon logs errors when features aren't supported by the
 underlying driver (eg querying TDMA stats on a non-TDMA interface.)
 This may hide any actual underlying issues.

This shouldn't be the case - the module reads each wlan parent
capabilities and a relevant setting is only attempted in the kernel,
only if the parent/wlan iterface capabilities indicate it is
supported. I'm trying to test it on my system, but I don't see a
problem. Again, could you please specify your kernel config, hardware
wireless card, FreeBSD vsersion and the commands that you're running
to create the problem.


 It isn't immediately clear which parameters are related to station and
 which are related to hostap. Eg, wlanIfaceBeaconMissedThreshold. Is
 that the station threshold or the AP threshold? Would it be worthwhile
 creating separate branches for different stat types (station, ap, TDMA
 AP, dot11n stuff, etc, etc?) rather than whacking it all together in
 one tree?


The description of each object (and specifically under the
wlanIfaceConfigTable table) in the BEGEMOT-WIRELESS-MIB.txt specifies
whether the relevant object is meaningfull for interfaces in station
or ap mode. I've thought about splitting the configuration in separate
tables, but then 

Re: Call for testers: wireless module for bsnmpd(1)

2010-07-13 Thread Adrian Chadd
Howdy!

Compiling this on MIPS gives this error:

Warning: Object directory not changed from original /usr/home/adrian/w/snmp_wlan
cc -fpic -DPIC -O -pipe -EB -msoft-float -G0 -mno-dsp -mabicalls
-DSNMPTREE_TYPES -g -I. -std=gnu99 -Wsystem-headers -Werror -Wall
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual
-Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter
-Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
-Wold-style-definition -Wno-pointer-sign -c wlan_sys.c -o wlan_sys.So
cc1: warnings being treated as errors
wlan_sys.c: In function 'wlan_get_scan_results':
wlan_sys.c:2221: warning: cast increases required alignment of target type
wlan_sys.c: In function 'wlan_get_peerinfo':
wlan_sys.c:2713: warning: cast increases required alignment of target type
*** Error code 1



Adrian

On 10 July 2010 19:27, Shteryana Shopova syr...@freebsd.org wrote:
 Hi all,

 As some of you may know, I've been awarded a grant by the FreeBSD
 Foundation to make several improvements to FreeBSD's SNMP daemon. The
 first part of the project - a module for monitoring wireless
 networking under FreeBSD - is now completed and I'd really appreciate
 if I could get some help in more extensive testing in a wider range of
 wireless networking usage scenarios. A tarbal of the latest sources of
 the module is available under
 http://people.freebsd.org/~syrinx/snmp/snmp_wlan-20100710-01.tar. To
 compile and install the module -
 #fetch http://people.freebsd.org/~syrinx/snmp/snmp_wlan-20100710-01.tar
 #tar -xvf snmp_wlan-20100710-01.tar
 #cd snmp_wlan
 #make
 #make install (as root)

 To enable loading of the module in bsnmpd(1), one should add the
 following line to bsnmpd(1) config file (usually /etc/snmpd.config) -

 begemotSnmpdModulePath.wlan = /usr/lib/snmp_wlan.so

 More details on how the module works may be found in the snmp_wlan(3)
 man page and in the private BEGEMOT-WIRELESS-MIB the module implements
 (installed under /usr/share/snmp/mibs/BEGEMOT-WIRELESS-MIB.txt).
 Know issues currently are that BITS types are not always handled
 properly, and TX rates may not always be properly set - I am working
 on fixing those.
 All feedback is wellcome - bug reports, requests for features to be
 included in future versions of the module, code style and bug fix
 patches. I will be glad to help resolve any problems that may arise
 while installing/working with the module and answer any questions you
 may have. Thanks!

 cheers,
 Shteryana
 ___
 freebsd-...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-net
 To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Call for testers: wireless module for bsnmpd(1)

2010-07-13 Thread Adrian Chadd
On 10 July 2010 19:27, Shteryana Shopova syr...@freebsd.org wrote:
 Hi all,

 As some of you may know, I've been awarded a grant by the FreeBSD
 Foundation to make several improvements to FreeBSD's SNMP daemon. The
 first part of the project - a module for monitoring wireless
 networking under FreeBSD - is now completed and I'd really appreciate
 if I could get some help in more extensive testing in a wider range of
 wireless networking usage scenarios. A tarbal of the latest sources of
 the module is available under

I've already emailed you about the alignment warnings.

The returned error value is an SNMPv2 error (SNMP_ERR_INCONS_VALUE)
which causes v1 requests to error out. Is it at all possible to return
something valid if a v1 request is made?

snmpwalk'ing to inspect what -is- returned fails, even when querying in v2 mode:

BEGEMOT-WIRELESS-MIB::wlanIfaceDot11nRIFS.wlan0 = INTEGER: false(2)
BEGEMOT-WIRELESS-MIB::wlanIfaceDot11nShortGI.wlan0 = INTEGER: false(2)
BEGEMOT-WIRELESS-MIB::wlanIfaceDot11nSMPSMode.wlan0 = INTEGER: disabled(1)
Error in packet.
Reason: (genError) A general failure occured
Failed object: BEGEMOT-WIRELESS-MIB::wlanIfaceDot11nSMPSMode.wlan0

The daemon logs errors when features aren't supported by the
underlying driver (eg querying TDMA stats on a non-TDMA interface.)
This may hide any actual underlying issues.

It isn't immediately clear which parameters are related to station and
which are related to hostap. Eg, wlanIfaceBeaconMissedThreshold. Is
that the station threshold or the AP threshold? Would it be worthwhile
creating separate branches for different stat types (station, ap, TDMA
AP, dot11n stuff, etc, etc?) rather than whacking it all together in
one tree?

I've not seen binary string indexing values on tables before. Eg:

BEGEMOT-WIRELESS-MIB::wlanIfacePeerAddress.wlan0.'...$..'.61 =
STRING: 0:11:24:c7:e4:3d
BEGEMOT-WIRELESS-MIB::wlanIfacePeerAddress.wlan0.'..#2'.'.219 =
STRING: 0:23:32:27:fc:db
BEGEMOT-WIRELESS-MIB::wlanIfacePeerAssociationId.wlan0.'...$..'.61 =
INTEGER: 2
BEGEMOT-WIRELESS-MIB::wlanIfacePeerAssociationId.wlan0.'..#2'.'.219
= INTEGER: 1

Is that going to be portable to different utilities? Some of the code
I've seen (and written!) expect numeric table indexes rather than what
I see above.




Adrian
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Call for testers: wireless module for bsnmpd(1)

2010-07-11 Thread Gabor PALI
On 07/10/10 13:27, Shteryana Shopova wrote:
 All feedback is wellcome - bug reports, requests for features to be
 included in future versions of the module, code style and bug fix
 patches.
   

A few comments:

- I think there should be bsnmpd(1) instead of bsnmpd(8) in the NAME
section of snmp_wlan(3).
- It creates an /usr/lib/snmp_wlan.so. file which seems a bit strange
for me.
- It produces the following on my machine:

snmpd[3871]: SNMP wlan loaded wlan_wlan_acl module
snmpd[3871]: send: Connection refused
snmpd[3871]: iface wlan0 - get param: ioctl(41) failed: Invalid argument
snmpd[3871]: iface wlan0 - get param: ioctl(41) failed: Invalid argument
snmpd[3871]: iface wlan0 - get param: ioctl(41) failed: Invalid argument
snmpd[3871]: iface wlan0 - get param: ioctl(41) failed: Invalid argument


I have the following card configured for wlan0:

wpi0: Intel(R) PRO/Wireless 3945ABG mem 0xf020-0xf0200fff irq 18
at device 0.0 on pci4
wpi0: Driver Revision 20071127
wpi0: Hardware Revision (0x1)


It is a FreeBSD/amd64 8-STABLE, from around beginning of April.

:g

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Call for testers: wireless module for bsnmpd(1)

2010-07-10 Thread Shteryana Shopova
Hi all,

As some of you may know, I've been awarded a grant by the FreeBSD
Foundation to make several improvements to FreeBSD's SNMP daemon. The
first part of the project - a module for monitoring wireless
networking under FreeBSD - is now completed and I'd really appreciate
if I could get some help in more extensive testing in a wider range of
wireless networking usage scenarios. A tarbal of the latest sources of
the module is available under
http://people.freebsd.org/~syrinx/snmp/snmp_wlan-20100710-01.tar. To
compile and install the module -
#fetch http://people.freebsd.org/~syrinx/snmp/snmp_wlan-20100710-01.tar
#tar -xvf snmp_wlan-20100710-01.tar
#cd snmp_wlan
#make
#make install (as root)

To enable loading of the module in bsnmpd(1), one should add the
following line to bsnmpd(1) config file (usually /etc/snmpd.config) -

begemotSnmpdModulePath.wlan = /usr/lib/snmp_wlan.so

More details on how the module works may be found in the snmp_wlan(3)
man page and in the private BEGEMOT-WIRELESS-MIB the module implements
(installed under /usr/share/snmp/mibs/BEGEMOT-WIRELESS-MIB.txt).
Know issues currently are that BITS types are not always handled
properly, and TX rates may not always be properly set - I am working
on fixing those.
All feedback is wellcome - bug reports, requests for features to be
included in future versions of the module, code style and bug fix
patches. I will be glad to help resolve any problems that may arise
while installing/working with the module and answer any questions you
may have. Thanks!

cheers,
Shteryana
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org