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