File: SIMPLE-MIB.txt

package info (click to toggle)
python-netsnmpagent 0.6.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 340 kB
  • sloc: python: 1,200; sh: 172; makefile: 6
file content (425 lines) | stat: -rw-r--r-- 12,009 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
SIMPLE-MIB DEFINITIONS ::= BEGIN

------------------------------------------------------------------------
-- Simple example MIB for python-netsnmpagent
-- Copyright (c) 2012-2016 Pieter Hollants <pieter@hollants.com>
-- Licensed under the GNU Lesser Public License (LGPL) version 3
------------------------------------------------------------------------

-- Imports
IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
    Integer32, Unsigned32, Counter32, Counter64, TimeTicks, IpAddress,
    enterprises
        FROM SNMPv2-SMI
    TEXTUAL-CONVENTION, DisplayString
        FROM SNMPv2-TC
    MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
        FROM SNMPv2-CONF
    agentxObjects
        FROM AGENTX-MIB;

-- Description and update information                                                                                                            
simpleMIB MODULE-IDENTITY
    LAST-UPDATED "201307070000Z"
    ORGANIZATION "N/A"
    CONTACT-INFO
        "Editor:
        Pieter Hollants
        EMail: <pieter@hollants.com>"
    DESCRIPTION
        "Simple example MIB for python-netsnmpagent"

    REVISION    "201307070000Z"
    DESCRIPTION
        "A simple example MIB for python-netsnmpagent's simple.py."

    ::= { agentxObjects 30187 }

-- Definition of a generic SimpleNotificationStatus type
SimpleNotificationStatus ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION
        "Indicates the enabling or disabling of a particular class of
        notifications."
    SYNTAX INTEGER {
        disabled (0),   -- This class of notifications is disabled
        enabled  (1)    -- This class of notifications is enabled
}

-- Definition of MIB's root nodes

simpleMIBObjects         OBJECT IDENTIFIER ::= { simpleMIB 1 }
simpleMIBNotifications   OBJECT IDENTIFIER ::= { simpleMIB 2 }
simpleMIBConformance     OBJECT IDENTIFIER ::= { simpleMIB 3 }

simpleScalars            OBJECT IDENTIFIER ::= { simpleMIBObjects 1 }
simpleTables             OBJECT IDENTIFIER ::= { simpleMIBObjects 2 }

------------------------------------------------------------------------
-- Scalars
------------------------------------------------------------------------

simpleUnsigned OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "A read-write, unsigned, 32-bits integer value."
    ::= { simpleScalars 1 }

simpleUnsignedRO OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A read-only, unsigned, 32-bits integer value."
    ::= { simpleScalars 2 }

simpleInteger OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "A read-write, signed, 32-bits integer value."
    ::= { simpleScalars 3 }

simpleIntegerRO OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A read-only, signed, 32-bits integer value."
    ::= { simpleScalars 4 }

simpleCounter32 OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A read-only, unsigned, 32-bits counter value."
    ::= { simpleScalars 5 }

simpleCounter64 OBJECT-TYPE
    SYNTAX      Counter64
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A read-only, unsigned, 64-bits counter value."
    ::= { simpleScalars 6 }

simpleTimeTicks OBJECT-TYPE
    SYNTAX      TimeTicks
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "A read-only, unsigned, 32-bits TimeTicks value."
    ::= { simpleScalars 7 }

simpleIpAddress OBJECT-TYPE
    SYNTAX      IpAddress
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "A 32-bits IPv4 address."
    ::= { simpleScalars 8 }

SimpleOctetString ::= TEXTUAL-CONVENTION
    DISPLAY-HINT    "1024t"
    STATUS          current
    DESCRIPTION
        "An octet string containing characters in UTF-8 encoding."
    SYNTAX          OCTET STRING (SIZE (1..1024))

simpleOctetString OBJECT-TYPE
    SYNTAX      SimpleOctetString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An UTF-8 encoded string value."
    ::= { simpleScalars 9 }

simpleDisplayString OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An ASCII string value."
    ::= { simpleScalars 10 }

------------------------------------------------------------------------
-- Tables
------------------------------------------------------------------------

firstTableNumber OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of entries in firstTable."
    ::= { simpleTables 1 }

firstTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF FirstTableEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The first simple table"
    ::= { simpleTables 2 }

FirstTableEntry ::=
    SEQUENCE {
        firstTableEntryIndex  DisplayString,
        firstTableEntryDesc   DisplayString,
        firstTableEntryValue  Integer32
    }

firstTableEntry OBJECT-TYPE
    SYNTAX      FirstTableEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A particular firstTable row."
    INDEX { firstTableEntryIndex }
    ::= { firstTable 1 }

firstTableEntryIndex OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The index column used to generate string indices into
        firstTable."
    ::= { firstTableEntry 1 }

firstTableEntryDesc OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A firstTableEntry's description."
    ::= { firstTableEntry 2 }

firstTableEntryValue OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A firstTableEntry's value."
    ::= { firstTableEntry 3 }

secondTableNumber OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of entries in secondTable."
    ::= { simpleTables 3 }

secondTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF SecondTableEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The second simple table"
    ::= { simpleTables 4 }

SecondTableEntry ::=
    SEQUENCE {
        secondTableEntryIndex  Integer32,
        secondTableEntryDesc   DisplayString,
        secondTableEntryValue  Unsigned32
    }

secondTableEntry OBJECT-TYPE
    SYNTAX      SecondTableEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A particular secondTable row."
    INDEX { secondTableEntryIndex }
    ::= { secondTable 1 }

secondTableEntryIndex OBJECT-TYPE
    SYNTAX      Integer32 (0..2147483647)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The index column used to generate numerical indices into
        secondTable."
    ::= { secondTableEntry 1 }

secondTableEntryDesc OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An secondTableEntry's description."
    ::= { secondTableEntry 2 }

secondTableEntryValue OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An secondTableEntry's value."
    ::= { secondTableEntry 3 }

thirdTableNumber OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of entries in thirdTable."
    ::= { simpleTables 5 }

thirdTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF FirstTableEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The third simple table"
    ::= { simpleTables 6 }

FirstTableEntry ::=
    SEQUENCE {
        thirdTableEntryIndex  IpAddress,
        thirdTableEntryDesc   DisplayString,
        thirdTableEntryValue  Integer32
    }

thirdTableEntry OBJECT-TYPE
    SYNTAX      FirstTableEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A particular thirdTable row."
    INDEX { thirdTableEntryIndex }
    ::= { thirdTable 1 }

thirdTableEntryIndex OBJECT-TYPE
    SYNTAX      IpAddress
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The index column used to generate IpAddress indices into
        thirdTable."
    ::= { thirdTableEntry 1 }

thirdTableEntryDesc OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A thirdTableEntry's description."
    ::= { thirdTableEntry 2 }

thirdTableEntryValue OBJECT-TYPE
    SYNTAX      IpAddress
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A thirdTableEntry's value."
    ::= { thirdTableEntry 3 }

------------------------------------------------------------------------
-- Notifications
------------------------------------------------------------------------

events      OBJECT IDENTIFIER ::= { simpleMIBNotifications 0 }
operation   OBJECT IDENTIFIER ::= { simpleMIBNotifications 1 }

simpleUnsignedROChange NOTIFICATION-TYPE
    OBJECTS {
        simpleUnsignedRO
    }
    STATUS  current
    DESCRIPTION
        "A simpleScalarsChange notification signifies that there has
        been a change to the value of simpleUnsignedRO."
    ::= { events 1 }

firstTableChange NOTIFICATION-TYPE
    OBJECTS {
        firstTableEntryDesc, firstTableEntryValue
    }
    STATUS  current
    DESCRIPTION
        "A firstTableChange notification signifies that there has
        been a change to an firstTableEntry."
    ::= { events 2 }

simpleUnsignedROChangeNotificationsEnabled OBJECT-TYPE
    SYNTAX      SimpleNotificationStatus
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Controls whether simpleUnsignedROChange notifications are
        enabled or disabled."
    ::= { operation 1 }

firstTableChangeNotificationsEnabled OBJECT-TYPE
    SYNTAX      SimpleNotificationStatus
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Controls whether firstTableChange notifications are
        enabled or disabled."
    ::= { operation 2 }

------------------------------------------------------------------------
-- Conformance
------------------------------------------------------------------------

simpleMIBGroups      OBJECT IDENTIFIER ::= { simpleMIBConformance 1 }
simpleMIBCompliances OBJECT IDENTIFIER ::= { simpleMIBConformance 2 }

simpleMIBScalarsGroup OBJECT-GROUP
    OBJECTS {
        simpleInteger, simpleIntegerRO,
        simpleUnsigned, simpleUnsignedRO,
        simpleCounter32, simpleCounter64,
        simpleTimeTicks,
        simpleIpAddress,
        simpleOctetString, simpleDisplayString,
        simpleUnsignedROChangeNotificationsEnabled
    }
    STATUS  current
    DESCRIPTION
        "A collection of objects related to simpleScalars."
    ::= { simpleMIBGroups 1 }

simpleMIBTablesGroup OBJECT-GROUP
    OBJECTS {
        firstTableNumber,
        firstTableEntryDesc, firstTableEntryValue,
        firstTableChangeNotificationsEnabled,
        secondTableNumber,
        secondTableEntryDesc, secondTableEntryValue
    }
    STATUS  current
    DESCRIPTION
        "A collection of objects related to simpleTables."
    ::= { simpleMIBGroups 2 }

simpleMIBScalarsNotificationsGroup NOTIFICATION-GROUP
    NOTIFICATIONS {
        simpleUnsignedROChange
    }
    STATUS  current
    DESCRIPTION
        "The notifications which indicate specific changes in
        simpleMIBScalars."
    ::= { simpleMIBGroups 3 }

simpleMIBTablesNotificationsGroup NOTIFICATION-GROUP
    NOTIFICATIONS {
        firstTableChange
    }
    STATUS  current
    DESCRIPTION
        "The notifications which indicate specific changes in
        simpleTables."
    ::= { simpleMIBGroups 4 }

END