/contrib/bsnmp/snmpd/BEGEMOT-SNMPD.txt

https://bitbucket.org/freebsd/freebsd-head/ · Plain Text · 570 lines · 502 code · 68 blank · 0 comment · 0 complexity · c485ceb51435443d7a172f2ee529edae MD5 · raw file

  1. --
  2. -- Copyright (c) 2001-2003
  3. -- Fraunhofer Institute for Open Communication Systems (FhG Fokus).
  4. -- All rights reserved.
  5. --
  6. -- Author: Harti Brandt <harti@freebsd.org>
  7. --
  8. -- Redistribution and use in source and binary forms, with or without
  9. -- modification, are permitted provided that the following conditions
  10. -- are met:
  11. -- 1. Redistributions of source code must retain the above copyright
  12. -- notice, this list of conditions and the following disclaimer.
  13. -- 2. Redistributions in binary form must reproduce the above copyright
  14. -- notice, this list of conditions and the following disclaimer in the
  15. -- documentation and/or other materials provided with the distribution.
  16. --
  17. -- THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  18. -- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. -- ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
  21. -- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. -- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23. -- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24. -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25. -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26. -- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27. -- SUCH DAMAGE.
  28. --
  29. -- $Begemot: bsnmp/snmpd/BEGEMOT-SNMPD.txt,v 1.23 2004/08/06 08:47:08 brandt Exp $
  30. --
  31. -- Begemot Private SNMPd MIB.
  32. --
  33. BEGEMOT-SNMPD-MIB DEFINITIONS ::= BEGIN
  34. IMPORTS
  35. MODULE-IDENTITY, OBJECT-TYPE, OBJECT-IDENTITY, Counter32,
  36. Unsigned32, IpAddress
  37. FROM SNMPv2-SMI
  38. TEXTUAL-CONVENTION, TruthValue, RowStatus
  39. FROM SNMPv2-TC
  40. MODULE-COMPLIANCE, OBJECT-GROUP
  41. FROM SNMPv2-CONF
  42. begemot
  43. FROM BEGEMOT-MIB;
  44. begemotSnmpd MODULE-IDENTITY
  45. LAST-UPDATED "200212040000Z"
  46. ORGANIZATION "Fraunhofer FOKUS, CATS"
  47. CONTACT-INFO
  48. " Hartmut Brandt
  49. Postal: Fraunhofer Institute for Open Communication Systems
  50. Kaiserin-Augusta-Allee 31
  51. 10589 Berlin
  52. Germany
  53. Fax: +49 30 3463 7352
  54. E-mail: harti@freebsd.org"
  55. DESCRIPTION
  56. "The MIB module for the Begemot SNMP daemon."
  57. ::= { begemot 1 }
  58. begemotSnmpdObjects OBJECT IDENTIFIER ::= { begemotSnmpd 1 }
  59. begemotSnmpdDefs OBJECT IDENTIFIER ::= { begemotSnmpd 2 }
  60. -- --------------------------------------------------------------------------
  61. SectionName ::= TEXTUAL-CONVENTION
  62. DISPLAY-HINT "14a"
  63. STATUS current
  64. DESCRIPTION
  65. "Name of a loadable module. Should consist of alphanumeric characers
  66. only, the first character must be a letter."
  67. SYNTAX OCTET STRING (SIZE(1..14))
  68. -- --------------------------------------------------------------------------
  69. --
  70. -- Agent types
  71. --
  72. begemotSnmpdAgent OBJECT IDENTIFIER ::= { begemotSnmpdDefs 1 }
  73. begemotSnmpdAgentFreeBSD OBJECT-IDENTITY
  74. STATUS current
  75. DESCRIPTION
  76. "Identifies the agent as running on FreeBSD."
  77. ::= { begemotSnmpdAgent 1 }
  78. -- --------------------------------------------------------------------------
  79. --
  80. -- The Config Group
  81. --
  82. begemotSnmpdConfig OBJECT IDENTIFIER ::= { begemotSnmpdObjects 1 }
  83. begemotSnmpdTransmitBuffer OBJECT-TYPE
  84. SYNTAX INTEGER (484..65535)
  85. MAX-ACCESS read-write
  86. STATUS current
  87. DESCRIPTION
  88. "The size of the receive buffer in bytes. Larger messages
  89. are dropped by SNMPd."
  90. DEFVAL { 2048 }
  91. ::= { begemotSnmpdConfig 1 }
  92. begemotSnmpdReceiveBuffer OBJECT-TYPE
  93. SYNTAX INTEGER (484..65535)
  94. MAX-ACCESS read-write
  95. STATUS current
  96. DESCRIPTION
  97. "The size of the transmit buffer in bytes. Larger messages
  98. cannot be sent by the SNMPd."
  99. DEFVAL { 2048 }
  100. ::= { begemotSnmpdConfig 2 }
  101. begemotSnmpdCommunityDisable OBJECT-TYPE
  102. SYNTAX TruthValue
  103. MAX-ACCESS read-write
  104. STATUS current
  105. DESCRIPTION
  106. "Disables all access to the CommunityTable from SNMP. Once
  107. set it cannot be cleared."
  108. DEFVAL { false }
  109. ::= { begemotSnmpdConfig 3 }
  110. begemotSnmpdTrap1Addr OBJECT-TYPE
  111. SYNTAX IpAddress
  112. MAX-ACCESS read-write
  113. STATUS current
  114. DESCRIPTION
  115. "The trap sink for v1 traps."
  116. ::= { begemotSnmpdConfig 4 }
  117. begemotSnmpdVersionEnable OBJECT-TYPE
  118. SYNTAX Unsigned32
  119. MAX-ACCESS read-only
  120. STATUS current
  121. DESCRIPTION
  122. "The SNMP versions that the agent processes. The following
  123. bits are defined:
  124. 0x00000001 - SNMPv1
  125. 0x00000002 - SNMPv2c
  126. 0x00000004 - SNMPv3"
  127. DEFVAL { 3 }
  128. ::= { begemotSnmpdConfig 5 }
  129. --
  130. -- Trap destinations
  131. --
  132. begemotTrapSinkTable OBJECT-TYPE
  133. SYNTAX SEQUENCE OF BegemotTrapSinkEntry
  134. MAX-ACCESS not-accessible
  135. STATUS current
  136. DESCRIPTION
  137. "A table with destinations for standard traps."
  138. INDEX { begemotTrapSinkAddr, begemotTrapSinkPort }
  139. ::= { begemotSnmpdObjects 2 }
  140. begemotTrapSinkEntry OBJECT-TYPE
  141. SYNTAX BegemotTrapSinkEntry
  142. MAX-ACCESS not-accessible
  143. STATUS current
  144. DESCRIPTION
  145. "Entry describes one trap destination."
  146. INDEX { begemotTrapSinkAddr, begemotTrapSinkPort }
  147. ::= { begemotTrapSinkTable 1 }
  148. BegemotTrapSinkEntry ::= SEQUENCE {
  149. begemotTrapSinkAddr IpAddress,
  150. begemotTrapSinkPort INTEGER,
  151. begemotTrapSinkStatus RowStatus
  152. }
  153. begemotTrapSinkAddr OBJECT-TYPE
  154. SYNTAX IpAddress
  155. MAX-ACCESS not-accessible
  156. STATUS current
  157. DESCRIPTION
  158. "Destination IP address of the manager station where to send
  159. traps."
  160. ::= { begemotTrapSinkEntry 1 }
  161. begemotTrapSinkPort OBJECT-TYPE
  162. SYNTAX INTEGER (1..65535)
  163. MAX-ACCESS not-accessible
  164. STATUS current
  165. DESCRIPTION
  166. "Destination UDP port of the manager station where to send
  167. traps."
  168. ::= { begemotTrapSinkEntry 2 }
  169. begemotTrapSinkStatus OBJECT-TYPE
  170. SYNTAX RowStatus
  171. MAX-ACCESS read-create
  172. STATUS current
  173. DESCRIPTION
  174. "Used to create/activate/destroy the entry."
  175. ::= { begemotTrapSinkEntry 3 }
  176. --
  177. -- SNMP port table
  178. --
  179. begemotSnmpdPortTable OBJECT-TYPE
  180. SYNTAX SEQUENCE OF BegemotSnmpdPortEntry
  181. MAX-ACCESS not-accessible
  182. STATUS current
  183. DESCRIPTION
  184. "A table with descriptions of UDP ports to listen on
  185. for SNMP messages."
  186. ::= { begemotSnmpdObjects 4 }
  187. begemotSnmpdPortEntry OBJECT-TYPE
  188. SYNTAX BegemotSnmpdPortEntry
  189. MAX-ACCESS not-accessible
  190. STATUS current
  191. DESCRIPTION
  192. "An entry in the table with descriptions of UDP ports to
  193. listen on for SNMP messages."
  194. INDEX { begemotSnmpdPortAddress, begemotSnmpdPortPort }
  195. ::= { begemotSnmpdPortTable 1 }
  196. BegemotSnmpdPortEntry ::= SEQUENCE {
  197. begemotSnmpdPortAddress IpAddress,
  198. begemotSnmpdPortPort INTEGER,
  199. begemotSnmpdPortStatus INTEGER
  200. }
  201. begemotSnmpdPortAddress OBJECT-TYPE
  202. SYNTAX IpAddress
  203. MAX-ACCESS not-accessible
  204. STATUS current
  205. DESCRIPTION
  206. "The IP address to bind to."
  207. ::= { begemotSnmpdPortEntry 1 }
  208. begemotSnmpdPortPort OBJECT-TYPE
  209. SYNTAX INTEGER (1..65535)
  210. MAX-ACCESS not-accessible
  211. STATUS current
  212. DESCRIPTION
  213. "The UDP port to listen on for SNMP messages."
  214. ::= { begemotSnmpdPortEntry 2 }
  215. begemotSnmpdPortStatus OBJECT-TYPE
  216. SYNTAX INTEGER { valid(1), invalid(2) }
  217. MAX-ACCESS read-create
  218. STATUS current
  219. DESCRIPTION
  220. "Set status to 1 to create entry, set it to 2 to delete it."
  221. ::= { begemotSnmpdPortEntry 3 }
  222. ---
  223. --- Community table
  224. ---
  225. begemotSnmpdCommunityTable OBJECT-TYPE
  226. SYNTAX SEQUENCE OF BegemotSnmpdCommunityEntry
  227. MAX-ACCESS not-accessible
  228. STATUS current
  229. DESCRIPTION
  230. "A table with the community strings for access control."
  231. ::= { begemotSnmpdObjects 5 }
  232. begemotSnmpdCommunityEntry OBJECT-TYPE
  233. SYNTAX BegemotSnmpdCommunityEntry
  234. MAX-ACCESS not-accessible
  235. STATUS current
  236. DESCRIPTION
  237. "A table with the community strings for access control.
  238. When begemotSnmpdCommDisable is true, this table disappears."
  239. INDEX { begemotSnmpdCommunityModule, begemotSnmpdCommunityIndex }
  240. ::= { begemotSnmpdCommunityTable 1 }
  241. BegemotSnmpdCommunityEntry ::= SEQUENCE {
  242. begemotSnmpdCommunityModule SectionName,
  243. begemotSnmpdCommunityIndex Unsigned32,
  244. begemotSnmpdCommunityString OCTET STRING,
  245. begemotSnmpdCommunityDescr OCTET STRING
  246. }
  247. begemotSnmpdCommunityModule OBJECT-TYPE
  248. SYNTAX SectionName
  249. MAX-ACCESS not-accessible
  250. STATUS current
  251. DESCRIPTION
  252. "Index of the module that has registered this community.
  253. For global communities this is the empty string."
  254. ::= { begemotSnmpdCommunityEntry 1 }
  255. begemotSnmpdCommunityIndex OBJECT-TYPE
  256. SYNTAX Unsigned32 (1..4294967295)
  257. MAX-ACCESS not-accessible
  258. STATUS current
  259. DESCRIPTION
  260. "The numerical index of the community (private to the module)."
  261. ::= { begemotSnmpdCommunityEntry 2 }
  262. begemotSnmpdCommunityString OBJECT-TYPE
  263. SYNTAX OCTET STRING
  264. MAX-ACCESS read-write
  265. STATUS current
  266. DESCRIPTION
  267. "The string for access to SNMPd."
  268. ::= { begemotSnmpdCommunityEntry 3 }
  269. begemotSnmpdCommunityDescr OBJECT-TYPE
  270. SYNTAX OCTET STRING
  271. MAX-ACCESS read-only
  272. STATUS current
  273. DESCRIPTION
  274. "A description what this community is good for."
  275. ::= { begemotSnmpdCommunityEntry 4 }
  276. --
  277. -- Module table
  278. --
  279. begemotSnmpdModuleTable OBJECT-TYPE
  280. SYNTAX SEQUENCE OF BegemotSnmpdModuleEntry
  281. MAX-ACCESS not-accessible
  282. STATUS current
  283. DESCRIPTION
  284. "A table describing all the currently loaded dynamic modules.
  285. Writing to this table loads and unloads modules."
  286. ::= { begemotSnmpdObjects 6 }
  287. begemotSnmpdModuleEntry OBJECT-TYPE
  288. SYNTAX BegemotSnmpdModuleEntry
  289. MAX-ACCESS not-accessible
  290. STATUS current
  291. DESCRIPTION
  292. "A table entry describing a loadable module."
  293. INDEX { begemotSnmpdModuleSection }
  294. ::= { begemotSnmpdModuleTable 1 }
  295. BegemotSnmpdModuleEntry ::= SEQUENCE {
  296. begemotSnmpdModuleSection SectionName,
  297. begemotSnmpdModulePath OCTET STRING,
  298. begemotSnmpdModuleComment OCTET STRING
  299. }
  300. begemotSnmpdModuleSection OBJECT-TYPE
  301. SYNTAX SectionName
  302. MAX-ACCESS not-accessible
  303. STATUS current
  304. DESCRIPTION
  305. "The string used for matching configuration file sections
  306. and indexes the module table."
  307. ::= { begemotSnmpdModuleEntry 1 }
  308. begemotSnmpdModulePath OBJECT-TYPE
  309. SYNTAX OCTET STRING
  310. MAX-ACCESS read-create
  311. STATUS current
  312. DESCRIPTION
  313. "The path name of the module. Set to empty string
  314. to unload a module. The path of an existing module
  315. may not be changed."
  316. ::= { begemotSnmpdModuleEntry 2 }
  317. begemotSnmpdModuleComment OBJECT-TYPE
  318. SYNTAX OCTET STRING
  319. MAX-ACCESS read-only
  320. STATUS current
  321. DESCRIPTION
  322. "A comment describing this module."
  323. ::= { begemotSnmpdModuleEntry 3 }
  324. -- --------------------------------------------------------------------------
  325. --
  326. -- The STATISTICS Group
  327. --
  328. begemotSnmpdStats OBJECT IDENTIFIER ::= { begemotSnmpdObjects 7 }
  329. begemotSnmpdStatsNoRxBufs OBJECT-TYPE
  330. SYNTAX Counter32
  331. MAX-ACCESS read-only
  332. STATUS current
  333. DESCRIPTION
  334. "Number of times a receive buffer could not be allocated
  335. for a packet."
  336. ::= { begemotSnmpdStats 1 }
  337. begemotSnmpdStatsNoTxBufs OBJECT-TYPE
  338. SYNTAX Counter32
  339. MAX-ACCESS read-only
  340. STATUS current
  341. DESCRIPTION
  342. "Number of times a transmit buffer could not be allocated
  343. for a packet."
  344. ::= { begemotSnmpdStats 2 }
  345. begemotSnmpdStatsInTooLongPkts OBJECT-TYPE
  346. SYNTAX Counter32
  347. MAX-ACCESS read-only
  348. STATUS current
  349. DESCRIPTION
  350. "Number of packets received that were longer than the
  351. receive buffer. These packets are dropped."
  352. ::= { begemotSnmpdStats 3 }
  353. begemotSnmpdStatsInBadPduTypes OBJECT-TYPE
  354. SYNTAX Counter32
  355. MAX-ACCESS read-only
  356. STATUS current
  357. DESCRIPTION
  358. "Number of packets received with a bad type field."
  359. ::= { begemotSnmpdStats 4 }
  360. --
  361. -- The Debug Group
  362. --
  363. begemotSnmpdDebug OBJECT IDENTIFIER ::= { begemotSnmpdObjects 8 }
  364. begemotSnmpdDebugDumpPdus OBJECT-TYPE
  365. SYNTAX TruthValue
  366. MAX-ACCESS read-write
  367. STATUS current
  368. DESCRIPTION
  369. "Dump PDUs to log file if true."
  370. DEFVAL { false }
  371. ::= { begemotSnmpdDebug 1 }
  372. begemotSnmpdDebugSnmpTrace OBJECT-TYPE
  373. SYNTAX Unsigned32
  374. MAX-ACCESS read-write
  375. STATUS current
  376. DESCRIPTION
  377. "Tracing flags for the SNMP library. These flags have the
  378. following meaning:
  379. 0x00000001 trace GET operator
  380. 0x00000002 trace GETNEXT operator
  381. 0x00000004 trace SET operator
  382. 0x00000008 trace dependency processing
  383. 0x00000010 trace node finding
  384. 0x10000000 log ASN1 errors
  385. 0x20000000 log SNMP errors
  386. Individual values can be or-ed together."
  387. DEFVAL { 0 }
  388. ::= { begemotSnmpdDebug 2 }
  389. begemotSnmpdDebugSyslogPri OBJECT-TYPE
  390. SYNTAX INTEGER (0..8)
  391. MAX-ACCESS read-write
  392. STATUS current
  393. DESCRIPTION
  394. "Events with this or higher priority should not be logged."
  395. DEFVAL { 7 } -- don't log debug messages
  396. ::= { begemotSnmpdDebug 3 }
  397. --
  398. -- Local port table
  399. --
  400. begemotSnmpdLocalPortTable OBJECT-TYPE
  401. SYNTAX SEQUENCE OF BegemotSnmpdLocalPortEntry
  402. MAX-ACCESS not-accessible
  403. STATUS current
  404. DESCRIPTION
  405. "A table with descriptions of local (unix domain) ports to listen
  406. on for SNMP messages."
  407. ::= { begemotSnmpdObjects 9 }
  408. begemotSnmpdLocalPortEntry OBJECT-TYPE
  409. SYNTAX BegemotSnmpdLocalPortEntry
  410. MAX-ACCESS not-accessible
  411. STATUS current
  412. DESCRIPTION
  413. "An entry in the table with descriptions of local ports to
  414. listen on for SNMP messages."
  415. INDEX { begemotSnmpdLocalPortPath }
  416. ::= { begemotSnmpdLocalPortTable 1 }
  417. BegemotSnmpdLocalPortEntry ::= SEQUENCE {
  418. begemotSnmpdLocalPortPath OCTET STRING,
  419. begemotSnmpdLocalPortStatus INTEGER,
  420. begemotSnmpdLocalPortType INTEGER
  421. }
  422. begemotSnmpdLocalPortPath OBJECT-TYPE
  423. SYNTAX OCTET STRING (SIZE(1..104))
  424. MAX-ACCESS not-accessible
  425. STATUS current
  426. DESCRIPTION
  427. "The path name to create and listen on."
  428. ::= { begemotSnmpdLocalPortEntry 1 }
  429. begemotSnmpdLocalPortStatus OBJECT-TYPE
  430. SYNTAX INTEGER { valid(1), invalid(2) }
  431. MAX-ACCESS read-create
  432. STATUS current
  433. DESCRIPTION
  434. "Set status to 1 to create entry, set it to 2 to delete it."
  435. ::= { begemotSnmpdLocalPortEntry 2 }
  436. begemotSnmpdLocalPortType OBJECT-TYPE
  437. SYNTAX INTEGER {
  438. dgram-unpriv(1),
  439. dgram-priv(2),
  440. stream-unpriv(3),
  441. stream-priv(4)
  442. }
  443. MAX-ACCESS read-create
  444. STATUS current
  445. DESCRIPTION
  446. "Type of the port. If the type is unpriv SET operations
  447. are allowed from all clients if the community matches. For
  448. priv SET operations are allowed only from peers with uid
  449. zero. If the daemon cannot determine the peer uid it disallows
  450. the SET operation for -priv ports."
  451. ::= { begemotSnmpdLocalPortEntry 3 }
  452. --
  453. -- Transport mapping table
  454. --
  455. begemotSnmpdTransportMappings OBJECT IDENTIFIER ::= { begemotSnmpdObjects 10 }
  456. begemotSnmpdTransportTable OBJECT-TYPE
  457. SYNTAX SEQUENCE OF BegemotSnmpdTransportEntry
  458. MAX-ACCESS not-accessible
  459. STATUS current
  460. DESCRIPTION
  461. "A table containing all the currently loaded transport mappings."
  462. ::= { begemotSnmpdTransportMappings 1 }
  463. begemotSnmpdTransportEntry OBJECT-TYPE
  464. SYNTAX BegemotSnmpdTransportEntry
  465. MAX-ACCESS not-accessible
  466. STATUS current
  467. DESCRIPTION
  468. "An entry in the table with the transport mappings."
  469. INDEX { begemotSnmpdTransportName }
  470. ::= { begemotSnmpdTransportTable 1 }
  471. BegemotSnmpdTransportEntry ::= SEQUENCE {
  472. begemotSnmpdTransportName OCTET STRING,
  473. begemotSnmpdTransportStatus INTEGER,
  474. begemotSnmpdTransportOid OBJECT IDENTIFIER
  475. }
  476. begemotSnmpdTransportName OBJECT-TYPE
  477. SYNTAX OCTET STRING (SIZE(1..256))
  478. MAX-ACCESS not-accessible
  479. STATUS current
  480. DESCRIPTION
  481. "The name of the mapping."
  482. ::= { begemotSnmpdTransportEntry 1 }
  483. begemotSnmpdTransportStatus OBJECT-TYPE
  484. SYNTAX RowStatus
  485. MAX-ACCESS read-only
  486. STATUS current
  487. DESCRIPTION
  488. "Used to create/activate/destroy the entry."
  489. ::= { begemotSnmpdTransportEntry 2 }
  490. begemotSnmpdTransportOid OBJECT-TYPE
  491. SYNTAX OBJECT IDENTIFIER
  492. MAX-ACCESS read-only
  493. STATUS current
  494. DESCRIPTION
  495. "A pointer to the group with the transport-dependend stuff."
  496. ::= { begemotSnmpdTransportEntry 3 }
  497. --
  498. -- XXX These should go into their own MIB
  499. --
  500. begemotSnmpdTransUdp OBJECT IDENTIFIER ::= { begemotSnmpdTransportMappings 2 }
  501. begemotSnmpdTransLsock OBJECT IDENTIFIER ::= { begemotSnmpdTransportMappings 3 }
  502. END