1 RFC1157-SNMP DEFINITIONS ::= BEGIN 2 3 IMPORTS 4 ObjectName, ObjectSyntax, NetworkAddress, IpAddress, TimeTicks 5 FROM RFC1155-SMI; 6 7 -- top-level message 8 9 Message ::= 10 SEQUENCE { 11 version -- version-1 for this RFC 12 INTEGER { 13 version-1(0) 14 }, 15 16 community -- community name 17 OCTET STRING, 18 19 data -- e.g., PDUs if trivial 20 ANY -- authentication is being used 21 } 22 23 -- protocol data units 24 25 PDUs ::= 26 CHOICE { 27 get-request 28 GetRequest-PDU, 29 30 get-next-request 31 GetNextRequest-PDU, 32 33 get-response 34 GetResponse-PDU, 35 36 set-request 37 SetRequest-PDU, 38 39 trap 40 Trap-PDU 41 } 42 43 -- variable bindings 44 45 VarBind ::= 46 SEQUENCE { 47 name 48 ObjectName, 49 50 value 51 ObjectSyntax 52 } 53 54 VarBindList ::= 55 SEQUENCE OF 56 VarBind 57 58 -- PDUs 59 60 GetRequest-PDU ::= 61 [0] 62 IMPLICIT PDU 63 64 GetNextRequest-PDU ::= 65 [1] 66 IMPLICIT PDU 67 68 GetResponse-PDU ::= 69 [2] 70 IMPLICIT PDU 71 72 SetRequest-PDU ::= 73 [3] 74 IMPLICIT PDU 75 76 PDU ::= 77 SEQUENCE { 78 request-id 79 INTEGER, 80 81 error-status -- sometimes ignored 82 INTEGER { 83 noError(0), 84 tooBig(1), 85 noSuchName(2), 86 badValue(3), 87 readOnly(4), 88 genErr(5) 89 }, 90 91 error-index -- sometimes ignored 92 INTEGER, 93 94 variable-bindings -- values are sometimes ignored 95 VarBindList 96 } 97 98 Trap-PDU ::= 99 [4] 100 IMPLICIT SEQUENCE { 101 enterprise -- type of object generating 102 -- trap, see sysObjectID in [5] 103 104 OBJECT IDENTIFIER, 105 106 agent-addr -- address of object generating 107 NetworkAddress, -- trap 108 109 generic-trap -- generic trap type 110 INTEGER { 111 coldStart(0), 112 warmStart(1), 113 linkDown(2), 114 linkUp(3), 115 authenticationFailure(4), 116 egpNeighborLoss(5), 117 enterpriseSpecific(6) 118 }, 119 120 specific-trap -- specific code, present even 121 INTEGER, -- if generic-trap is not 122 -- enterpriseSpecific 123 124 time-stamp -- time elapsed between the last 125 TimeTicks, -- (re)initialization of the network 126 -- entity and the generation of the trap 127 128 variable-bindings -- interesting information 129 VarBindList 130 } 131 132 END