home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / mibs / netsnmp / NET-SNMP-EXTEND-MIB < prev    next >
Encoding:
Text File  |  2011-01-05  |  9.1 KB  |  326 lines

  1. NET-SNMP-EXTEND-MIB DEFINITIONS ::= BEGIN
  2.  
  3. --
  4. -- Defines a framework for scripted extensions
  5. --
  6.  
  7. IMPORTS
  8.     nsExtensions FROM NET-SNMP-AGENT-MIB
  9.  
  10.     OBJECT-TYPE, NOTIFICATION-TYPE, MODULE-IDENTITY, Integer32
  11.         FROM SNMPv2-SMI
  12.  
  13.     OBJECT-GROUP, NOTIFICATION-GROUP
  14.     FROM SNMPv2-CONF
  15.  
  16.     DisplayString, RowStatus, StorageType FROM SNMPv2-TC;
  17.  
  18.  
  19. netSnmpExtendMIB MODULE-IDENTITY
  20.     LAST-UPDATED "201003170000Z"
  21.     ORGANIZATION "www.net-snmp.org"
  22.     CONTACT-INFO    
  23.      "postal:   Wes Hardaker
  24.                     P.O. Box 382
  25.                     Davis CA  95617
  26.  
  27.           email:    net-snmp-coders@lists.sourceforge.net"
  28.     DESCRIPTION
  29.      "Defines a framework for scripted extensions for the Net-SNMP agent."
  30.     REVISION     "201003170000Z"
  31.     DESCRIPTION
  32.          "Fixed inconsistencies in the definition of nsExtendConfigTable."
  33.     REVISION     "200405080000Z"
  34.     DESCRIPTION
  35.     "First revision."
  36.     ::= { nsExtensions 1 }
  37.  
  38. nsExtendObjects  OBJECT IDENTIFIER ::= { nsExtensions 2}
  39. nsExtendGroups   OBJECT IDENTIFIER ::= { nsExtensions 3}
  40.  
  41. nsExtendNumEntries OBJECT-TYPE
  42.     SYNTAX      INTEGER
  43.     MAX-ACCESS  read-only
  44.     STATUS      current
  45.     DESCRIPTION
  46.       "The number of rows in the nsExtendConfigTable"
  47.     ::= { nsExtendObjects 1 }
  48.  
  49. nsExtendConfigTable     OBJECT-TYPE
  50.     SYNTAX      SEQUENCE OF NsExtendConfigEntry
  51.     MAX-ACCESS  not-accessible
  52.     STATUS      current
  53.     DESCRIPTION
  54.       "A table of scripted extensions - configuration and (basic) output."
  55.     ::= { nsExtendObjects 2 }
  56.  
  57. nsExtendConfigEntry     OBJECT-TYPE
  58.     SYNTAX      NsExtendConfigEntry
  59.     MAX-ACCESS  not-accessible
  60.     STATUS      current
  61.     DESCRIPTION
  62.       "A conceptual row within the extension table."
  63.     INDEX       { nsExtendToken }
  64.     ::= { nsExtendConfigTable 1 }
  65.  
  66. NsExtendConfigEntry ::= SEQUENCE {
  67.     nsExtendToken       DisplayString,
  68.     nsExtendCommand     DisplayString,
  69.     nsExtendArgs        DisplayString,
  70.     nsExtendInput       DisplayString,
  71.     nsExtendCacheTime   INTEGER,
  72.     nsExtendExecType    INTEGER,
  73.     nsExtendRunType     INTEGER,
  74.  
  75.     nsExtendStorage     StorageType,
  76.     nsExtendStatus      RowStatus
  77. }
  78.  
  79.     --
  80.     --  The configuration of an extension command
  81.     --
  82.  
  83. nsExtendToken   OBJECT-TYPE
  84.     SYNTAX      DisplayString
  85.     MAX-ACCESS  not-accessible
  86.     STATUS      current
  87.     DESCRIPTION
  88.       "An arbitrary token to identify this extension entry"
  89.     ::= { nsExtendConfigEntry 1 }
  90.  
  91. nsExtendCommand OBJECT-TYPE
  92.     SYNTAX      DisplayString
  93.     MAX-ACCESS  read-create
  94.     STATUS      current
  95.     DESCRIPTION
  96.       "The full path of the command binary (or script) to run"
  97.     ::= { nsExtendConfigEntry 2 }
  98.  
  99. nsExtendArgs    OBJECT-TYPE
  100.     SYNTAX      DisplayString
  101.     MAX-ACCESS  read-create
  102.     STATUS      current
  103.     DESCRIPTION
  104.       "Any command-line arguments for the command"
  105.     DEFVAL      { ''H }   -- the empty string
  106.     ::= { nsExtendConfigEntry 3 }
  107.  
  108. nsExtendInput   OBJECT-TYPE
  109.     SYNTAX      DisplayString
  110.     MAX-ACCESS  read-create
  111.     STATUS      current
  112.     DESCRIPTION
  113.       "The standard input for the command"
  114.     DEFVAL      { ''H }   -- the empty string
  115.     ::= { nsExtendConfigEntry 4 }
  116.  
  117. nsExtendCacheTime OBJECT-TYPE
  118.     SYNTAX      INTEGER
  119.     MAX-ACCESS  read-create
  120.     STATUS      current
  121.     DESCRIPTION
  122.       "The length of time for which the output of
  123.        this command will be cached.  During this time,
  124.        retrieving the output-related values will not
  125.        reinvoke the command.
  126.        A value of -1 indicates that the output results
  127.        should not be cached at all, and retrieving each
  128.        individual output-related value will invoke the
  129.        command afresh." 
  130.     DEFVAL      { 5 }
  131.     ::= { nsExtendConfigEntry 5 }
  132.  
  133. nsExtendExecType OBJECT-TYPE
  134.     SYNTAX      INTEGER
  135.                { exec  (1), -- 'fork-and-exec'
  136.                  shell (2)  -- run via a sub-shell
  137.                }
  138.     MAX-ACCESS  read-create
  139.     STATUS      current
  140.     DESCRIPTION
  141.       "The mechanism used to invoke the command."
  142.     DEFVAL      { exec }
  143.     ::= { nsExtendConfigEntry 6 }
  144.  
  145. nsExtendRunType OBJECT-TYPE
  146.     SYNTAX      INTEGER
  147.                { run-on-read (1),
  148.                  run-on-set  (2),
  149.                  run-command (3)
  150.                }
  151.     MAX-ACCESS  read-create
  152.     STATUS      current
  153.     DESCRIPTION
  154.       "Used to implement 'push-button' command invocation.
  155.        The command for a 'run-on-read' entry will be invoked
  156.        whenever one of the corresponding output-related
  157.        instances is requested (and assuming the cached value
  158.        is not still current).
  159.        The command for a 'run-on-set' entry will only be invoked
  160.        on receipt of a SET assignment for this object with the
  161.        value 'run-command'.
  162.        Reading an instance of this object will always return either
  163.        'run-on-read' or 'run-on-set'.
  164.       "
  165.     DEFVAL      { run-on-read }
  166.     ::= { nsExtendConfigEntry 7 }
  167.  
  168.     --
  169.     --  Standard table-manipulation objects
  170.     --
  171.  
  172. nsExtendStorage OBJECT-TYPE
  173.     SYNTAX      StorageType
  174.     MAX-ACCESS  read-create
  175.     STATUS      current
  176.     DESCRIPTION
  177.       "The storage type for this conceptual row."
  178.     DEFVAL      { volatile }
  179.     ::= { nsExtendConfigEntry 20 }
  180.  
  181. nsExtendStatus  OBJECT-TYPE
  182.     SYNTAX      RowStatus
  183.     MAX-ACCESS  read-create
  184.     STATUS      current
  185.     DESCRIPTION
  186.       "Used to create new rows in the table, in the standard manner.
  187.        Note that is valid for an instance to be left with the value
  188.        notInService(2) indefinitely - i.e. the meaning of 'abnormally
  189.        long' (see RFC 2579, RowStatus) for this table is infinite."
  190.     ::= { nsExtendConfigEntry 21 }
  191.  
  192.  
  193.     --
  194.     --  The results of running the extension command
  195.     --
  196.  
  197. nsExtendOutput1Table     OBJECT-TYPE
  198.     SYNTAX      SEQUENCE OF NsExtendOutput1Entry
  199.     MAX-ACCESS  not-accessible
  200.     STATUS      current
  201.     DESCRIPTION
  202.       "A table of scripted extensions - configuration and (basic) output."
  203.     ::= { nsExtendObjects 3 }
  204.  
  205. nsExtendOutput1Entry     OBJECT-TYPE
  206.     SYNTAX      NsExtendOutput1Entry
  207.     MAX-ACCESS  not-accessible
  208.     STATUS      current
  209.     DESCRIPTION
  210.       "A conceptual row within the extension table."
  211.     AUGMENTS    { nsExtendConfigEntry }
  212.     ::= { nsExtendOutput1Table 1 }
  213.  
  214. NsExtendOutput1Entry ::= SEQUENCE {
  215.     nsExtendOutput1Line DisplayString,
  216.     nsExtendOutputFull  DisplayString,
  217.     nsExtendOutNumLines Integer32,
  218.     nsExtendResult      Integer32
  219. }
  220.  
  221. nsExtendOutput1Line OBJECT-TYPE
  222.     SYNTAX      DisplayString
  223.     MAX-ACCESS  read-only
  224.     STATUS      current
  225.     DESCRIPTION
  226.       "The first line of output from the command"
  227.     ::= { nsExtendOutput1Entry 1 }
  228.  
  229. nsExtendOutputFull  OBJECT-TYPE
  230.     SYNTAX      DisplayString
  231.     MAX-ACCESS  read-only
  232.     STATUS      current
  233.     DESCRIPTION
  234.       "The full output from the command, as a single string"
  235.     ::= { nsExtendOutput1Entry 2 }
  236.  
  237. nsExtendOutNumLines OBJECT-TYPE
  238.     SYNTAX      Integer32
  239.     MAX-ACCESS  read-only
  240.     STATUS      current
  241.     DESCRIPTION
  242.       "The number of lines of output (and hence
  243.        the number of rows in nsExtendOutputTable
  244.        relating to this particular entry)."
  245.     ::= { nsExtendOutput1Entry 3 }
  246.  
  247. nsExtendResult  OBJECT-TYPE
  248.     SYNTAX      Integer32
  249.     MAX-ACCESS  read-only
  250.     STATUS      current
  251.     DESCRIPTION
  252.       "The return value of the command."
  253.     ::= { nsExtendOutput1Entry 4 }
  254.  
  255.  
  256.     --
  257.     --  The line-based output table
  258.     --
  259.  
  260. nsExtendOutput2Table     OBJECT-TYPE
  261.     SYNTAX      SEQUENCE OF NsExtendOutput2Entry
  262.     MAX-ACCESS  not-accessible
  263.     STATUS      current
  264.     DESCRIPTION
  265.       "A table of (line-based) output from scripted extensions."
  266.     ::= { nsExtendObjects 4 }
  267.  
  268. nsExtendOutput2Entry     OBJECT-TYPE
  269.     SYNTAX      NsExtendOutput2Entry
  270.     MAX-ACCESS  not-accessible
  271.     STATUS      current
  272.     DESCRIPTION
  273.       "A conceptual row within the line-based output table."
  274.     INDEX       { nsExtendToken, nsExtendLineIndex }
  275.     ::= { nsExtendOutput2Table 1 }
  276.  
  277. NsExtendOutput2Entry ::= SEQUENCE {
  278.     nsExtendLineIndex INTEGER,
  279.     nsExtendOutLine   DisplayString
  280. }
  281.  
  282. nsExtendLineIndex OBJECT-TYPE
  283.     SYNTAX      INTEGER(1..1024)
  284.     MAX-ACCESS  not-accessible
  285.     STATUS      current
  286.     DESCRIPTION
  287.       "The index of this line of output.
  288.        For a given nsExtendToken, this will run from
  289.        1 to the corresponding value of nsExtendNumLines."
  290.     ::= { nsExtendOutput2Entry 1 }
  291.  
  292. nsExtendOutLine OBJECT-TYPE
  293.     SYNTAX      DisplayString
  294.     MAX-ACCESS  read-only
  295.     STATUS      current
  296.     DESCRIPTION
  297.       "A single line of output from the extension command."
  298.     ::= { nsExtendOutput2Entry 2 }
  299.  
  300. --
  301. -- Conformance-related definitions
  302. --
  303.  
  304. nsExtendConfigGroup  OBJECT-GROUP
  305.     OBJECTS {
  306.         nsExtendCommand,   nsExtendArgs,     nsExtendInput,
  307.         nsExtendCacheTime, nsExtendExecType, nsExtendRunType,
  308.         nsExtendStorage,   nsExtendStatus,   nsExtendNumEntries
  309.     }
  310.     STATUS    current
  311.     DESCRIPTION
  312.     "Objects relating to the configuration of extension commands."
  313.     ::= { nsExtendGroups 1 }
  314.  
  315. nsExtendOutputGroup  OBJECT-GROUP
  316.     OBJECTS {
  317.         nsExtendOutNumLines, nsExtendResult,
  318.         nsExtendOutLine,   nsExtendOutput1Line, nsExtendOutputFull
  319.     }
  320.     STATUS    current
  321.     DESCRIPTION
  322.     "Objects relating to the output of extension commands."
  323.     ::= { nsExtendGroups 2 }
  324.  
  325. END
  326.