2 RFC1157-SNMP DEFINITIONS ::= BEGIN
5 -- ObjectName, ObjectSyntax, NetworkAddress, IpAddress, TimeTicks
10 -- ObjectName, ObjectSyntax, NetworkAddress, IpAddress, TimeTicks
14 -- (Note that these definitions of ObjectName and NotificationName
15 -- are not to be IMPORTed by MIB modules.)
18 --ObjectSyntax ::= CHOICE {
19 -- simple SimpleSyntax,
20 -- application-wide ApplicationSyntax
23 --SimpleSyntax ::= CHOICE {
24 -- integer-value Integer-value,
25 -- string-value String-value,
26 -- objectID-value ObjectID-value,
30 --String-value ::= OCTET STRING (SIZE (0..65535))
33 --Integer-value ::= INTEGER (-2147483648..2147483647)
35 --Integer32 ::= INTEGER (-2147483648..2147483647)
37 --ObjectID-value ::= OBJECT IDENTIFIER
41 -- hundredths of seconds since an event, usualy the last restart
42 --TimeTicks ::= [APPLICATION 3] IMPLICIT INTEGER (0..4294967295)
44 --Opaque ::= [APPLICATION 4] IMPLICIT OCTET STRING
46 --Counter64 ::= [APPLICATION 6] IMPLICIT INTEGER (0..18446744073709551615)
48 --ApplicationSyntax ::= CHOICE {
49 -- ipAddress-value IpAddress,
50 -- counter-value Counter32,
51 -- timeticks-value TimeTicks,
52 -- arbitrary-value Opaque,
53 -- big-counter-value Counter64,
54 -- unsigned-integer-value Unsigned32
57 --NetworkAddress ::= CHOICE { internet IpAddress }
58 --IpAddress ::= [APPLICATION 0] IMPLICIT OCTET STRING (SIZE (4))
60 NotificationName ::= OBJECT IDENTIFIER
61 EnterpriseOID ::= OBJECT IDENTIFIER
62 NetworkAddress ::= [APPLICATION 0] IMPLICIT OCTET STRING (SIZE (4))
63 TimeTicks ::= [APPLICATION 3] IMPLICIT INTEGER (0..4294967295)
64 Integer32 ::= INTEGER (-2147483648..2147483647)
65 ObjectName ::= OBJECT IDENTIFIER
66 --Counter32 ::= [APPLICATION 1] IMPLICIT INTEGER (0..4294967295)
67 --Gauge32 ::= [APPLICATION 2] IMPLICIT INTEGER (0..4294967295)
68 --Unsigned32 ::= [APPLICATION 2] IMPLICIT INTEGER (0..4294967295)
72 Message ::= SEQUENCE {
74 community OCTET STRING,
78 Version ::= INTEGER { version-1(0), v2c(1), v2u (2), snmpv3(3) }
84 parameters OCTET STRING,
86 -- <qoS><agentID><agentBoots><agentTime><maxSize>
87 -- <userLen><userName><authLen><authDigest>
92 encrypted OCTET STRING
96 -- USMSecurityParametersSyntax DEFINITIONS IMPLICIT TAGS ::= BEGIN
98 UsmSecurityParameters ::= SEQUENCE {
99 -- global User-based security parameters
100 msgAuthoritativeEngineID SnmpEngineID,
101 msgAuthoritativeEngineBoots INTEGER (0..2147483647),
102 msgAuthoritativeEngineTime INTEGER (0..2147483647),
103 msgUserName OCTET STRING (SIZE(1..32)),
104 -- authentication protocol specific parameters
105 msgAuthenticationParameters OCTET STRING,
106 -- privacy protocol specific parameters
107 msgPrivacyParameters OCTET STRING
109 -- END USMSecurityParametersSyntax
111 SnmpEngineID ::= OCTET STRING
113 -- SNMPv3MessageSyntax DEFINITIONS IMPLICIT TAGS ::= BEGIN
115 SNMPv3Message ::= SEQUENCE {
116 -- identify the layout of the SNMPv3Message
117 -- this element is in same position as in SNMPv1
118 -- and SNMPv2c, allowing recognition
119 -- the value 3 is used for snmpv3
121 -- INTEGER ( 0 .. 2147483647 ),
122 -- administrative parameters
123 msgGlobalData HeaderData,
124 -- security model-specific parameters
125 -- format defined by Security Model
126 msgSecurityParameters OCTET STRING,
127 msgData ScopedPduData
130 HeaderData ::= SEQUENCE {
131 msgID INTEGER (0..2147483647),
132 msgMaxSize INTEGER (484..2147483647),
134 msgFlags OCTET STRING (SIZE(1)),
135 -- .... ...1 authFlag
136 -- .... ..1. privFlag
137 -- .... .1.. reportableFlag
139 -- .... ..00 is OK, means noAuthNoPriv
140 -- .... ..01 is OK, means authNoPriv
141 -- .... ..10 reserved, must NOT be used.
142 -- .... ..11 is OK, means authPriv
144 msgSecurityModel INTEGER (1..2147483647)
148 ScopedPduData ::= CHOICE {
150 encryptedPDU OCTET STRING -- encrypted scopedPDU value
153 ScopedPDU ::= SEQUENCE {
154 contextEngineID SnmpEngineID,
155 contextName OCTET STRING,
158 -- e.g., PDUs as defined in RFC 1905
161 -- END SNMPv3MessageSyntax
162 -- protocol data units
165 get-request GetRequest-PDU,
166 get-next-request GetNextRequest-PDU,
167 get-response GetResponse-PDU,
168 set-request SetRequest-PDU,
170 getBulkRequest GetBulkRequest-PDU,
171 informRequest InformRequest-PDU,
172 snmpV2-trap SNMPv2-Trap-PDU,
178 GetRequest-PDU ::= [0] IMPLICIT PDU
179 GetNextRequest-PDU ::= [1] IMPLICIT PDU
180 GetResponse-PDU ::= [2] IMPLICIT PDU
182 SetRequest-PDU ::= [3] IMPLICIT PDU
186 GetBulkRequest-PDU ::= [5] IMPLICIT BulkPDU
187 InformRequest-PDU ::= [6] IMPLICIT PDU
188 SNMPv2-Trap-PDU ::= [7] IMPLICIT PDU
190 -- Usage and precise semantics of Report-PDU are not presently
191 -- defined. Any SNMP administrative framework making use of
192 -- this PDU must define its usage and semantics.
193 Report-PDU ::= [8] IMPLICIT PDU
198 error-status INTEGER {
201 noSuchName(2), -- for proxy compatibility
202 badValue(3), -- for proxy compatibility
203 readOnly(4), -- for proxy compatibility
211 inconsistentValue(12),
212 resourceUnavailable(13),
215 authorizationError(16),
220 variable-bindings VarBindList
224 BulkPDU ::= SEQUENCE { -- MUST be identical in structure to PDU
225 request-id Integer32,
226 non-repeaters INTEGER (0..2147483647),
227 max-repetitions INTEGER (0..2147483647),
228 variable-bindings VarBindList
232 Trap-PDU ::= [4] IMPLICIT SEQUENCE {
233 enterprise EnterpriseOID, -- type of object generating trap, see sysObjectID in [5]
234 agent-addr NetworkAddress, -- address of object generating trap
235 generic-trap INTEGER { -- generic trap type
240 authenticationFailure(4),
242 enterpriseSpecific(6)
244 specific-trap INTEGER, -- specific code, present even if generic-trap is not enterpriseSpecific
245 time-stamp TimeTicks, -- time elapsed between the last (re)initialization of the network entity and the generation of the trap
246 variable-bindings VarBindList -- "interesting" information
252 VarBind ::= SEQUENCE { name ObjectName, valueType NULL }
255 -- valueType ValueType
258 --ValueType ::= CHOICE {
259 -- value ObjectSyntax,
261 -- in retrieval requests
262 -- exceptions in responses
263 -- noSuchObject[0] IMPLICIT NULL,
264 -- noSuchInstance[1] IMPLICIT NULL,
265 -- endOfMibView[2] IMPLICIT NULL
268 VarBindList ::= SEQUENCE OF VarBind
270 -- SMUX DEFINITIONS ::= BEGIN RFC 1227
272 SMUX-PDUs ::= CHOICE {
273 open OpenPDU,-- SMUX peer uses immediately after TCP open
274 close ClosePDU, -- either uses immediately before TCP close
275 registerRequest RReqPDU, -- SMUX peer uses
277 -- registerResponse .. SNMP agent uses
282 registerResponse RegisterResponse,
283 -- note that roles are reversed:
284 -- SNMP agent does get/get-next/set
285 -- SMUX peer does get-response/trap
287 commitOrRollback -- SNMP agent uses
291 RegisterResponse ::= CHOICE {
297 -- currently only simple authentication
300 smux-simple SimpleOpen
303 SimpleOpen ::= [APPLICATION 0] IMPLICIT SEQUENCE {
304 smux-version INTEGER { version-1(0) }, -- of SMUX protocol
305 identity OBJECT IDENTIFIER, -- of SMUX peer, authoritative
306 description DisplayString, -- of SMUX peer, implementation-specific
307 password OCTET STRING -- zero length indicates no authentication
310 DisplayString ::= OCTET STRING
312 ClosePDU ::= [APPLICATION 1] IMPLICIT INTEGER {
314 unsupportedVersion(1),
318 authenticationFailure(5)
323 RReqPDU ::= [APPLICATION 2] IMPLICIT SEQUENCE {
325 priority INTEGER (-1..2147483647), -- the lower the better, "-1" means default
328 delete(0), -- remove registration
329 readOnly(1), -- add registration, objects are RO
330 readWrite(2) -- .., objects are RW
334 RRspPDU ::= [APPLICATION 3] IMPLICIT INTEGER { failure(-1) } -- on success the non-negative priority is returned
335 SOutPDU ::= [APPLICATION 4] IMPLICIT INTEGER { commit(0), rollback(1) }