Blame mibs/NET-SNMP-EXAMPLES-MIB.txt

Packit fcad23
NET-SNMP-EXAMPLES-MIB DEFINITIONS ::= BEGIN
Packit fcad23
Packit fcad23
--
Packit fcad23
-- Example MIB objects for agent module example implementations
Packit fcad23
--
Packit fcad23
Packit fcad23
IMPORTS
Packit fcad23
    MODULE-IDENTITY, OBJECT-TYPE, Integer32,
Packit fcad23
    NOTIFICATION-TYPE                       FROM SNMPv2-SMI
Packit fcad23
    SnmpAdminString                         FROM SNMP-FRAMEWORK-MIB
Packit fcad23
    netSnmp                                 FROM NET-SNMP-MIB
Packit fcad23
    RowStatus, StorageType                  FROM SNMPv2-TC
Packit fcad23
    InetAddressType, InetAddress            FROM INET-ADDRESS-MIB
Packit fcad23
;
Packit fcad23
Packit fcad23
netSnmpExamples MODULE-IDENTITY
Packit fcad23
    LAST-UPDATED "200406150000Z"
Packit fcad23
    ORGANIZATION "www.net-snmp.org"
Packit fcad23
    CONTACT-INFO    
Packit fcad23
	 "postal:   Wes Hardaker
Packit fcad23
                    P.O. Box 382
Packit fcad23
                    Davis CA  95617
Packit fcad23
Packit fcad23
          email:    net-snmp-coders@lists.sourceforge.net"
Packit fcad23
    DESCRIPTION
Packit fcad23
	"Example MIB objects for agent module example implementations"
Packit fcad23
    REVISION     "200406150000Z"
Packit fcad23
    DESCRIPTION
Packit fcad23
	"Corrected notification example definitions"
Packit fcad23
    REVISION     "200202060000Z"
Packit fcad23
    DESCRIPTION
Packit fcad23
	"First draft"
Packit fcad23
    ::= { netSnmp 2 }
Packit fcad23
Packit fcad23
--
Packit fcad23
-- top level structure
Packit fcad23
--
Packit fcad23
netSnmpExampleScalars       OBJECT IDENTIFIER ::= { netSnmpExamples 1 }
Packit fcad23
netSnmpExampleTables        OBJECT IDENTIFIER ::= { netSnmpExamples 2 }
Packit fcad23
netSnmpExampleNotifications OBJECT IDENTIFIER ::= { netSnmpExamples 3 }
Packit fcad23
netSnmpExampleNotificationPrefix  OBJECT IDENTIFIER
Packit fcad23
                                  ::= { netSnmpExampleNotifications 0 }
Packit fcad23
netSnmpExampleNotificationObjects OBJECT IDENTIFIER
Packit fcad23
                                  ::= { netSnmpExampleNotifications 2 }
Packit fcad23
-- netSnmpTutorial          OBJECT IDENTIFIER ::= { netSnmpExamples 4 }
Packit fcad23
Packit fcad23
--
Packit fcad23
-- Example scalars
Packit fcad23
--
Packit fcad23
Packit fcad23
netSnmpExampleInteger OBJECT-TYPE
Packit fcad23
    SYNTAX      Integer32
Packit fcad23
    MAX-ACCESS  read-write
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"This is a simple object which merely houses a writable
Packit fcad23
	 integer.  It's only purposes is to hold the value of a single
Packit fcad23
	 integer.  Writing to it will simply change the value for
Packit fcad23
	 subsequent GET/GETNEXT/GETBULK retrievals.
Packit fcad23
Packit fcad23
	 This example object is implemented in the
Packit fcad23
	 agent/mibgroup/examples/scalar_int.c file."
Packit fcad23
    DEFVAL { 42 }
Packit fcad23
    ::= { netSnmpExampleScalars 1 }
Packit fcad23
Packit fcad23
netSnmpExampleSleeper OBJECT-TYPE
Packit fcad23
    SYNTAX      Integer32
Packit fcad23
    MAX-ACCESS  read-write
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"This is a simple object which is a basic integer.  It's value
Packit fcad23
	 indicates the number of seconds that the agent will take in
Packit fcad23
	 responding to requests of this object.  This is implemented
Packit fcad23
	 in a way which will allow the agent to keep responding to
Packit fcad23
	 other requests while access to this object is blocked.  It is
Packit fcad23
	 writable, and changing it's value will change the amount of
Packit fcad23
	 time the agent will effectively wait for before returning a
Packit fcad23
	 response when this object is manipulated.  Note that SET
Packit fcad23
	 requests through this object will take longer, since the
Packit fcad23
	 delay is applied to each internal transaction phase, which
Packit fcad23
	 could result in delays of up to 4 times the value of this
Packit fcad23
	 object.
Packit fcad23
Packit fcad23
	 This example object is implemented in the
Packit fcad23
	 agent/mibgroup/examples/delayed_instance.c file."
Packit fcad23
    DEFVAL { 1 }
Packit fcad23
    ::= { netSnmpExampleScalars 2 }
Packit fcad23
Packit fcad23
netSnmpExampleString OBJECT-TYPE
Packit fcad23
    SYNTAX      SnmpAdminString
Packit fcad23
    MAX-ACCESS  read-write
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"This is a simple object which merely houses a writable
Packit fcad23
	 string.  It's only purposes is to hold the value of a single
Packit fcad23
	 string.  Writing to it will simply change the value for
Packit fcad23
	 subsequent GET/GETNEXT/GETBULK retrievals.
Packit fcad23
Packit fcad23
	 This example object is implemented in the
Packit fcad23
	 agent/mibgroup/examples/watched.c file."
Packit fcad23
    DEFVAL { "So long, and thanks for all the fish!" }
Packit fcad23
    ::= { netSnmpExampleScalars 3 }
Packit fcad23
Packit fcad23
Packit fcad23
--
Packit fcad23
--  Example Tables
Packit fcad23
--
Packit fcad23
Packit fcad23
netSnmpIETFWGTable OBJECT-TYPE
Packit fcad23
    SYNTAX      SEQUENCE OF NetSnmpIETFWGEntry
Packit fcad23
    MAX-ACCESS  not-accessible
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"This table merely contains a set of data which is otherwise
Packit fcad23
	 useless for true network management.  It is a table which
Packit fcad23
	 describes properies about a IETF Working Group, such as the
Packit fcad23
	 names of the two working group chairs.
Packit fcad23
Packit fcad23
	 This example table is implemented in the
Packit fcad23
	 agent/mibgroup/examples/data_set.c file."
Packit fcad23
    ::= { netSnmpExampleTables 1 }
Packit fcad23
Packit fcad23
netSnmpIETFWGEntry OBJECT-TYPE
Packit fcad23
    SYNTAX      NetSnmpIETFWGEntry
Packit fcad23
    MAX-ACCESS  not-accessible
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"A row describing a given working group"
Packit fcad23
    INDEX   { nsIETFWGName }
Packit fcad23
    ::= {netSnmpIETFWGTable 1 }
Packit fcad23
Packit fcad23
NetSnmpIETFWGEntry ::= SEQUENCE {
Packit fcad23
	nsIETFWGName	OCTET STRING,
Packit fcad23
	nsIETFWGChair1	OCTET STRING,
Packit fcad23
	nsIETFWGChair2	OCTET STRING
Packit fcad23
}
Packit fcad23
Packit fcad23
nsIETFWGName OBJECT-TYPE
Packit fcad23
    SYNTAX      OCTET STRING (SIZE(1..32))
Packit fcad23
    MAX-ACCESS  not-accessible
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"The name of the IETF Working Group this table describes."
Packit fcad23
    ::= { netSnmpIETFWGEntry 1 }
Packit fcad23
Packit fcad23
nsIETFWGChair1 OBJECT-TYPE
Packit fcad23
    SYNTAX      OCTET STRING
Packit fcad23
    MAX-ACCESS  read-create
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"One of the names of the chairs for the IETF working group."
Packit fcad23
    ::= { netSnmpIETFWGEntry 2 }
Packit fcad23
Packit fcad23
nsIETFWGChair2 OBJECT-TYPE
Packit fcad23
    SYNTAX      OCTET STRING
Packit fcad23
    MAX-ACCESS  read-create
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"The other name, if one exists, of the chairs for the IETF
Packit fcad23
	working group."
Packit fcad23
    ::= { netSnmpIETFWGEntry 3 }
Packit fcad23
Packit fcad23
--
Packit fcad23
-- A table used in a table_iterator example
Packit fcad23
--   (agent/mibgroup/examples/netSnmpHostsTable*.[ch])
Packit fcad23
--
Packit fcad23
Packit fcad23
netSnmpHostsTable OBJECT-TYPE
Packit fcad23
    SYNTAX      SEQUENCE OF NetSnmpHostsEntry
Packit fcad23
    MAX-ACCESS  not-accessible
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"An example table that implements a wrapper around the
Packit fcad23
	/etc/hosts file on a machine using the iterator helper API."
Packit fcad23
    ::= { netSnmpExampleTables 2 }
Packit fcad23
Packit fcad23
netSnmpHostsEntry OBJECT-TYPE
Packit fcad23
    SYNTAX      NetSnmpHostsEntry
Packit fcad23
    MAX-ACCESS  not-accessible
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"A host name mapped to an ip address"
Packit fcad23
    INDEX   { netSnmpHostName }
Packit fcad23
    ::= { netSnmpHostsTable 1 }
Packit fcad23
Packit fcad23
NetSnmpHostsEntry ::= SEQUENCE {
Packit fcad23
    netSnmpHostName         OCTET STRING,
Packit fcad23
    netSnmpHostAddressType  InetAddressType,
Packit fcad23
    netSnmpHostAddress      InetAddress,
Packit fcad23
    netSnmpHostStorage      StorageType,
Packit fcad23
    netSnmpHostRowStatus    RowStatus
Packit fcad23
}
Packit fcad23
Packit fcad23
netSnmpHostName OBJECT-TYPE
Packit fcad23
    SYNTAX      OCTET STRING (SIZE(0..64))
Packit fcad23
    MAX-ACCESS  not-accessible
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"A host name that exists in the /etc/hosts (unix) file."
Packit fcad23
    ::= { netSnmpHostsEntry 1 }
Packit fcad23
Packit fcad23
netSnmpHostAddressType OBJECT-TYPE
Packit fcad23
    SYNTAX      InetAddressType
Packit fcad23
    MAX-ACCESS  read-create
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"The address type of then given host."
Packit fcad23
    ::= { netSnmpHostsEntry 2 }
Packit fcad23
Packit fcad23
netSnmpHostAddress OBJECT-TYPE
Packit fcad23
    SYNTAX      InetAddress
Packit fcad23
    MAX-ACCESS  read-create
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
	"The address of then given host."
Packit fcad23
    ::= { netSnmpHostsEntry 3 }
Packit fcad23
Packit fcad23
netSnmpHostStorage OBJECT-TYPE
Packit fcad23
    SYNTAX       StorageType
Packit fcad23
    MAX-ACCESS   read-create
Packit fcad23
    STATUS       current
Packit fcad23
    DESCRIPTION "The storage type for this conceptual row."
Packit fcad23
    DEFVAL      { nonVolatile }
Packit fcad23
    ::= { netSnmpHostsEntry 4 }
Packit fcad23
Packit fcad23
netSnmpHostRowStatus OBJECT-TYPE
Packit fcad23
    SYNTAX       RowStatus
Packit fcad23
    MAX-ACCESS   read-create
Packit fcad23
    STATUS       current
Packit fcad23
    DESCRIPTION "The status of this conceptual row."
Packit fcad23
    ::= { netSnmpHostsEntry 5 }
Packit fcad23
Packit fcad23
Packit fcad23
--
Packit fcad23
--  Example Notifications
Packit fcad23
--
Packit fcad23
Packit fcad23
netSnmpExampleHeartbeatRate OBJECT-TYPE
Packit fcad23
    SYNTAX      Integer32
Packit fcad23
    MAX-ACCESS  accessible-for-notify
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
        "A simple integer object, to act as a payload for the
Packit fcad23
         netSnmpExampleHeartbeatNotification.  The value has
Packit fcad23
         no real meaning, but is nominally the interval (in
Packit fcad23
         seconds) between successive heartbeat notifications."
Packit fcad23
::= { netSnmpExampleNotificationObjects 1 }
Packit fcad23
Packit fcad23
netSnmpExampleHeartbeatName OBJECT-TYPE
Packit fcad23
    SYNTAX      SnmpAdminString
Packit fcad23
    MAX-ACCESS  accessible-for-notify
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
        "A simple string object, to act as an optional payload
Packit fcad23
         for the netSnmpExampleHeartbeatNotification.  This varbind
Packit fcad23
         is not part of the notification definition, so is optional
Packit fcad23
         and need not be included in the notification payload. 
Packit fcad23
         The value has no real meaning, but the romantically inclined
Packit fcad23
         may take it to be the object of the sender's affection,
Packit fcad23
         and hence the cause of the heart beating faster."
Packit fcad23
::= { netSnmpExampleNotificationObjects 2 }
Packit fcad23
Packit fcad23
netSnmpExampleHeartbeatNotification NOTIFICATION-TYPE
Packit fcad23
    OBJECTS     { netSnmpExampleHeartbeatRate }
Packit fcad23
    STATUS      current
Packit fcad23
    DESCRIPTION
Packit fcad23
        "An example notification, used to illustrate the
Packit fcad23
         definition and generation of trap and inform PDUs
Packit fcad23
         (including the use of both standard and additional
Packit fcad23
         varbinds in the notification payload).
Packit fcad23
         This notification will typically be sent every
Packit fcad23
	 30 seconds, using the code found in the example module
Packit fcad23
             agent/mibgroup/examples/notification.c"
Packit fcad23
::= { netSnmpExampleNotificationPrefix 1 }
Packit fcad23
    
Packit fcad23
netSnmpExampleNotification OBJECT-TYPE
Packit fcad23
    SYNTAX      SnmpAdminString
Packit fcad23
    MAX-ACCESS  accessible-for-notify
Packit fcad23
    STATUS      obsolete
Packit fcad23
    DESCRIPTION
Packit fcad23
        "This object was improperly defined for its original purpose,
Packit fcad23
         and should no longer be used."
Packit fcad23
::= { netSnmpExampleNotifications 1 }
Packit fcad23
Packit fcad23
END