NET-SNMP-EXAMPLES-MIB.txt 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. NET-SNMP-EXAMPLES-MIB DEFINITIONS ::= BEGIN
  2. --
  3. -- Example MIB objects for agent module example implementations
  4. --
  5. IMPORTS
  6. MODULE-IDENTITY, OBJECT-TYPE, Integer32,
  7. NOTIFICATION-TYPE FROM SNMPv2-SMI
  8. SnmpAdminString FROM SNMP-FRAMEWORK-MIB
  9. netSnmp FROM NET-SNMP-MIB
  10. RowStatus, StorageType FROM SNMPv2-TC
  11. InetAddressType, InetAddress FROM INET-ADDRESS-MIB
  12. ;
  13. netSnmpExamples MODULE-IDENTITY
  14. LAST-UPDATED "200406150000Z"
  15. ORGANIZATION "www.net-snmp.org"
  16. CONTACT-INFO
  17. "postal: Wes Hardaker
  18. P.O. Box 382
  19. Davis CA 95617
  20. email: net-snmp-coders@lists.sourceforge.net"
  21. DESCRIPTION
  22. "Example MIB objects for agent module example implementations"
  23. REVISION "200406150000Z"
  24. DESCRIPTION
  25. "Corrected notification example definitions"
  26. REVISION "200202060000Z"
  27. DESCRIPTION
  28. "First draft"
  29. ::= { netSnmp 2 }
  30. --
  31. -- top level structure
  32. --
  33. netSnmpExampleScalars OBJECT IDENTIFIER ::= { netSnmpExamples 1 }
  34. netSnmpExampleTables OBJECT IDENTIFIER ::= { netSnmpExamples 2 }
  35. netSnmpExampleNotifications OBJECT IDENTIFIER ::= { netSnmpExamples 3 }
  36. netSnmpExampleNotificationPrefix OBJECT IDENTIFIER
  37. ::= { netSnmpExampleNotifications 0 }
  38. netSnmpExampleNotificationObjects OBJECT IDENTIFIER
  39. ::= { netSnmpExampleNotifications 2 }
  40. -- netSnmpTutorial OBJECT IDENTIFIER ::= { netSnmpExamples 4 }
  41. --
  42. -- Example scalars
  43. --
  44. netSnmpExampleInteger OBJECT-TYPE
  45. SYNTAX Integer32
  46. MAX-ACCESS read-write
  47. STATUS current
  48. DESCRIPTION
  49. "This is a simple object which merely houses a writable
  50. integer. It's only purposes is to hold the value of a single
  51. integer. Writing to it will simply change the value for
  52. subsequent GET/GETNEXT/GETBULK retrievals.
  53. This example object is implemented in the
  54. agent/mibgroup/examples/scalar_int.c file."
  55. DEFVAL { 42 }
  56. ::= { netSnmpExampleScalars 1 }
  57. netSnmpExampleSleeper OBJECT-TYPE
  58. SYNTAX Integer32
  59. MAX-ACCESS read-write
  60. STATUS current
  61. DESCRIPTION
  62. "This is a simple object which is a basic integer. It's value
  63. indicates the number of seconds that the agent will take in
  64. responding to requests of this object. This is implemented
  65. in a way which will allow the agent to keep responding to
  66. other requests while access to this object is blocked. It is
  67. writable, and changing it's value will change the amount of
  68. time the agent will effectively wait for before returning a
  69. response when this object is manipulated. Note that SET
  70. requests through this object will take longer, since the
  71. delay is applied to each internal transaction phase, which
  72. could result in delays of up to 4 times the value of this
  73. object.
  74. This example object is implemented in the
  75. agent/mibgroup/examples/delayed_instance.c file."
  76. DEFVAL { 1 }
  77. ::= { netSnmpExampleScalars 2 }
  78. netSnmpExampleString OBJECT-TYPE
  79. SYNTAX SnmpAdminString
  80. MAX-ACCESS read-write
  81. STATUS current
  82. DESCRIPTION
  83. "This is a simple object which merely houses a writable
  84. string. It's only purposes is to hold the value of a single
  85. string. Writing to it will simply change the value for
  86. subsequent GET/GETNEXT/GETBULK retrievals.
  87. This example object is implemented in the
  88. agent/mibgroup/examples/watched.c file."
  89. DEFVAL { "So long, and thanks for all the fish!" }
  90. ::= { netSnmpExampleScalars 3 }
  91. --
  92. -- Example Tables
  93. --
  94. netSnmpIETFWGTable OBJECT-TYPE
  95. SYNTAX SEQUENCE OF NetSnmpIETFWGEntry
  96. MAX-ACCESS not-accessible
  97. STATUS current
  98. DESCRIPTION
  99. "This table merely contains a set of data which is otherwise
  100. useless for true network management. It is a table which
  101. describes properies about a IETF Working Group, such as the
  102. names of the two working group chairs.
  103. This example table is implemented in the
  104. agent/mibgroup/examples/data_set.c file."
  105. ::= { netSnmpExampleTables 1 }
  106. netSnmpIETFWGEntry OBJECT-TYPE
  107. SYNTAX NetSnmpIETFWGEntry
  108. MAX-ACCESS not-accessible
  109. STATUS current
  110. DESCRIPTION
  111. "A row describing a given working group"
  112. INDEX { nsIETFWGName }
  113. ::= {netSnmpIETFWGTable 1 }
  114. NetSnmpIETFWGEntry ::= SEQUENCE {
  115. nsIETFWGName OCTET STRING,
  116. nsIETFWGChair1 OCTET STRING,
  117. nsIETFWGChair2 OCTET STRING
  118. }
  119. nsIETFWGName OBJECT-TYPE
  120. SYNTAX OCTET STRING (SIZE(1..32))
  121. MAX-ACCESS not-accessible
  122. STATUS current
  123. DESCRIPTION
  124. "The name of the IETF Working Group this table describes."
  125. ::= { netSnmpIETFWGEntry 1 }
  126. nsIETFWGChair1 OBJECT-TYPE
  127. SYNTAX OCTET STRING
  128. MAX-ACCESS read-create
  129. STATUS current
  130. DESCRIPTION
  131. "One of the names of the chairs for the IETF working group."
  132. ::= { netSnmpIETFWGEntry 2 }
  133. nsIETFWGChair2 OBJECT-TYPE
  134. SYNTAX OCTET STRING
  135. MAX-ACCESS read-create
  136. STATUS current
  137. DESCRIPTION
  138. "The other name, if one exists, of the chairs for the IETF
  139. working group."
  140. ::= { netSnmpIETFWGEntry 3 }
  141. --
  142. -- A table used in a table_iterator example
  143. -- (agent/mibgroup/examples/netSnmpHostsTable*.[ch])
  144. --
  145. netSnmpHostsTable OBJECT-TYPE
  146. SYNTAX SEQUENCE OF NetSnmpHostsEntry
  147. MAX-ACCESS not-accessible
  148. STATUS current
  149. DESCRIPTION
  150. "An example table that implements a wrapper around the
  151. /etc/hosts file on a machine using the iterator helper API."
  152. ::= { netSnmpExampleTables 2 }
  153. netSnmpHostsEntry OBJECT-TYPE
  154. SYNTAX NetSnmpHostsEntry
  155. MAX-ACCESS not-accessible
  156. STATUS current
  157. DESCRIPTION
  158. "A host name mapped to an ip address"
  159. INDEX { netSnmpHostName }
  160. ::= { netSnmpHostsTable 1 }
  161. NetSnmpHostsEntry ::= SEQUENCE {
  162. netSnmpHostName OCTET STRING,
  163. netSnmpHostAddressType InetAddressType,
  164. netSnmpHostAddress InetAddress,
  165. netSnmpHostStorage StorageType,
  166. netSnmpHostRowStatus RowStatus
  167. }
  168. netSnmpHostName OBJECT-TYPE
  169. SYNTAX OCTET STRING (SIZE(0..64))
  170. MAX-ACCESS not-accessible
  171. STATUS current
  172. DESCRIPTION
  173. "A host name that exists in the /etc/hosts (unix) file."
  174. ::= { netSnmpHostsEntry 1 }
  175. netSnmpHostAddressType OBJECT-TYPE
  176. SYNTAX InetAddressType
  177. MAX-ACCESS read-create
  178. STATUS current
  179. DESCRIPTION
  180. "The address type of then given host."
  181. ::= { netSnmpHostsEntry 2 }
  182. netSnmpHostAddress OBJECT-TYPE
  183. SYNTAX InetAddress
  184. MAX-ACCESS read-create
  185. STATUS current
  186. DESCRIPTION
  187. "The address of then given host."
  188. ::= { netSnmpHostsEntry 3 }
  189. netSnmpHostStorage OBJECT-TYPE
  190. SYNTAX StorageType
  191. MAX-ACCESS read-create
  192. STATUS current
  193. DESCRIPTION "The storage type for this conceptual row."
  194. DEFVAL { nonVolatile }
  195. ::= { netSnmpHostsEntry 4 }
  196. netSnmpHostRowStatus OBJECT-TYPE
  197. SYNTAX RowStatus
  198. MAX-ACCESS read-create
  199. STATUS current
  200. DESCRIPTION "The status of this conceptual row."
  201. ::= { netSnmpHostsEntry 5 }
  202. --
  203. -- Example Notifications
  204. --
  205. netSnmpExampleHeartbeatRate OBJECT-TYPE
  206. SYNTAX Integer32
  207. MAX-ACCESS accessible-for-notify
  208. STATUS current
  209. DESCRIPTION
  210. "A simple integer object, to act as a payload for the
  211. netSnmpExampleHeartbeatNotification. The value has
  212. no real meaning, but is nominally the interval (in
  213. seconds) between successive heartbeat notifications."
  214. ::= { netSnmpExampleNotificationObjects 1 }
  215. netSnmpExampleHeartbeatName OBJECT-TYPE
  216. SYNTAX SnmpAdminString
  217. MAX-ACCESS accessible-for-notify
  218. STATUS current
  219. DESCRIPTION
  220. "A simple string object, to act as an optional payload
  221. for the netSnmpExampleHeartbeatNotification. This varbind
  222. is not part of the notification definition, so is optional
  223. and need not be included in the notification payload.
  224. The value has no real meaning, but the romantically inclined
  225. may take it to be the object of the sender's affection,
  226. and hence the cause of the heart beating faster."
  227. ::= { netSnmpExampleNotificationObjects 2 }
  228. netSnmpExampleHeartbeatNotification NOTIFICATION-TYPE
  229. OBJECTS { netSnmpExampleHeartbeatRate }
  230. STATUS current
  231. DESCRIPTION
  232. "An example notification, used to illustrate the
  233. definition and generation of trap and inform PDUs
  234. (including the use of both standard and additional
  235. varbinds in the notification payload).
  236. This notification will typically be sent every
  237. 30 seconds, using the code found in the example module
  238. agent/mibgroup/examples/notification.c"
  239. ::= { netSnmpExampleNotificationPrefix 1 }
  240. netSnmpExampleNotification OBJECT-TYPE
  241. SYNTAX SnmpAdminString
  242. MAX-ACCESS accessible-for-notify
  243. STATUS obsolete
  244. DESCRIPTION
  245. "This object was improperly defined for its original purpose,
  246. and should no longer be used."
  247. ::= { netSnmpExampleNotifications 1 }
  248. END