SNMP Subagent Programmer's Guide

Binding
5-4 119728—SNMP Subagent Programmer’s Guide
Creating Executable Subagents
5. The subagent receives a Get request from a manager.
6. The subagent replies to the Get request.
7. The subagent prints its message again.
Use tracing only for subagents still in development. Tracing should not be used for
subagents in production use, because subagents run more slowly when tracing is in use.
The increased response time between manager and subagent may exceed the timeout
window of a manager station.
Example 5-1. Example of Run-Time Library Trace Records
TRACE 1970-01-01 00:00:11.000000 SMUX Client transmitting <-- 1
SMUX SMUX_OPEN_PDU PDU:
version = 0
identity = 1.3.6.1.4.1.442.2.1
description = H e l l o SP W o r l d SP E x a m
p l e
password =
TRACE 1970-01-01 00:00:11.000000 SMUX Client transmitting <-- 2
SMUX SMUX_RREQ_PDU PDU:
subtree = 1.3.6.1.4.1.442.2.1
priority = -1
operation = 2
TRACE 1970-01-01 00:00:11.000000 SMUX Client Received <-- 3
SMUX SMUX_RRSP_PDU PDU:
priority = 0
Hello World <-- 4
TRACE 1970-01-01 00:00:11.000000 SMUX Client Received <-- 5
SMUX SNMP_GET_PDU PDU:
Wrapperless SNMP
pdu kind 0 is SNMP_GET_PDU
request id 768230
error 0
index 0
Variable bindings ( 1 total):
1 Name: 1.3.6.1.4.1.442.2.1.1.0
Type: 0 (empty)
Value: (Null type)
TRACE 1970-01-01 00:00:11.000000 SMUX Client transmitting <-- 6
SMUX SNMP_GET_RESP_PDU PDU:
Wrapperless SNMP
pdu kind 2 is SNMP_GET_RESP_PDU
request id 768230
error 0
index 0
Variable bindings ( 1 total):
1 Name: 1.3.6.1.4.1.442.2.1.1.0
Type: 1 (string)
Value: (string 11 bytes)
H e l l o SP W o r l d
Hello World <-- 7
...