Re: Setting multiple table rows in one set operation

"vsaavedra" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Thank you very much for your answers.



After reading your answers, I tried a simple example, and create a simple
MIB, with only one table, and try to do multiple set operations in one
snmpset operation.



The MIB definition is very simple, and I followed your advise and put the
MAX-ACCESS clause for table index to "not-accessible" (NOTE: the MIB SMI is
bellow) .



Then, I created a simple agent with mib2c, using  mib2c -c
mib2c.create-dataset.conf newtest. I didn't alter one line of the code
produced by mib2c.



Then, I tried the following operation:



snmpset -v 2c -c public localhost name.1 s "Name 1" name.2 s "Name 2"



and the result was:



NEW-TEST::name.1 = STRING: "Name 1"

NEW-TEST::name.2 = STRING: "Name 2"



But, when I did a bulkwalk in the table :



snmpbulkwalk -v2c -Os -c public localhost  newTest



the result was:



name.1 = STRING: "Name 2"



In the last post agent, i admit i probably made some mistakes, both in the
MIB SMI definition and in the agent code, but in this simple example I think
the SMI is correct and I didn't alter a line of code that mib2c produced.



Am I still making some kind of error in the MIB SMI definition?





MIB SMI -----------------------------------------------------------------



newtestTable  OBJECT-TYPE

            SYNTAX SEQUENCE OF NewtestEntry

            MAX-ACCESS not-accessible

            STATUS     current

            DESCRIPTION

                        ""

            ::= { newtest 1 }



newtestEntry  OBJECT-TYPE

            SYNTAX        NewtestEntry

            MAX-ACCESS not-accessible

            STATUS     current

            DESCRIPTION

                        ""

            INDEX { idx }

            ::= { newtestTable 1 }



NewtestEntry ::= SEQUENCE {

            idx

                        Integer32,

            name

                        OCTET STRING

}



idx  OBJECT-TYPE

            SYNTAX     Integer32

            MAX-ACCESS not-accessible

            STATUS     current

            DESCRIPTION

                        ""

            ::= { newtestEntry 1 }



name  OBJECT-TYPE

            SYNTAX     OCTET STRING

            MAX-ACCESS read-write

            STATUS     current

            DESCRIPTION

                        ""

            ::= { newtestEntry 2 }

END
















-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.