gtpc1m2l | Transmission Control Protocol/Internet Protocol |
You communicate between the SNMP manager and SNMP agent through the exchange of messages, each within a single UDP packet. The TPF system supports a maximum SNMP packet size of 548 bytes (excluding the IP and UDP headers). One SNMP agent server can be started per processor in a loosely coupled TPF complex by using the Internet daemon to monitor the network for SNMP packets.
As shown in the following table, an SNMP message consists of a version
identifier, an SNMP community name, and a PDU.
Table 5. SNMP Network Management Protocol Packet
SNMP version | Community name | PDU=PDU type, MIB variable 1, MIB variable 2, MIB variable 3, ....MIB variable n |
All units of data in an SNMP message are encoded using a subset of the basic encoding rules (BER). See ISO 8825 Part 1: Basic Encoding Rules for more information. Go to http://www.iso.ch/ to view ISO 8825.
The processing of an SNMP message begins when TPF receives an SNMP packet on well-known port 161. Message processing then continues as follows:
You can select one of these actions by specifying the appropriate return code when coding the UCOM user exit. See Coding the UCOM and UMIB User Exits and TPF System Installation Support Reference for more information about coding the UCOM user exit.
Step 1:
Step 2:
See User MIB Variables for more information.
The following example shows a variable binding requesting variable ifNumber from the TPF system.
300B 06072B06010201020100 0500 | Variable Encoded object ID for ifNumber NULL Value Binding Length encoded as type SEQUENCE_OF
The following example shows a variable binding response of variable ifNumber.
300D 06072B06010201020100 020104 | Variable Encoded object ID for ifNumber 4 interfaces encoded Binding as an integer Length encoded as type SEQUENCE_OF
An SNMP manager can make a request for the value of more than one MIB variable in an SNMP packet. The TPF system retrieves the value for each requested MIB variable and builds a variable binding. All the variable bindings are then packaged together by encoding them as a variable binding list, which is a simple list of variable names and their corresponding values. The variable binding list is included in the PDU section of the SNMP response packet and sent to the SNMP manager.
As stated previously, the SNMP architecture allows you to have your own enterprise-specific MIB variables through the use of the UMIB user exit. When an SNMP request is received by the TPF system and the requested MIB variable is not one of the SNMP system MIB variables, the UMIB user exit is called to provide the value for the specified variable or to indicate that the specified variable is not an enterprise-specific MIB variable. If you or the TPF system could not retrieve any of the requested MIB variables, the SNMP request is rejected.
Each MIB variable has an object identifier, which is BER-encoded and passed as input to the UMIB user exit. If the specified object identifier is known to you and is coded in the UMIB user exit, the UMIB user exit returns the BER-encoded object identifier and value for the requested MIB variable. The tpf_snmp_BER_encode C/C++ function allows you to encode a subset of the MIB variable types. See the TPF C/C++ Language Support User's Guide for more information about the tpf_snmp_BER_encode C/C++ function. See ISO 8825 Part 1: Basic Encoding Rules for more information about BER encoding. Go to http://www.iso.ch/ to view ISO 8825.
The UMIB user exit retrieves enterprise-specific MIB variables. You must maintain these variables and allocate and maintain your own storage for them. The SNMP architecture has created the iso.org.dod.internet.private.enterprises (1.3.6.1.4.1) portion of the SNMP hierarchical tree specifically for enterprise-specific MIB variables. Object identifiers that the SNMP architecture has set aside for the various system-controlled SNMP groups cannot be used for enterprise-specific purposes.
See Coding the UCOM and UMIB User Exits and TPF System Installation Support Reference for more information about the UMIB user exit.