FW: method confusion
Gavin Simpson
gsimpson____argogroup.com
Thu Apr 12 16:11:43 CEST 2001
> Hi,
>
> I've created the following mib and it passes the validator on
> http://snmp.cs.utwente.nl/ietf/mibs/validate/
>
> I've then turned it into an agent (on solaris) by using the agent
> generator.
>
> When I get the value of "command" (using HP OpenView) it's fine and
> calls the command::get_request method from within the testmib.cpp
> file.
> But if I get the value of "status" which is within a table, it calls
> the same function (command::get_request) instead of
> status::get_request.
> I've made sure that the mib definitely matches the agent.
>
> Does anyone have any suggestions as to what I'm doing wrong.
>
> Cheers,
> Gavin Simpson.
>
>
> TESTMIB DEFINITIONS ::= BEGIN
>
> IMPORTS
> OBJECT-TYPE,MODULE-IDENTITY, enterprises, Unsigned32
> FROM SNMPv2-SMI
> OBJECT-GROUP
> FROM SNMPv2-CONF
> ;
>
> test MODULE-IDENTITY
> LAST-UPDATED "200103221004Z"
> ORGANIZATION "blah"
> CONTACT-INFO "blah"
> DESCRIPTION
> "blah"
> ::= {enterprises 8970}
>
>
>
> testMIBObjects OBJECT IDENTIFIER ::= {test 1}
> testMIBGroups OBJECT IDENTIFIER ::= { test 2}
>
>
>
> statusTable OBJECT-TYPE
> SYNTAX SEQUENCE OF StatusEntry
> MAX-ACCESS not-accessible
> STATUS current
> DESCRIPTION
> "blah"
> ::= {testMIBObjects 1}
>
>
>
> statusEntry OBJECT-TYPE
> SYNTAX StatusEntry
> MAX-ACCESS not-accessible
> STATUS current
> DESCRIPTION
> "an entry in the table containing the status...."
> INDEX { statusIndex }
> ::= { statusTable 1 }
>
>
>
> StatusEntry ::= SEQUENCE {
> statusIndex Unsigned32,
> status INTEGER
>
> }
>
>
>
> statusIndex OBJECT-TYPE
> SYNTAX Unsigned32 (1..255)
> MAX-ACCESS not-accessible
> STATUS current
> DESCRIPTION
> "index..."
> ::= { statusEntry 1 }
>
>
>
> status OBJECT-TYPE
> SYNTAX INTEGER
> {
> running(1),
> stopped(2)
> }
> MAX-ACCESS read-only
> STATUS current
> DESCRIPTION
> "Returns status"
> DEFVAL {stopped}
> ::= {statusEntry 2}
>
>
>
> command OBJECT-TYPE
> SYNTAX INTEGER
> {
> start(1),
> stop(2)
> }
> MAX-ACCESS read-write
> STATUS current
> DESCRIPTION
> "sends command to test-application"
> ::= {testMIBObjects 2}
>
>
>
> system OBJECT-GROUP
> OBJECTS {command,
> status}
> STATUS current
> DESCRIPTION
> "blah"
> ::= { testMIBGroups 1}
> END
More information about the AGENTPP
mailing list