|
|
1.1 ! root 1: -- snmp.py - SNMP definitions ! 2: ! 3: -- $Header: /f/osi/snmp/RCS/snmp.py,v 7.4 90/06/23 17:01:21 mrose Exp $ ! 4: -- ! 5: -- Contributed by NYSERNet Inc. This work was partially supported by the ! 6: -- U.S. Defense Advanced Research Projects Agency and the Rome Air Development ! 7: -- Center of the U.S. Air Force Systems Command under contract number ! 8: -- F30602-88-C-0016. ! 9: -- ! 10: -- ! 11: -- $Log: snmp.py,v $ ! 12: -- Revision 7.4 90/06/23 17:01:21 mrose ! 13: -- update ! 14: -- ! 15: -- Revision 7.3 90/06/21 21:27:34 mrose ! 16: -- snmpt ! 17: -- ! 18: -- Revision 7.2 90/05/13 15:55:16 mrose ! 19: -- update ! 20: -- ! 21: -- Revision 7.1 90/01/11 18:34:28 mrose ! 22: -- real-sync ! 23: -- ! 24: -- Revision 7.0 89/11/23 22:23:24 mrose ! 25: -- Release 6.0 ! 26: -- ! 27: ! 28: -- ! 29: -- NOTICE ! 30: -- ! 31: -- Acquisition, use, and distribution of this module and related ! 32: -- materials are subject to the restrictions of a license agreement. ! 33: -- Consult the Preface in the User's Manual for the full terms of ! 34: -- this agreement. ! 35: -- ! 36: -- ! 37: ! 38: ! 39: --* RFC1098-SNMP *-- SNMP DEFINITIONS ::= ! 40: ! 41: BEGIN ! 42: ! 43: -- these are defined below for brevity ! 44: -- IMPORTS ! 45: -- ObjectName, ObjectSyntax, NetworkAddress, IpAddress, TimeTicks ! 46: -- From RFC1065-SMI; ! 47: ! 48: ! 49: -- top-level message ! 50: ! 51: Message ::= ! 52: SEQUENCE { ! 53: version -- version-1 for this RFC ! 54: INTEGER { ! 55: version-1(0) ! 56: }, ! 57: ! 58: community -- community name ! 59: OCTET STRING, ! 60: ! 61: data -- e.g., PDUs if trivial ! 62: --* ANY *-- PDUs -- authentication is being used ! 63: } ! 64: ! 65: ! 66: -- protocol data units ! 67: ! 68: PDUs ::= ! 69: CHOICE { ! 70: get-request ! 71: GetRequest-PDU, ! 72: ! 73: get-next-request ! 74: GetNextRequest-PDU, ! 75: ! 76: get-response ! 77: GetResponse-PDU, ! 78: ! 79: set-request ! 80: SetRequest-PDU, ! 81: ! 82: trap ! 83: Trap-PDU ! 84: } ! 85: ! 86: GetRequest-PDU ::= ! 87: [0] ! 88: IMPLICIT PDU ! 89: ! 90: GetNextRequest-PDU ::= ! 91: [1] ! 92: IMPLICIT PDU ! 93: ! 94: GetResponse-PDU ::= ! 95: [2] ! 96: IMPLICIT PDU ! 97: ! 98: SetRequest-PDU ::= ! 99: [3] ! 100: IMPLICIT PDU ! 101: ! 102: PDU ::= ! 103: SEQUENCE { ! 104: request-id ! 105: INTEGER, ! 106: ! 107: error-status -- sometimes ignored ! 108: INTEGER { ! 109: noError(0), ! 110: tooBig(1), ! 111: noSuchName(2), ! 112: badValue(3), ! 113: readOnly(4), ! 114: genErr(5) ! 115: }, ! 116: ! 117: error-index -- sometimes ignored ! 118: INTEGER, ! 119: ! 120: variable-bindings -- values are sometimes ignored ! 121: VarBindList ! 122: } ! 123: ! 124: Trap-PDU ::= ! 125: [4] ! 126: IMPLICIT SEQUENCE { ! 127: enterprise -- type of object generating ! 128: OBJECT IDENTIFIER, -- trap, see sysObjectID ! 129: ! 130: agent-addr -- address of object generating trap ! 131: NetworkAddress, ! 132: ! 133: generic-trap -- generic trap type ! 134: INTEGER { ! 135: coldStart(0), ! 136: warmStart(1), ! 137: linkDown(2), ! 138: linkUp(3), ! 139: authenticationFailure(4), ! 140: egpNeighborLoss(5), ! 141: enterpriseSpecific(6) ! 142: }, ! 143: ! 144: specific-trap -- specific code, present even ! 145: INTEGER, -- if generic-trap is not ! 146: -- enterpriseSpecific ! 147: ! 148: time-stamp -- time elapsed between the last ! 149: TimeTicks, -- (re)initalization of the network ! 150: -- entity and the generation of the ! 151: -- trap ! 152: ! 153: variable-bindings -- "interesting" information ! 154: VarBindList ! 155: } ! 156: ! 157: VarBind ::= ! 158: SEQUENCE { ! 159: name ! 160: ObjectName, ! 161: ! 162: value ! 163: ObjectSyntax ! 164: } ! 165: ! 166: VarBindList ::= ! 167: SEQUENCE OF ! 168: VarBind ! 169: ! 170: ! 171: ! 172: -- types from RFC1065-SMI ! 173: ! 174: ObjectName ::= ! 175: OBJECT IDENTIFIER ! 176: ! 177: ObjectSyntax ::= ! 178: ANY ! 179: ! 180: NetworkAddress ::= ! 181: CHOICE { ! 182: internet ! 183: IpAddress ! 184: } ! 185: ! 186: IpAddress ::= ! 187: [APPLICATION 0] -- in network-byte order ! 188: IMPLICIT OCTET STRING (SIZE (4)) ! 189: ! 190: TimeTicks ::= ! 191: [APPLICATION 3] ! 192: IMPLICIT INTEGER ! 193: ! 194: ClnpAddress ::= ! 195: [APPLICATION 5] ! 196: IMPLICIT OCTET STRING (SIZE (1..21)) ! 197: ! 198: ! 199: -- trap logging (snmpt) ! 200: ! 201: Audit ::= ! 202: SEQUENCE { ! 203: source ! 204: DisplayString, ! 205: ! 206: dateAndTime ! 207: GeneralizedTime, ! 208: ! 209: sizeOfEncodingWhichFollows ! 210: INTEGER ! 211: } ! 212: ! 213: -- SMUX (experimental) ! 214: ! 215: -- IMPORTS ! 216: -- DisplayString, ObjectName ! 217: -- FROM RFC1155-SMI ! 218: ! 219: -- PDUs ! 220: -- FROM RFC1157-SNMP; ! 221: ! 222: DisplayString ::= ! 223: OCTET STRING ! 224: ! 225: ! 226: -- tags for SMUX-specific PDUs are application-wide to avoid conflict with ! 227: -- tags for current (and future) SNMP-generic PDUs ! 228: ! 229: SMUX-PDUs ::= ! 230: CHOICE { ! 231: open -- SMUX initiator uses ! 232: OpenPDU, -- immediately after TCP open ! 233: ! 234: close -- either uses immediately before TCP close ! 235: ClosePDU, ! 236: ! 237: registerRequest -- SMUX initiator uses ! 238: RReqPDU, ! 239: ! 240: registerResponse -- SNMP agent uses ! 241: RRspPDU, ! 242: ! 243: PDUs -- note that roles are reversed: ! 244: -- SNMP agent does get/get-next/set ! 245: -- SMUX initiator does get-response/trap ! 246: } ! 247: ! 248: ! 249: -- open PDU ! 250: -- currently only simple authentication ! 251: ! 252: OpenPDU ::= ! 253: CHOICE { ! 254: simple ! 255: SimpleOpen ! 256: } ! 257: ! 258: SimpleOpen ::= ! 259: [APPLICATION 0] IMPLICIT ! 260: SEQUENCE { ! 261: version -- of SMUX protocol ! 262: INTEGER { ! 263: version-1(0) ! 264: }, ! 265: ! 266: identity -- of SMUX initiator, authoritative ! 267: OBJECT IDENTIFIER, ! 268: ! 269: description -- of SMUX initiator, implementation-specific ! 270: DisplayString, ! 271: ! 272: password -- zero length indicates no authentication ! 273: OCTET STRING ! 274: } ! 275: ! 276: ! 277: -- close PDU ! 278: ! 279: ClosePDU ::= ! 280: [APPLICATION 1] IMPLICIT ! 281: INTEGER { ! 282: goingDown(0), ! 283: unsupportedVersion(1), ! 284: packetFormat(2), ! 285: protocolError(3), ! 286: internalError(4), ! 287: authenticationFailure(5) ! 288: } ! 289: ! 290: ! 291: -- insert PDU ! 292: ! 293: RReqPDU ::= ! 294: [APPLICATION 2] IMPLICIT ! 295: SEQUENCE { ! 296: subtree ! 297: ObjectName, ! 298: ! 299: priority -- the lower the better, "-1" means default ! 300: INTEGER (-1..2147483647), ! 301: ! 302: operation ! 303: INTEGER { ! 304: delete(0), ! 305: readOnly(1), ! 306: readWrite(2) ! 307: } ! 308: } ! 309: ! 310: RRspPDU ::= ! 311: [APPLICATION 3] IMPLICIT ! 312: INTEGER { ! 313: failure(-1) ! 314: ! 315: -- on success the non-negative priority is returned ! 316: } ! 317: ! 318: END
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.