Compaq AAR04BCTE - Manuals
Compaq AAR04BCTE – Manual in PDF format online.
Manuals:
Manual Compaq AAR04BCTE
Summary
Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii 1 Overview 1.1 SNMP Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–1 1.2 Request Handling . . . . . . . . ....
4 Using the SNMP Utilities 4.1 Using the MIB Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–1 4.1.1 MIB Browser Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–1 4.1.2 MIB Browser Flags . . . . . . . . . . . . . . . . . . . ...
cmp_oid_prefix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–48 clone_oid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–49 free_oid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
Preface The Compaq TCP/IP Services for OpenVMS product is the Compaqimplementation of the TCP/IP networking protocol suite and internet servicesfor OpenVMS Alpha and OpenVMS VAX systems. A layered software product, TCP/IP Services provides a comprehensive suiteof functions and applications that supp...
Related Documents Table 1 lists the documents available with this version of TCP/IP Services. Table 1 TCP/IP Services Documentation Manual Contents DIGITAL TCP/IP Services forOpenVMS Concepts and Planning This manual provides conceptual information about networkingand the TCP/IP protocol including a...
Table 1 (Cont.) TCP/IP Services Documentation Manual Contents Compaq TCP/IP Services for OpenVMSSockets API and System ServicesProgramming This manual describes how to use the Sockets API and OpenVMSsystem services to develop network applications. Compaq TCP/IP Services for OpenVMSSNMP Programming a...
The following conventions are used in this manual. In addition, please note thatall IP addresses are fictitious. Ctrl/x A sequence such as Ctrl/x indicates that you must hold downthe key labeled Ctrl while you press another key or a pointingdevice button. PF1 x A sequence such as PF1 x indicates tha...
Monospace text Monospace type indicates code examples and interactive screendisplays. This typeface indicates UNIX system output or user input,commands, options, files, directories, utilities, hosts, and users. In the C programming language, this typeface identifies thefollowing elements: keywords, ...
1 Overview The Simple Network Management Protocol (SNMP) is the de facto industrystandard for managing TCP/IP networks. The protocol defines the role of anetwork management station (NMS) and the SNMP agent. SNMP allows remoteusers on an NMS to monitor and manage network entities such as hosts, route...
Overview1.1 SNMP Architecture Figure 1–1 SNMP Architecture Master Agent SNMP/ASN.1 Library eSNMP API AgentX (TCP/IP V5.1) Subagent 1 Subagent 2 Subagent n TCP/IP Kernel OpenVMS VM-0704A-AI The SNMP environment consists of the following elements: • The master agent, a process that runs on the host an...
Overview 1.2 Request Handling Figure 1–2 eSNMP Data Flow VM-0705A-AI Client Trap client Master Agent Subagent 1 Subagent 2 Subagent 1 Client Master Agent Subagent n NMS1 NMS2 Legend: Host 1 Host 2 Network 161 161 705 Flow of trap notification Flow of get/set request Flow of "are_you_there" m...
Overview1.2 Request Handling The network management station sends an SNMP request to the masteragent running on the host, using port 161. An SNMP request is made usingone of the following commands: • Get • GetNext • GetBulk • Set Note TCP/IP Services does not support the standard SNMP Inform command...
Overview 1.3 TCP/IP Services Components for SNMP Table 1–1 (Cont.) SNMP Component Files File Location Function TCPIP$SNMP_TRAPRCV.EXE SYS$SYSTEM Utility for receiving trapmessages. TCPIP$ESNMP_SHR.EXE SYS$SHARE Image file containing eSNMPapplication programminginterface (API) routines. TCPIP$SNMP_ST...
Overview1.4 Writing an eSNMP Subagent Table 1–2 Files for Building a Subagent File Description ESNMP.H Header file used to create a subagent. Located inTCPIP$ESNMP. GAWK.EXE Interpreter for MIB converter. MIB-CONVERTER.AWK A UNIX based awk shell script that takes a MIB definition in ASN.1 notation a...
Overview 1.5 The eSNMP API Interface routines handle the basic subagent operations, such as: • Subagent initialization and termination • Registration • Polling of the master agent • Trap sending • UNIX system time conversion • Adding and removing subagent capabilities registered with the master agen...
Overview 1.7 SNMP Versions If you have problems running images linked against an older version ofUCX$ESNMP_SHR.EXE, verify that the version in SYS$SHARE is thelatest by entering the following DCL command: $ DIRECTORY/DATE SYS$SHARE:*$ESNMP_SHR.EXE The creation dates of the files with the prefix TCPI...
2 MIBs Provided with TCP/IP Services This chapter describes how MIBs are implemented on OpenVMS. The MIBsprovided with TCP/IP Services are: • The Host Resources MIB, which manages operating system objects(Section 2.1) • MIB II, which manages TCP/IP kernel objects (Section 2.2) 2.1 Overview of the Ho...
MIBs Provided with TCP/IP Services 2.1 Overview of the Host Resources MIB Table 2–1 (Cont.) Host Resources MIB Objects Object Name RFC Description OpenVMS Description hrNetworkIfIndex The value of the ifIndex thatcorresponds to this networkdevice. The value of the index in the interfacetable in the ...
MIBs Provided with TCP/IP Services2.1 Overview of the Host Resources MIB hrFSLastFullBackupDatehrFSLastPartialBackupDatehrStorageSizehrSWRunStatushrSystemDatehrSystemInitialLoadDevicehrSystemInitialLoadParameters Note For objects that are not implemented, the Host Resources MIB returns a NoSuchObjec...
MIBs Provided with TCP/IP Services 2.1 Overview of the Host Resources MIB TCPIP$SNMP_REQUEST.EXE responds with no output and returns directlyto the DCL prompt. After an NFS mount, the following information is returned in response to a Get request. The data items implemented for OpenVMS (refer to RFC...
MIBs Provided with TCP/IP Services2.2 Overview of MIB II 2.2.1 MIB II Implemented Groups A group is a subdivision of a MIB that defines a subtree. SNMP as implementedby TCP/IP Services supports the following groups: • system (1) • interfaces (2) • Internet Protocol (4) • ICMP (5) • TCP (6) • UDP (7)...
MIBs Provided with TCP/IP Services 2.2 Overview of MIB II When both the TCPIP$OS_MIBS and TCPIP$HR_MIB subagents arerunning, a get request on the sysORTable is as follows. Except where noted, the OIDs conform to RFC 1907. 1.3.6.1.2.1.1.9.1.2.1 = 1.3.6.1.4.1.36.15.3.3.1.11.3.6.1.2.1.1.9.1.2.2 = 1.3.6...
3 Creating a Subagent Using the eSNMP API This chapter describes how to use the eSNMP API to create a MIB subagent thatmanages entities or applications. Topics included in this chapter are: • Creating a MIB specification (Section 3.1) • The structure of management information (Section 3.2) • Creatin...
Creating a Subagent Using the eSNMP API3.2 The Structure of Management Information 3.2.1 Assigning Object Identification Codes Each object in a MIB is associated with an identifier of the ASN.1 type, calledan object identifier (OID). OIDs are unique integers that follow a hierarchicalnaming conventi...
Creating a Subagent Using the eSNMP API 3.2 The Structure of Management Information Figure 3–1 MIB II in SMI Tree Structure VM-0721A-AI iso (1) org (3) dod (6) internet (1) directory (1) mgmt (2) mib2 (1) system (1) interfaces (2) at (3) ip (4) icmp (5) tcp (6) udp (7) egp (8) transmission (10) snmp...
Creating a Subagent Using the eSNMP API3.2 The Structure of Management Information For example, the chess MIB provided with the sample code in the[TCPIP$EXAMPLES.SNMP] directory has an element with the name ‘‘chess.’’The OID for the element chess is 1.3.6.1.4.1.36.2.15.2.99, which is derived fromits...
Creating a Subagent Using the eSNMP API 3.2 The Structure of Management Information Normally, it is the nonleaf nodes that are registered as a subtree with the masteragent. However, leaf nodes, or even specific instances, can be registered as asubtree. The master agent delivers requests to the subag...
Creating a Subagent Using the eSNMP API3.3 Creating a MIB Source File The parameters and qualifiers for the MIBCOMP command are as follows: Parameter or Qualifier Definition MIB-source-file A comma-separated list of MIB definition files. Thestandard extension is .MY, but you can specify any validOpe...
Creating a Subagent Using the eSNMP API 3.3 Creating a MIB Source File enum: complete 1 enum: underway 2 enum: delete 3 moveTable 1.3.6.1.4.1.36.2.15.2.99.5 moveEntry 1.3.6.1.4.1.36.2.15.2.99.5.1 indexes: gameIndex moveIndex moveIndex 1.3.6.1.4.1.36.2.15.2.99.5.1.1INTEGER read-write moveByWhite 1.3....
Creating a Subagent Using the eSNMP API3.3 Creating a MIB Source File 1. Declaration Section The first section of the subtree_TBL.H file is a declaration of the subtreestructure. The subtree is automatically initialized by code in the subtree_TBL.Cfile. A pointer to this structure is passed to the e...
Creating a Subagent Using the eSNMP API 3.3 Creating a MIB Source File typedef struct _chess_type { OID ches; int chessMaxGames; int chessNumGames; char chessProductID_mark;char chessMaxGames_mark;char chessNumGames_mark; } chess_type; Although MIB group structures are provided for your use, you are...
Creating a Subagent Using the eSNMP API3.3 Creating a MIB Source File 2. Array of OBJECT Structures Section The second section of the subtree_TBL.C file is an array of OBJECT structures.Each MIB variable within the subtree has one OBJECT. The chess exampleproduces the following: static OBJECT object...
Creating a Subagent Using the eSNMP API 3.3 Creating a MIB Source File 3. Initialized Subtree Structure Section The third section of the subtree_TBL.C file is the SUBTREE structure itself. Apointer to this structure is passed to the eSNMP library routine esnmp_register to register the subtree. It is...
Creating a Subagent Using the eSNMP API3.4 Including the Routines and Building the Subagent Depending on the version of the Compaq C compiler you are using, you mightsee warnings that you can ignore. Portions of these warnings are as follows: %CC-I-SIGNEDKNOWN In this declaration, DEC C recognizes t...
Creating a Subagent Using the eSNMP API 3.5 Including Extension Subagents in the Startup and Shutdown Procedures File Name Edit Required TCPIP$EXTENSION_MIB_SHUTDOWN.COM Edit the example lines to: • Include symbols for the detached processes thatare running custom images. Use the same processnames s...
4 Using the SNMP Utilities TCP/IP Services includes the following programs, which are useful for testingapplications and for analyzing SNMP problems: • TCPIP$SNMP_REQUEST (MIB browser) (Section 4.1) • TCPIP$SNMP_TRPSND (trap sender) (Section 4.2) • TCPIP$SNMP_TRPRCV (trap receiver) (Section 4.2) The...
Using the SNMP Utilities4.1 Using the MIB Browser Table 4–1 (Cont.) snmp_request Command Parameters Parameter Function "community" The community string to be used in the query. This parameter is casesensitive. Typically, agents are configured to permit read access tothe community string "...
Using the SNMP Utilities 4.1 Using the MIB Browser Table 4–2 Flags for the snmp_request Command Flag Description -d Specifies hexadecimal dump mode. Before displaying a return value, displaysa hexadecimal dump of SNMP packets sent and received. For example: $ snmp_request host1 "public" getn...
Using the SNMP Utilities 4.1 Using the MIB Browser Table 4–2 (Cont.) Flags for the snmp_request Command Flag Description -s sleep_interval Specifies the number of seconds between iterations of sending a request(for the -r flag) and listening for a reply (for the -i ) flag. The default is 1 second. T...
Using the SNMP Utilities4.1 Using the MIB Browser Note Except for -l (Counter64), the data types are case sensitive. To preserve uppercase for display strings and NULL, enclose the value in doublequotation marks. For example, ‘‘– D ’’ or ‘‘– N ’’. On OpenVMS Alpha systems, you must specify the value...
Using the SNMP Utilities 4.1 Using the MIB Browser $ snmp_request marley.dec.com "public" get 1.3.6.1.2.1.2.2.1.2.1 -_$ 1.3.6.1.2.1.25.1.1.0 1.3.6.1.2.1.2.2.1.2.1 = LO IP Interface: LO0, OpenVMS Adapter: <none>, Loopback Port 1.3.6.1.2.1.25.1.1.0 = 6024942 = 0 d 16:44:9 3. The followin...
Using the SNMP Utilities4.1 Using the MIB Browser 6. The following example uses the same command as in example 5, but itspecifies the -t flag instead of the -l flag. Only OIDs with the prefix matching the input OID are returned. Note that as with other getnext request examples, the value for the inp...
Using the SNMP Utilities 4.2 Using the Trap Sender and Trap Receiver Programs By default, these programs use UDP port 162. However, you can specify anotherport with the -p flag or set up an SNMP-trap service that specifies the port you want to use. Note, however, that the use of UDP port 162 is code...
Using the SNMP Utilities4.2 Using the Trap Sender and Trap Receiver Programs Table 4–4 Parameters for the snmp_trapsnd Command Parameter Description enterprise For SNMP Version 1, specifies the enterprise object identifier (OID) on whosebehalf the trap is being sent. For example, 1.3.6.1.4.1.1. If y...
Using the SNMP Utilities 4.2 Using the Trap Sender and Trap Receiver Programs Table 4–5 (Cont.) Flags for the snmp_trapsnd Command Flag Description -h host Specifies the host name or IP address (in ASN.1 dot notation format) of thedestination host to receive the trap message. The default is localhos...
Using the SNMP Utilities4.2 Using the Trap Sender and Trap Receiver Programs enterprise - 1.2.3agent address - 6.20.208.53trap type - Enterprise-specific (6)enterprise-specific value - (33)timeticks - 100 4.2.2 Entering Commands for the Trap Receiver Program The trap receiver program lets you listen...
Using the SNMP Utilities 4.2 Using the Trap Sender and Trap Receiver Programs account that has SYSPRV privilege. Note that the port number must be greaterthan zero. 4.2.2.3 Trap Receiver Examples 1. The following example requests trap information on a system that does nothave traps configured and do...
5 eSNMP API Routines This chapter provides reference information about the following types ofapplication programming interface (API) routines in the eSNMP developer ’s kit: • Interface routines (Section 5.1) • Method routines (Section 5.2) • Support routines (Section 5.3) 5.1 Interface Routines The ...
eSNMP API Routinesesnmp_init esnmp_init Initializes the Extensible SNMP (eSNMP) subagent and initiates communication with the master agent. Format int esnmp_init (int *socket, char *subagent_identifier ) ; Arguments socket The address of the integer that receives the socket descriptor used by eSNMP....
eSNMP API Routines esnmp_register esnmp_register Requests local registration of a single MIB subtree. This indicates to the masteragent that the subagent instantiates MIB variables within the registered MIBsubtree. Format int esnmp_register ( subtree *subtree, int timeout,int priority ) ; Arguments ...
eSNMP API Routinesesnmp_register A subtree is identified by the base MIB name and the corresponding OID number of the node that is the parent of all MIB variables contained in the subtree. Forexample: The MIB II tcp subtree has an OID of 1.3.6.1.2.1.6 . All elements subordinate to this have the same...
eSNMP API Routines esnmp_register status = esnmp_register( &ipRouteEntry_subtree, RESPONSE_TIMEOUT,REGISTRATION_PRIORITY ); if (status != ESNMP_LIB_OK) { printf ("Could not queue the ’ipRouteEntry’ \n");printf ("subtree for registration\n"); } eSNMP API Routines 5–5
eSNMP API Routinesesnmp_unregister esnmp_unregister Cancels registration of a MIB subtree previously registered with the masteragent. Format int esnmp_unregister ( SUBTREE *subtree ) ; Arguments subtree A pointer to a subtree structure corresponding to the subtree to be handled.The code emitted by t...
eSNMP API Routines esnmp_register2 esnmp_register2 Requests registration of a single MIB subtree. This indicates to the master agentthat the subagent instantiates MIB variables within the registered MIB subtree.The esnmp_register2 routine offers extensions to the esnmp_register routine. Format int e...
eSNMP API Routinesesnmp_register2 Field Name Description range_upper_bound An integer value that, with a nonzero range_subidfield, specifies a range instead of one of the MIBsubtree’s OID subidentifiers. The range_upper_boundfield provides the upper bound of the range and therange_subid field provid...
eSNMP API Routines esnmp_register2 When restarting the eSNMP protocol by calling esnmp_init , all MIB subtree registrations are cleared. All MIB subtrees must be reregistered. A MIB subtree is identified by the base MIB variable name and its correspondingOID. This tuple represents the parent of all ...
eSNMP API Routinesesnmp_register2 Example #include <esnmp.h>#define RESPONSE_TIMEOUT 0 /* use the default time set in esnmp_init message */ #define REGISTRATION_PRIORITY 10 /* priority at which the MIB subtree will register */ #define RANGE_SUBID 7 /* the identifier position in oid->element...
eSNMP API Routines esnmp_unregister2 esnmp_unregister2 Cancels registration of a MIB subtree previously established with the masteragent. Use this routine only when the MIB subtree was registered using the esnmp_register2 routine. Format int esnmp_unregister2 ( ESNMP_REG *reg ) ; Arguments reg A poi...
eSNMP API Routinesesnmp_capabilities esnmp_capabilities Adds a subagent’s capabilities to the master agent’s sysORTable . The sysORTable is a conceptual table that contains an agent’s object resources, and is described inRFC 1907. Format void esnmp_capabilities ( OID *agent_cap_id, char *agent_cap_d...
eSNMP API Routines esnmp_uncapabilities esnmp_uncapabilities Removes a subagent’s capabilities from the master agent’s sysORTable . Format void esnmp_uncapabilities ( OID *agent_cap_id ) ; Arguments agent_cap_id A pointer to an object identifier that represents an authoritative agent capabilitieside...
eSNMP API Routinesesnmp_poll esnmp_poll Processes a pending message that was sent by the master agent. Format int esnmp_poll ( ) Description This routine is called after the select( ) call has indicated data is ready on the eSNMP socket. (This socket was returned from the call to the esnmp_init rout...
eSNMP API Routines esnmp_are_you_there esnmp_are_you_there Requests the master agent to report immediately that it is up and functioning. Format int esnmp_are_you_there ( ) ; Description The esnmp_are_you_there routine does not block waiting for a response. The routine is intended to cause the maste...
eSNMP API Routinesesnmp_trap esnmp_trap Sends a trap message to the master agent. Format int esnmp_trap ( int *generic_trap, int specific_trap,char *enterprise,varbind *vb ) 2 ; Arguments generic_trap A generic trap code. Set this argument value to 0 (zero) for SNMPv2 traps. specific_trap A specific...
eSNMP API Routines esnmp_term esnmp_term Sends a close message to the master agent and shuts down the subagent. Format void esnmp_term (void) ; Description Subagents must call this routine when terminating so that the master agent can update its MIB registry quickly and so that resources used by eSN...
eSNMP API Routinesesnmp_sysuptime esnmp_sysuptime Converts UNIX system time obtained from gettimeofday into a value with the same time base as sysUpTime . Format unsigned int esnmp_sysuptime ( struct timeval *timestamp ) ; Argument timestamp A pointer to struct timeval , which contains a value obtai...
eSNMP API Routines 5.2 Method Routines 5.2 Method Routines SNMP requests may contain many encoded MIB variables. The libsnmp code executing in a subagent matches each VariableBinding with an object table entry. The object table’s method routine is then called. Therefore, a methodroutine is called to...
eSNMP API Routines*_get Routine *_get Routine The *_get routine is a method routine for the specified MIB item, which is typically a MIB group (for example, system in MIB II) or a table entry (for example, ifEntry in MIB II). Format int mib-group_get ( METHOD *method ) ; Arguments method A pointer t...
eSNMP API Routines *_get Routine Field Name Description object A pointer to the object table entry forthe MIB variable being referenced. Themethod->object->object_index field is thisobject’s unique index within the object table(useful when one method routine services manyobjects).The method-&g...
eSNMP API Routines*_set Routine *_set Routine The *_set method routine for a specified MIB item, which is typically a MIB group (for example, system in MIB II) or a table entry (for example, ifEntry in MIB II). Format int mib-group_set ( METHOD *method ) ; Arguments method A pointer to a METHOD stru...
eSNMP API Routines *_set Routine Field Name Description row A pointer to a ROW_CONTEXT structure(defined in the ESNMP.H header file). All Set requests to the method routine that refer to thesame group and that have the same instancenumber will be presented with the same rowstructure. The method rout...
eSNMP API Routines*_set Routine Return Values ESNMP_MTHD_noError The routine completed successfully. ESNMP_MTHD_notWritable The requested object cannot be set or was not implemented. ESNMP_MTHD_wrongType The data type for the requested value is thewrong type. ESNMP_MTHD_wrongLength The requested val...
eSNMP API Routines *_set Routine If any row reports failure, all rows that were successfully committed are toldto undo the phase. This is accomplished by calling a single method routinefor each row (the same one that was called for the commit phase), with amethod->action equal to ESNMP_ACT_UNDO. ...
eSNMP API Routines*_set Routine • ESNMP_ACT_UNDO For each conceptual row that was successfully committed, the same methodroutine is called with method->action equal to ESNMP_ACT_UNDO. TheROW_CONTEXT structures that have not yet been called for the COMMITphase are not called for the UNDO phase; th...
eSNMP API Routines *_set Routine • Load the response OID back into the method routine’s VARBIND structure.Set the method->varbind field with the OID of the actual MIB variableinstance you are returning. This is usually accomplished by loading anarray of integers with the instance OID you wish to ...
eSNMP API Routines*_set Routine The displaystring is different only in that the character array can be interpreted as ASCII text, but the octetstring can be anything. If theoctetstring contains bits or a bit string, the OCT structure contains thefollowing: A length equal to the number of bytes neede...
eSNMP API Routines *_set Routine • ESNMP_TYPE_Integer32ESNMP_TYPE_Counter32ESNMP_TYPE_<Gauge32 (varbind->value.ul field) The 32-bit counter and 32-bit gauge data types are stored in the VARBINDstructure as an unsigned integer. Use the o_integer function to insert an unsigned value into the VAR...
eSNMP API Routines o_integer o_integer Loads an integer value into the VARBIND structure with the appropriate type. This function does not allocate the VARBIND structure. Format int o_integer ( VARBIND *vb,OBJECT *obj,unsigned long value ); Arguments vb A pointer to the VARBIND structure that is sup...
eSNMP API Routineso_integer Example #include <esnmp.h>#include "ip_tbl.h" <-- for ipNetToMediaEntry_type definition VARBIND *vb = method->varbind; OBJECT *object = method->object; ipNetToMediaEntry_type *data;:: assume buffer and structure member assignments occur here:switch(...
eSNMP API Routines o_octet o_octet Loads an octet value into the VARBIND structure with the appropriate type. Thisfunction does not allocate the VARBIND structure. Format int o_octet ( VARBIND *vb, OBJECT *obj,unsigned long value ); Arguments vb A pointer to the VARBIND structure that is supposed to...
eSNMP API Routineso_oid o_oid Loads an OID value into the VARBIND structure with the appropriate type. This function does not allocate the VARBIND structure. Format int o_oid ( VARBIND *vb, OBJECT *obj,OID *oid ); Arguments vb A pointer to the VARBIND structure that is supposed to receive the data. ...
eSNMP API Routines o_string o_string Loads a string value into the VARBIND structure with the appropriate type. This function does not allocate the VARBIND structure. Format int o_string ( VARBIND *vb, OBJECT *obj,unsigned character *ptr,int len ); Arguments vb A pointer to the VARBIND structure tha...
eSNMP API Routineso_string Example #include <esnmp.h>#include "ip_tbl.h" <-- for ipNetToMediaEntry_type definition VARBIND *vb = method->varbind; OBJECT *object = method->object; ipNetToMediaEntry_type *data;:: assume buffer and structure member assignments occur here:switch(a...
eSNMP API Routines o_counter64 o_counter64 Loads a counter64 value into the VARBIND structure. Format int o_counter64 ( VARBIND *vb,OBJECT *obj,uint64 value ); (for Alpha)uint64_vax value ; (for VAX)) Arguments vb A pointer to the VARBIND structure that is supposed to receive the data. obj A pointer...
eSNMP API Routinesstr2oid str2oid Converts a null-terminated string OID in dot notation to an OID structure. The str2oid routine does not allocate an OID structure. Format oid *str2oid ( oid *oid, char *s ); Arguments oid The value to be inserted as data into the VARBIND structure. For more informat...
eSNMP API Routines sprintoid sprintoid Converts an OID into a null-terminated string. Format char *sprintoid ( char *buffer, oid *oid ); Description An OID can have up to 128 elements. A full-sized OID can require a large buffer. Return Values The return value points to its first argument. Example #...
eSNMP API Routinesinstance2oid instance2oid Copies the object’s base OID and appends a copy of the instance array to make a complete OID for a value. This routine does not allocate an OID structure. Itonly allocates the array containing the elements. Format oid instance2oid ( oid *new, object *obj,u...
eSNMP API Routines instance2oid Example #include <esnmp.h>VARBIND *vb; <-- filled in OBJECT *object; <-- filled in unsigned int instance[6]; -- Construct the outgoing OID in a GETNEXT -- -- Instance is N.1.A.A.A.A where A’s are IP address --instance[0] = data->ipNetToMediaIfIndex;inst...
eSNMP API Routinesoid2instance oid2instance Extracts the instance values from an OID structure and copies them to the specified array of integers. The routine then returns the number of elements inthe array. Format int oid2instance ( oid *oid, object *obj,unsigned int *instance,int *max_len ); Argum...
eSNMP API Routines oid2instance Example #include <esnmp.h>OID *incoming = &method->varbind->name; OBJECT *object = method->object; int instLength; unsigned int instance[6]; -- in a GET operation ---- Expected Instance is N.1.A.A.A.A where A’s are IP address --instLength = oid2inst...
eSNMP API Routinesinst2ip inst2ip Returns an IP address derived from an OID instance. Format int inst2ip ( unsigned int *instance, int *length,unsigned int *ipaddr,int *exact,int *carry ); Arguments instance A pointer to an array of unsigned int containing the instance numbers returned by the oid2in...
eSNMP API Routines inst2ip Description Use the EXACT mode for evaluating an instance for Get and Set operations. For GetNext and GetBulk operations, use the NEXT mode. When using NEXT mode, this routine assumes that the search for data will be performed using greaterthan or equal to matches. Return ...
eSNMP API Routinesinst2ip The search key consists of a number and two ipaddr values. These arerepresented in the instance part of the OID as n.A.A.A.A.B.B.B.B, where: • n is a single value integer. • The A.A.A.A portion makes up one IP address. • The B.B.B.B portion makes up a second IP address. If ...
eSNMP API Routines cmp_oid cmp_oid Compares two OID structures. Format int cmp_oid ( oid *q, oid *p ); Description This routine does an element-by-element comparison, from the most significant element (element 0) to the least significant element. If all other elements areequal, the OID with the leas...
eSNMP API Routinescmp_oid_prefix cmp_oid_prefix Compares an OID against a prefix. Format int cmp_oid_prefix ( oid *q, oid *prefix ); Description A prefix could be the OID on an object in the object table. The elements beyond the prefix are the instance information. This routine does an element-by-el...
eSNMP API Routines clone_oid clone_oid Makes a copy of the OID. This routine does not allocate an OID structure. Format oid clone_oid ( oid *new, oid *oid ); Arguments new A pointer to the OID structure that is to receive the copy. oid A pointer to the OID structure where the data is to be obtained....
eSNMP API Routinesfree_oid free_oid Frees the OID structure’s buffer. This routine does not deallocate the OIDstructure itself; it deallocates the elements buffer attached to the structure. Format void free_oid ( oid *oid ); Description This routine frees the buffer pointed to by the OID->element...
eSNMP API Routines clone_buf clone_buf Duplicates a buffer in a dynamically allocated space. Format char clone_buf ( char *str, int *len ); Arguments str A pointer to the buffer to be duplicated. len The number of bytes to be copied. Description One extra byte is always allocated at the end and is f...
eSNMP API Routinesmem2oct mem2oct Converts a string (a buffer and length) to an oct structure with the new buffer ’s address and length. Format oct *mem2oct ( oct *new, char *buffer,int *len ); Arguments new A pointer to the oct structure receiving the data. buffer Pointer to the buffer to be conver...
eSNMP API Routines cmp_oct cmp_oct Compares two octet strings. Format int cmp_oct ( oct *oct1, oct *oct2 ); Arguments oct1 Pointer to the first octet string. oct2 Pointer to the second octet string. Description The two octet strings are compared byte-by-byte to determine the length of the shortest o...
eSNMP API Routinesclone_oct clone_oct Makes a copy of the data in an oct structure. This routine does not allocate an oct structure; it allocates the buffer pointed to by the oct structure. Format oct clone_oct ( oct *new, oct *old ); Arguments new A pointer to the oct structure receiving the data. ...
eSNMP API Routines free_oct free_oct Frees the buffer attached to an oct structure. This routine does not deallocate the oct structure; it deallocates the buffer to which the oct structure points. Format void free_oct ( oct *oct ); Description This routine frees the dynamically allocated buffer to w...
eSNMP API Routinesfree_varbind_data free_varbind_data Frees the dynamically allocated fields in the VARBIND structure. However, thisroutine does not deallocate the VARBIND structure itself; it deallocates the nameand data buffers to which the VARBIND structure points. Format void free_varbind_data (...
eSNMP API Routines set_debug_level set_debug_level Sets the logging level, which dictates what log messages are generated. Theprogram or module calls the routine during program initialization in response torun-time options. Format void set_debug_level ( int stat, unsigned integer null ); Arguments s...
eSNMP API Routinesis_debug_level is_debug_level Tests the logging level to see whether the specified logging level is set. You cantest the logging levels as follows: Level Meaning ERROR Used when a bad error occurs, requiring restart. WARNING Used when a packet cannot be handled; this also impliesER...
eSNMP API Routines ESNMP_LOG ESNMP_LOG This is an error declaration C macro defined in the ESNMP.H header file. It gathers the information that it can obtain and sends it to the log. Format ESNMP_LOG ( level, format, ... ); Description The esnmp_log routine is called using the ESNMP_LOG macro, which...
eSNMP API Routines_ _print_varbind _ _print_varbind Displays the VARBIND and its contents. This routine is used for debuggingpurposes. To use this routine, you must set the debug level to TRACE . Output is sent to the specified file. Format _ _print_varbind ( VARBIND *vb, int indent ); Arguments vb ...
eSNMP API Routines set_select_limit set_select_limit Sets the eSNMP select error limit. For more information, see Section 6.1. Format set_select_limit ( char *progname ); Arguments progname The subagent name. This argument is valid with DPI versions only. WithAgentX, the argument is NULL because sub...
eSNMP API Routines_ _set_progname _ _set_progname Specifies the program name that will be displayed in log messages. This routineshould be called from the main during program initialization. It needs to becalled only once. Format _ _set_progname ( char *prog ); Arguments prog The program name as tak...
eSNMP API Routines _ _restore_progname _ _restore_progname Restores the program name from the second application of the set. This routineshould be called only after the _ _set_progname routine has been called. You can use this to restore the most recent program name only. Format _ _restore_progname ...
eSNMP API Routines_ _parse_progname _ _parse_progname Parses the full file specification to extract only the file name and file extension. Format _ _parse_progname ( file-specification ); Arguments file-specification The full file specification for the subagent. Example #include "esnmp.h"sta...
eSNMP API Routines esnmp_cleanup esnmp_cleanup Closes open sockets that are used by the subagent for communicating with themaster agent. Format esnmp_cleanup ( ); Example #include "esnmp.h"int rc = ESNMP_LIB_OK;rc = esnmp_cleanup(); Return Values ESNMP_LIB_NOTOK There was no socket. ESNMP_LI...
6 Troubleshooting eSNMP Problems The eSNMP modules provided with TCP/IP Services include troubleshootingfeatures that are useful in controlling the way your subagent works. This chapter describes: • How to modify the subagent error limit (Section 6.1) • How to modify the default subagent timeout val...
Troubleshooting eSNMP Problems6.2 Modifying the Subagent Timeout The TCPIP$ESNMP_DEFAULT_TIMEOUT value is from 0 to 60 seconds. (Youshould use 0 only for testing purposes, such as simulating problems on a heavilyloaded host or network.) If the value you specify contains nonnumeric digits or isoutsid...
Troubleshooting eSNMP Problems 6.3 Log Files TCP/IP Services does not support writing log files to locations other than theSYS$SYSDEVICE:[TCPIP$SNMP] directory. The log files contain startup and event information and additional messages,depending on the logging level specified for an agent. The SNMP...
Index A AgentX protocol, 1–2API functionality, 1–6ASN.1 files, 3–5 C C compiler, 3–1Chess example tree structure, 3–4 clone_buf support routine, 5–51 clone_oct support routine, 5–54 clone_oid support routine, 5–49 cmp_oct support routine, 5–53 cmp_oid support routine, 5–47 cmp_oid_prefix support rou...
M Management information base (MIB), 1–1Master agent, 1–1 mem2oct support routine, 5–52 method routines routine reference, 5–19 to 5–24 MIB browser, 4–1 command examples, 4–6command flags, 4–2command parameters, 4–1data types, 4–5using, 4–1 MIBCOMP command example, 3–6command syntax, 3–5 MIB compile...
Trap sender (cont’d) command parameters, 4–9running, 4–9 Troubleshooting features, 6–1 U UNIX utilities, 3–7 W Writing subagents compiling, 3–5creating source files, 3–5including in startup and shutdown, 3–12linking and building, 3–11object tables, 3–7using ASN.1, 3–5using UNIX utilities, 3–7 Index–...
Compaq Manuals
-
Compaq SDLT 220GB
Manual
-
Compaq 60002MC10
Manual
-
Compaq 3500
Manual
-
Compaq DL580
Manual
-
Compaq PM-1
Manual
- Compaq Presario V2600 Notebook PC Manual
-
Compaq 420C 486 DX4/75 MHZ 420 MB 8 MB 10.4
Manual
-
Compaq SR1109UK
Manual
-
Compaq 326817-003
Manual
-
Compaq 212953-B21
Manual
-
Compaq MS500
Manual
-
Compaq 1000 LX
Manual
-
Compaq M700
Manual
-
Compaq 281862-002
Manual
-
Compaq H3100
Manual
- Compaq 4103TH Manual
-
Compaq JP2
Manual
-
Compaq 320
Manual
-
Compaq 300
Manual
-
Compaq AP230
Manual