Hi all,

I am using NetSNMP 5.5, and have created a simple subagent using 
mib2c.create-dataset.conf to manage a table.
I've had great success using the table data set handler, but now I want to 
support row creation from an SNMP manager.

Can someone please clarify how (or if) table_dataset.c creates indices for new 
rows if the values are NOT specified in an SNMP SET request?

For example, given the eval table from RFC 2578 (see below), how would I create 
a new row from a manager, assuming I was running a subagent with handler code 
(created using mib2c.cretae-dataset.conf)?  Note that evalIndex is read-only - 
this appears to be common in MIBs when using numeric indices.  I can certainly 
set MAX-ACCESS of the evalIndex 'read-create' and simply supply the index value 
in the multivariable SET, but I kinda wanted to know how the big boys do it 
with a 'read-only' index.

I have been able to set all the other columnar objects (including the RowStatus 
column) using a multivariable snmpset (with no index value supplied).  I can 
see the columnar values of the new row using snmpget.

I also tried setting the RowStatus value to 'active', thinking this might 
trigger some row index activity in the table data set handler.  When I try to 
get the value of the index, I get a "no such instance message".

Regards,

Dave

   Consider how one might define a conceptual table and its
   subordinates.  (This example uses the RowStatus textual convention
   defined in [3].)

   evalSlot OBJECT-TYPE
       SYNTAX      Integer32 (0..2147483647)
       MAX-ACCESS  read-only
       STATUS      current
       DESCRIPTION
               "The index number of the first unassigned entry in the
               evaluation table, or the value of zero indicating that
               all entries are assigned.

               A management station should create new entries in the
               evaluation table using this algorithm:  first, issue a
               management protocol retrieval operation to determine the
               value of evalSlot; and, second, issue a management
               protocol set operation to create an instance of the
               evalStatus object setting its value to createAndGo(4) or
               createAndWait(5).  If this latter operation succeeds,
               then the management station may continue modifying the
               instances corresponding to the newly created conceptual
               row, without fear of collision with other management
               stations."
      ::= { eval 1 }

   evalTable OBJECT-TYPE
       SYNTAX      SEQUENCE OF EvalEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
               "The (conceptual) evaluation table."
      ::= { eval 2 }

   evalEntry OBJECT-TYPE
       SYNTAX      EvalEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
               "An entry (conceptual row) in the evaluation table."
      INDEX   { evalIndex }
      ::= { evalTable 1 }

   EvalEntry ::=
       SEQUENCE {
           evalIndex       Integer32,
           evalString      DisplayString,
           evalValue       Integer32,
           evalStatus      RowStatus
       }

   evalIndex OBJECT-TYPE
       SYNTAX      Integer32 (1..2147483647)
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
               "The auxiliary variable used for identifying instances of
               the columnar objects in the evaluation table."
           ::= { evalEntry 1 }

   evalString OBJECT-TYPE
       SYNTAX      DisplayString
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION
               "The string to evaluate."
           ::= { evalEntry 2 }

   evalValue OBJECT-TYPE
       SYNTAX      Integer32
       MAX-ACCESS  read-only
       STATUS      current
       DESCRIPTION
               "The value when evalString was last evaluated, or zero if
                no such value is available."
       DEFVAL  { 0 }
           ::= { evalEntry 3 }

   evalStatus OBJECT-TYPE
       SYNTAX      RowStatus
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION
               "The status column used for creating, modifying, and
               deleting instances of the columnar objects in the
               evaluation table."
    DEFVAL  { active }
        ::= { evalEntry 4 }





This message (and any attachments) contains Sarnoff proprietary information. 
Such information may be subject to the terms of confidentiality or other 
agreements. If you are not the named addressee, you should not disseminate, 
distribute, or copy this email. If you have received this email by mistake, 
please notify the sender immediately by email and delete this email from your 
system. If you are not the intended recipient, you are notified that 
disclosing, copying, distributing, or taking any action in reliance on the 
contents of this information is strictly prohibited.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
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

Reply via email to