WMI SNMP Provider

The WMI SNMP Provider component allows client applications to access static and dynamic Simple Network Management (SNMP) information through Windows Management Instrumentation (WMI). The SNMP providers return dynamic information. You can specify the set of classes that the instance provider will operate against in one of the following two ways:

  • Statically, by creating classes in the WMI object repository name space associated with the proxy device.
  • Dynamically, by using the SNMP class provider, which returns the set of classes located within the SNMP Module Information Repository (SMIR) name space.

Additionally, you can also specify whether to correlate the set of classes returned from the SMIR name space. Correlated classes define the set of classes that a given SNMP agent is known to support at the time the enumeration occurs. Noncorrelated enumeration returns all classes present within the SMIR name space, regardless of whether the agent device supports them.

The SNMP providers include:

  • Two SNMP data providers, which are class and instance providers. Applications use these to access and modify data relating to SNMP devices.
  • Two SNMP event providers, called the SNMP Encapsulated Event Provider (SEEP) and the SNMP Referent Event Provider (SREP), which generate WMI events from SNMP traps and notifications. These report the same types of events, but present the event information in two different sets of extrinsic event classes: Encapsulated and Referent. To choose a format, consumers register for a particular class of events.
    • Encapsulated means that the event class has simple properties describing the information mapped directly from the TRAP-TYPE and NOTIFICATION-TYPE macros.
    • Referent classes abstract the information present within the macros so that properties which share the same class and instance are presented as embedded objects, thus allowing extraction of the __RELPATH so that the unique instance to which the trap is associated can be retrieved after the receipt of the event.

Component Configuration

Note   The SNMP provider requires Windows NT 4.0, Windows 2000, or Windows XP, and beyond. This provider does not run on Windows 95, Windows 98, or Windows ME.

Registration provides WMI with information about the capabilities of a provider and its location. Because the WMI SNMP provider is not automatically registered with WMI when WMI is installed, client applications must complete the registration process if they want to use the WMI SNMP provider.

The WMI SNMP provider must create an instance of the __Win32Provider system class. Depending on the type of provider, one of the following instances must also be created:

Provider type Instance to be created
Class provider __ClassProviderRegistration
Instance provider __InstanceProviderRegistration
Event provider  __EventProviderRegistration

Providers register with WMI to publish information about the data and operations that they support and their physical implementation. WMI uses this information to load and initialize the provider and to determine the right provider for a particular client request. All types of providers follow the same procedure for registration. Neither WMI nor the provider needs to be running during the registration process. To register with WMI, a provider must execute the following steps.

  1. Register with the Component Object Model (COM) by creating registry entries if necessary. This process applies to all COM servers and is unrelated to WMI.
  2. Create a Managed Object Format (MOF) file that contains the following two instances:
    • An instance of the __Win32Provider class to describe the physical implementation of the provider.
    • An instance of a class derived either directly or indirectly from __ProviderRegistration to describe the logical implementation of the provider.
  3. Place the MOF file into a permanent directory, typically the provider's installation directory.
  4. Compile the MOF file using the MOF compiler or the IMofCompiler interface. The MOF compiler parses a file containing MOF statements and adds the classes and class instances defined in the file to the WMI repository.

Special Notes

The WMI SNMP Provider component services requests to instantiate instances of classes that represent MIB objects or SNMP events. MIB objects are mapped to SNMP WMI classes using the OBJECT-TYPE macro; events are mapped to classes using the TRAP-TYPE and NOTIFICATION-TYPE macros.

It is possible that the WMI SNMP Provider will not obtain all of the MIB objects that refer to a particular property of an instance. When this occurs with an instance of a MIB object class, the WMI SNMP Provider marks the property as NULL and attaches the Boolean qualifier Not_Available. When a MIB object is unavailable for an event class, the event provider sets the corresponding property to NULL without attaching the Not_Available qualifier.

When an error occurs due to type mismatching between property definitions and MIB definitions, the instance provider marks the property with another Boolean qualifier, Type_Mismatch. The property itself is assigned a value representing the SNMP protocol encoding type.

For example, consider the property ifType that disallows the value 0. If a type mismatching occurs for this property, the instance provider sets:

  • The Type_Mismatch qualifier
  • The ifType property to the string value '0'

The WMI SNMP Provider also marks the property with Type_Mismatch if the object identifier in a variable binding does not match the object identifier of the event class property.

For each instance returned by the provider, the instance is modified so that all qualifiers present within the containing namespace are inherited by that instance.

WMI SNMP Provider creates embedded objects using instance information in the variable binding's object identifier to create key properties for the embedded object. If the object identifier of the variable binding has inconsistent instance information such that the key properties cannot be determined, the keys of the embedded object are set to NULL and marked with the Type_Mismatch qualifier.

WMI SNP Provider detects a conflict between the data in a variable binding and the instance information in the variable binding's object identifier when the following occurs:

  • The property being set is a key property.
  • The data in the variable binding does not have the same value as the value taken from the instance information from the variable binding's object identifier.

In this case, the property is given the value from the variable binding data and marked with the qualifier Value_Mismatch.

The WMI SNMP Provider component is designed to work with the WMI Core component and other WMI provider components. WMI SNMP Provider also requires the WMI Tools component for compiling MOF files by using the Mofcomp.exe tool.

The following components have related functionality:

  • WMI Core
  • WMI View Provider
  • WMI DS Provider
  • WMI Windows Installer Provider
  • WMI Win32 Provider

For More Information

For more information on WMI, see the Platform Software Development Kit (SDK) at this Microsoft Web site.

]]>
Allows client applications to access static and dynamic SNMP information through Windows Management Instrumentation (WMI). NetOC 17 DelFiles=WBEMSNMP.CopyFiles,WBEMSNMP.SNMPCopyFiles DelReg=WBEMSNMP.DelReg UnregisterDlls=WBEMSNMP.UnRegSvr %11%\WBEM snmpcl.dll False %11%\WBEM snmpincl.dll False %11%\WBEM snmpreg.mof False %11%\WBEM snmpsmir.dll False %11%\WBEM snmpsmir.mof False %11%\WBEM snmpstup.dll False %11%\WBEM snmpthrd.dll False %11%\WBEM\SNMP smi2smir.exe False %11%\WBEM\SNMP smierrsm.dll False %11%\WBEM\SNMP smierrsy.dll False %11%\WBEM\SNMP smimsgif.dll False HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\CIMOM\Providers\SNMP\COMPILER 7 74007800740000006D00690062000000610073006E000000 File Suffixes 1 1 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\CIMOM\Providers\SNMP\COMPILER\MIB 1 1 1 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\CIMOM\Providers\SNMP\Correlator 4 6 MaxVarBinds 1 1 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\CIMOM\Providers\SNMP\Events 4 1 StrobeCount 1 1 File MSVCRT.dll File MSVCIRT.dll File wsnmp32.dll File KERNEL32.dll File OLEAUT32.dll File USER32.dll File WSOCK32.dll File PROVTHRD.dll File ADVAPI32.dll File ole32.dll File VERSION.dll False True %11%\wbem\snmpincl.dll 0 0 False True %11%\wbem\snmpsmir.dll 0 0 False True %11%\wbem\snmpstup.dll 0 0 WMI SNMP Provider 1.0 Windows Management Instrumentation Simple Networking Management Provider vladj vladj; shbrown 11/29/2000 11/2/2001 12:41:41 AM