Much useful information has been obtained through application of
the v5 API during implementation of the 802dot11 MIB.  In selecting
a table-type, I elected to use the data-set model, produced by the
mib2c compiler under case *1* as listed in the execution script.

What I find a little confusing is the difference between code
generation and incorporation within the daemon *snmpd* and the
subsequent failure of a walk of the daemon to yield a report on
the OIDs of that portion of the MIB covered by the tables.  I
generate the code, add the module to the configuration, start the
daemon, and using the tool *snmpwalk* issue the following command:

  /usr/local/bin/snmpwalk -v 2c -c public localhost .1

The content of file snmpd.conf is as one should expect:

====================
  Extract start
====================
com2sec     realnetuser         default       public2
group       realnetgroup        v2c           realnetuser
view        fullview            included      .1
access      realnetgroup   ""   any  noauth  exact  fullview  fullview  fullview
syslocation  "RealNet HQ"
syscontact  WRBuckley
rwuser  wrb noauth
rouser  brw noauth
rocommunity  others
rwcommunity  realnet
====================
  Extract stop
====================

BTW - RealNet is my client.

Output of the walk is (cropped for space minimisation):

====================
  Extract start
====================
[EMAIL PROTECTED] net-snmp-5.2.rc4]# /usr/local/bin/snmpwalk -v 2c -c public2
localhost .1
iso.2.840.10036.3.1.1.0 = STRING: "RTID"
SNMPv2-MIB::sysDescr.0 = STRING: Linux localhost.localdomain 2.4.20-31.9 #1 Tue
Apr 13 18:04:23 EDT 2004 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (1052) 0:00:10.52
SNMPv2-MIB::sysContact.0 = STRING: WRBuckley
SNMPv2-MIB::sysName.0 = STRING: localhost.localdomain
SNMPv2-MIB::sysLocation.0 = STRING: "RealNet HQ"
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (80) 0:00:00.80
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
====================
  Extract stop
====================

As you can see, the lone DisplayString "RTID" is walked.  So, my compilation
of the scalar, and subsequent inclusion of the .c and .h files produced by
the mib2c compiler yielded a working portion of the 802dot11 MIB.  Other than
to change file names, and associated references, in the code generated by
the MIB compiler, the only substative change was to declare a character array
variable (static char resourceTypeIDName[] = "FTID";) within the routine
*handle_dot11ResourceTypeIDName()* and to add the variable name to the call
for routine *snmp_set_var_typed_value()*, giving the pointer and length of
this variable at the appropriate place in the parameter list.  It could
hardly have been easier to do.

In a similar fashion, I have added the .c and .h filed produced by the mib2c
compiler for the tables of the 802dot11 MIB.  I made no code changes, save
the file name and associated references, as complained of in my earlier post
titled "WRB - Big problems adding 802dot11 to snmpd" and as suggested above.
I added the table code to the configuration, compiled and started the daemon,
and used the same *snmpwalk* command as given above.  The output of my walk
did not change.

I did start the daemon with debugging turned on, so I can see from the log
file that the various OIDs were registered.  A suitable extract is:

===================
  Extract start
===================
trace: should_init(): mib_modules.c, 127:
mib_init: initializing: ieee802dot11_scalars
trace: init_ieee802dot11_scalars(): dot11/ieee802dot11_scalars.c, 16:
ieee802dot11_scalars: Initializing
trace: netsnmp_inject_handler_before(): agent_handler.c, 337:
handler:inject: injecting instance before dot11ResourceTypeIDName
trace: netsnmp_inject_handler_before(): agent_handler.c, 337:
handler:inject: injecting scalar before instance
trace: netsnmp_inject_handler_before(): agent_handler.c, 337:
handler:inject: injecting serialize before scalar
trace: netsnmp_register_handler(): agent_handler.c, 212:
handler::register: Registering dot11ResourceTypeIDName
(::serialize::scalar::instance::dot11ResourceTypeIDName) at 
iso.2.840.10036.3.1.1
trace: netsnmp_inject_handler_before(): agent_handler.c, 337:
handler:inject: injecting bulk_to_next before serialize
trace: netsnmp_register_mib(): agent_registry.c, 587:
register_mib: registering "dot11ResourceTypeIDName" at iso.2.840.10036.3.1.1
trace: netsnmp_subtree_find_first(): agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 160:
subtree: found one for: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 160:
subtree: found one for: ""
trace: snmp_call_callbacks(): callback.c, 205:
callback: START calling callbacks for maj=1 min=1
trace: snmp_call_callbacks(): callback.c, 231:
callback: END calling callbacks for maj=1 min=1 (0 called)
trace: should_init(): mib_modules.c, 127:
mib_init: initializing: ieee802dot11_tables
trace: initialize_table_dot11StationConfigTable(): dot11/ieee802dot11_tables.c, 
23:
initialize_table_dot11StationConfigTable: adding indexes to table
dot11StationConfigTable
trace: initialize_table_dot11StationConfigTable(): dot11/ieee802dot11_tables.c, 
29:
initialize_table_dot11StationConfigTable: adding column types to table
dot11StationConfigTable
trace: netsnmp_inject_handler_before(): agent_handler.c, 337:
handler:inject: injecting netsnmp_table_data_set before dot11StationConfigTable
trace: netsnmp_inject_handler_before(): agent_handler.c, 337:
handler:inject: injecting table_data before netsnmp_table_data_set
trace: netsnmp_inject_handler_before(): agent_handler.c, 337:
handler:inject: injecting table before table_data
trace: netsnmp_register_handler(): agent_handler.c, 212:
handler::register: Registering dot11StationConfigTable
(::table::table_data::netsnmp_table_data_set::dot11StationConfigTable) at
iso.2.840.10036.1.1
trace: netsnmp_inject_handler_before(): agent_handler.c, 337:
===================
  Extract stop
===================

As you can see, the OIDs <iso.2.840.10036.3.1.1> and <iso.2.840.10036.1.1>
both get registered.  Indeed, an exhaustive review of the log file shows that
all of the table OIDs get registered.  So, why do the table OIDs not show up
in the walk?




William R. Buckley
President
SoftNerd, A California Corporation
Director Emeritus,
International Core Wars Society
[EMAIL PROTECTED]
415-240-6107


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to