SNMP Component

The SNMP control is used to implement SNMP Management Applications and SNMP Agent Applications.

(NOTE: The following is a very short description. For more information, please consult the help files that come with the respective package.)


The SNMP control implements a standard SNMP Version 1 Manager and/or Agent as specified in RFC 1157.

The control provides both encoding/decoding and transport capabilities, making the task of developing a custom SNMP agent or manager as simple as setting a few key properties and handling a few events. SNMP data, such as for instance SNMP object id-s (OID-s) are exchanged as text strings, thus further simplifying the task of handling them.

The control is activated/deactivated by first setting the LocalPort to 161 or 162, depending on whether you want to implement an SNMP agent or SNMP manager, and then setting the Active property. This property enables or disables sending or receiving. It operates completely asynchronously. Messages are sent to other agents or managers by using the Action property, and are recieved through events such as GetRequest, GetResponse, or Trap.

SNMP object ids, types, and values are provided in arrays such as ObjId, ObjType, and ObjValue, for both sent and received packets. ObjCount provides the number of elements in each of the arrays. Other packet information is provided through corresponding properties, such as Community, or RequestId, or similarly named parameters in events.

The control may behave as an SNMP agent or SNMP manager, depending on the value of the LocalPort property. If the control listens to port 161 it may act as an SNMP agent by responding to SNMP requests from SNMP managers, and sending traps through the Action property. If the LocalPort is set to 162, the control listens for SNMP traps, and may send requests to SNMP agents listening on port 161.

SNMP Traps are received through the Trap event, and may be sent through the Action property by specifying appropriate values in the various trap properties, such as TrapAgentAddress, TrapEnterprise, TrapGenericType, TrapSpecificType, and TrapTimeStamp.

This control requires a Winsock 1.1 compliant TCP/IP stack. This means that the Winsock stack installed in the system must have a version of at least 1.1. In particular, Windows 95, 98, and NT machines with Winsock 2.0 are fully supported.


   PROPERTIES

Action. An action code for the control.

Active. Enables or disables sending and receiving of SNMP packets.

Community. The community string used to authenticate SNMP packets.

ErrorIndex. Index of the first variable (object) that caused an error.

ErrorStatus. Status code for outgoing 'Get-Response' packets.

InBufferSize. The size in bytes of the incoming queue of the socket.

LocalPort. The UDP port in the local host where the SNMP control listens to.

ObjCount. Number of objects in the current request.

ObjId. Array of OIDs encoded as strings.

ObjType. Array of object types.

ObjValue. Array of object values.

OutBufferSize. The size in bytes of the outgoing queue of the socket.

RemoteHost. The address of the remote host. Domain names are resolved to IP addresses.

RemotePort. The UDP port where the remote SNMP agent is listening.

RequestId. The request-id to mark outgoing packets with.

TrapAgentAddress. The address of the object generating the trap.

TrapEnterprise. The type of the object generating the trap.

TrapGenericType. The generic type of the trap being sent.

TrapSpecificType. The specific type of the trap being sent.

TrapTimeStamp. Time passed since the agent was initialized (in hundredths of a second).

LocalHost. The name of the local host. When connected, the IP address of the interface through which the connection was made.

SocketHandle. The handle of the main socket used by the control.

WinsockInfo. Identifying information about the loaded Winsock stack.

WinsockLoaded. Loads and unloads Winsock on demand.

WinsockMaxDatagramSize. Size in bytes of the largest UDP datagram that can be sent or received.

WinsockMaxSockets. Maximum number of sockets available to a single process.

WinsockPath. The path to the Winsock DLL used.

WinsockStatus. The status of the Winsock stack.

   EVENTS

GetNextRequest. Fired when a GetNextRequest packet is received.

GetRequest. Fired when a GetRequest packet is received.

GetResponse. Fired when a GetResponse packet is received.

ReadyToSend. Fired when the control is ready to send data.

SetRequest. Fired when a SetRequest packet is received.

Trap. Fired when a SNMP trap packet is received.

Error. Information about errors during data delivery.


© 1999 devSoft Inc. - All Rights Reserved.
devSoft Inc.,  P.O.Box 13821 , Research Triangle Park, NC 27709 , USA,