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 "201801190000Z"
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    begemotSnmpdCommunityPermission INTEGER
279}
280
281begemotSnmpdCommunityModule OBJECT-TYPE
282    SYNTAX	SectionName
283    MAX-ACCESS	not-accessible
284    STATUS	current
285    DESCRIPTION
286	    "Index of the module that has registered this community.
287	    For global communities this is the empty string."
288    ::= { begemotSnmpdCommunityEntry 1 }
289
290begemotSnmpdCommunityIndex OBJECT-TYPE
291    SYNTAX	Unsigned32 (1..4294967295)
292    MAX-ACCESS	not-accessible
293    STATUS	current
294    DESCRIPTION
295	    "The numerical index of the community (private to the module)."
296    ::= { begemotSnmpdCommunityEntry 2 }
297
298begemotSnmpdCommunityString OBJECT-TYPE
299    SYNTAX	OCTET STRING
300    MAX-ACCESS	read-write
301    STATUS	current
302    DESCRIPTION
303	    "The string for access to SNMPd."
304    ::= { begemotSnmpdCommunityEntry 3 }
305
306begemotSnmpdCommunityDescr OBJECT-TYPE
307    SYNTAX	OCTET STRING
308    MAX-ACCESS	read-only
309    STATUS	current
310    DESCRIPTION
311	    "A description what this community is good for."
312    ::= { begemotSnmpdCommunityEntry 4 }
313
314begemotSnmpdCommunityPermission OBJECT-TYPE
315    SYNTAX	INTEGER (1..4294967295)
316    MAX-ACCESS	not-accessible
317    STATUS	current
318    DESCRIPTION
319	    "The numerical value of access rights granted to the community."
320    ::= { begemotSnmpdCommunityEntry 5 }
321
322--
323-- Module table
324--
325begemotSnmpdModuleTable OBJECT-TYPE
326    SYNTAX	SEQUENCE OF BegemotSnmpdModuleEntry
327    MAX-ACCESS	not-accessible
328    STATUS	current
329    DESCRIPTION
330	    "A table describing all the currently loaded dynamic modules.
331	    Writing to this table loads and unloads modules."
332    ::= { begemotSnmpdObjects 6 }
333
334begemotSnmpdModuleEntry OBJECT-TYPE
335    SYNTAX	BegemotSnmpdModuleEntry
336    MAX-ACCESS	not-accessible
337    STATUS	current
338    DESCRIPTION
339	    "A table entry describing a loadable module."
340    INDEX	{ begemotSnmpdModuleSection }
341    ::= { begemotSnmpdModuleTable 1 }
342
343BegemotSnmpdModuleEntry ::= SEQUENCE {
344    begemotSnmpdModuleSection	SectionName,
345    begemotSnmpdModulePath	OCTET STRING,
346    begemotSnmpdModuleComment	OCTET STRING
347}
348
349begemotSnmpdModuleSection OBJECT-TYPE
350    SYNTAX	SectionName
351    MAX-ACCESS	not-accessible
352    STATUS	current
353    DESCRIPTION
354	    "The string used for matching configuration file sections
355	    and indexes the module table."
356    ::= { begemotSnmpdModuleEntry 1 }
357
358
359begemotSnmpdModulePath OBJECT-TYPE
360    SYNTAX	OCTET STRING
361    MAX-ACCESS	read-create
362    STATUS	current
363    DESCRIPTION
364	    "The path name of the module. Set to empty string
365	    to unload a module. The path of an existing module
366	    may not be changed."
367    ::= { begemotSnmpdModuleEntry 2 }
368
369begemotSnmpdModuleComment OBJECT-TYPE
370    SYNTAX	OCTET STRING
371    MAX-ACCESS	read-only
372    STATUS	current
373    DESCRIPTION
374	    "A comment describing this module."
375    ::= { begemotSnmpdModuleEntry 3 }
376
377
378-- --------------------------------------------------------------------------
379--
380-- The STATISTICS Group
381--
382begemotSnmpdStats	OBJECT IDENTIFIER ::= { begemotSnmpdObjects 7 }
383
384begemotSnmpdStatsNoRxBufs OBJECT-TYPE
385    SYNTAX	Counter32
386    MAX-ACCESS	read-only
387    STATUS	current
388    DESCRIPTION
389	    "Number of times a receive buffer could not be allocated
390	    for a packet."
391    ::= { begemotSnmpdStats 1 }
392
393begemotSnmpdStatsNoTxBufs OBJECT-TYPE
394    SYNTAX	Counter32
395    MAX-ACCESS	read-only
396    STATUS	current
397    DESCRIPTION
398	    "Number of times a transmit buffer could not be allocated
399	    for a packet."
400    ::= { begemotSnmpdStats 2 }
401
402begemotSnmpdStatsInTooLongPkts OBJECT-TYPE
403    SYNTAX	Counter32
404    MAX-ACCESS	read-only
405    STATUS	current
406    DESCRIPTION
407	    "Number of packets received that were longer than the
408	    receive buffer. These packets are dropped."
409    ::= { begemotSnmpdStats 3 }
410
411begemotSnmpdStatsInBadPduTypes OBJECT-TYPE
412    SYNTAX	Counter32
413    MAX-ACCESS	read-only
414    STATUS	current
415    DESCRIPTION
416	    "Number of packets received with a bad type field."
417    ::= { begemotSnmpdStats 4 }
418
419--
420-- The Debug Group
421--
422begemotSnmpdDebug	OBJECT IDENTIFIER ::= { begemotSnmpdObjects 8 }
423
424begemotSnmpdDebugDumpPdus OBJECT-TYPE
425    SYNTAX	TruthValue
426    MAX-ACCESS	read-write
427    STATUS	current
428    DESCRIPTION
429	    "Dump PDUs to log file if true."
430    DEFVAL	{ false }
431    ::= { begemotSnmpdDebug 1 }
432
433begemotSnmpdDebugSnmpTrace OBJECT-TYPE
434    SYNTAX	Unsigned32
435    MAX-ACCESS	read-write
436    STATUS	current
437    DESCRIPTION
438	    "Tracing flags for the SNMP library. These flags have the
439	    following meaning:
440		0x00000001	trace GET operator
441		0x00000002	trace GETNEXT operator
442		0x00000004	trace SET operator
443		0x00000008	trace dependency processing
444		0x00000010	trace node finding
445		0x10000000	log ASN1 errors
446		0x20000000	log SNMP errors
447	    Individual values can be or-ed together."
448    DEFVAL	{ 0 }
449    ::= { begemotSnmpdDebug 2 }
450
451begemotSnmpdDebugSyslogPri OBJECT-TYPE
452    SYNTAX	INTEGER (0..8)
453    MAX-ACCESS	read-write
454    STATUS	current
455    DESCRIPTION
456	    "Events with this or higher priority should not be logged."
457    DEFVAL	{ 7 }	-- don't log debug messages
458    ::= { begemotSnmpdDebug 3 }
459
460--
461-- Local port table
462--
463begemotSnmpdLocalPortTable OBJECT-TYPE
464    SYNTAX	SEQUENCE OF BegemotSnmpdLocalPortEntry
465    MAX-ACCESS	not-accessible
466    STATUS	current
467    DESCRIPTION
468	    "A table with descriptions of local (unix domain) ports to listen
469	    on for SNMP messages."
470    ::= { begemotSnmpdObjects 9 }
471
472begemotSnmpdLocalPortEntry OBJECT-TYPE
473    SYNTAX	BegemotSnmpdLocalPortEntry
474    MAX-ACCESS	not-accessible
475    STATUS	current
476    DESCRIPTION
477	    "An entry in the table with descriptions of local ports to
478	    listen on for SNMP messages."
479    INDEX	{ begemotSnmpdLocalPortPath }
480    ::= { begemotSnmpdLocalPortTable 1 }
481
482BegemotSnmpdLocalPortEntry ::= SEQUENCE {
483    begemotSnmpdLocalPortPath	OCTET STRING,
484    begemotSnmpdLocalPortStatus	INTEGER,
485    begemotSnmpdLocalPortType	INTEGER
486}
487
488begemotSnmpdLocalPortPath OBJECT-TYPE
489    SYNTAX	OCTET STRING (SIZE(1..104))
490    MAX-ACCESS	not-accessible
491    STATUS	current
492    DESCRIPTION
493	    "The path name to create and listen on."
494    ::= { begemotSnmpdLocalPortEntry 1 }
495
496begemotSnmpdLocalPortStatus OBJECT-TYPE
497    SYNTAX	INTEGER { valid(1), invalid(2) }
498    MAX-ACCESS	read-create
499    STATUS	current
500    DESCRIPTION
501	    "Set status to 1 to create entry, set it to 2 to delete it."
502    ::= { begemotSnmpdLocalPortEntry 2 }
503
504begemotSnmpdLocalPortType OBJECT-TYPE
505    SYNTAX	INTEGER {
506			dgram-unpriv(1),
507			dgram-priv(2),
508			stream-unpriv(3),
509			stream-priv(4)
510		}
511    MAX-ACCESS	read-create
512    STATUS	current
513    DESCRIPTION
514	    "Type of the port. If the type is unpriv SET operations
515	    are allowed from all clients if the community matches. For
516	    priv SET operations are allowed only from peers with uid
517	    zero. If the daemon cannot determine the peer uid it disallows
518	    the SET operation for -priv ports."
519    ::= { begemotSnmpdLocalPortEntry 3 }
520
521--
522-- Transport mapping table
523--
524begemotSnmpdTransportMappings	OBJECT IDENTIFIER ::= { begemotSnmpdObjects 10 }
525
526begemotSnmpdTransportTable OBJECT-TYPE
527    SYNTAX	SEQUENCE OF BegemotSnmpdTransportEntry
528    MAX-ACCESS	not-accessible
529    STATUS	current
530    DESCRIPTION
531	    "A table containing all the currently loaded transport mappings."
532    ::= { begemotSnmpdTransportMappings 1 }
533
534begemotSnmpdTransportEntry OBJECT-TYPE
535    SYNTAX	BegemotSnmpdTransportEntry
536    MAX-ACCESS	not-accessible
537    STATUS	current
538    DESCRIPTION
539	    "An entry in the table with the transport mappings."
540    INDEX	{ begemotSnmpdTransportName }
541    ::= { begemotSnmpdTransportTable 1 }
542
543BegemotSnmpdTransportEntry ::= SEQUENCE {
544    begemotSnmpdTransportName	OCTET STRING,
545    begemotSnmpdTransportStatus	INTEGER,
546    begemotSnmpdTransportOid	OBJECT IDENTIFIER
547}
548
549begemotSnmpdTransportName OBJECT-TYPE
550    SYNTAX	OCTET STRING (SIZE(1..256))
551    MAX-ACCESS	not-accessible
552    STATUS	current
553    DESCRIPTION
554	    "The name of the mapping."
555    ::= { begemotSnmpdTransportEntry 1 }
556
557begemotSnmpdTransportStatus OBJECT-TYPE
558    SYNTAX	RowStatus
559    MAX-ACCESS	read-only
560    STATUS	current
561    DESCRIPTION
562	    "Used to create/activate/destroy the entry."
563    ::= { begemotSnmpdTransportEntry 2 }
564
565begemotSnmpdTransportOid OBJECT-TYPE
566    SYNTAX	OBJECT IDENTIFIER
567    MAX-ACCESS	read-only
568    STATUS	current
569    DESCRIPTION
570	    "A pointer to the group with the transport-dependend stuff."
571    ::= { begemotSnmpdTransportEntry 3 }
572
573--
574-- XXX These should go into their own MIB
575--
576begemotSnmpdTransUdp	OBJECT IDENTIFIER ::= { begemotSnmpdTransportMappings 2 }
577begemotSnmpdTransLsock	OBJECT IDENTIFIER ::= { begemotSnmpdTransportMappings 3 }
578
579END
580