Still reeling under the cold.....BERRRR.....
As already explained the last five bits in case of the BER identifier are used to denote the numeric tag of the object. Since we can use only five bits the maximum data-types that can be represented directly is 30. However this limit provides a very safe margin in BER implementation of SNMP. This is because we do not expect (in the near future) SNMP will be using more than 30 datatypes. If it does so, SNMP may not remain simple and may sink under its own weight.
Given below is a list of BER identifiers for ASN.1 implementation of SNMP.
Primitive ASN.1 Types | Identifier in hex |
INTEGER | 02 |
BIT STRING | 03 |
OCTET STRING | 04 |
NULL | 05 |
OBJECT IDENTIFIER | 06 |
Constructed ASN.1 type | Identifier in hex |
SEQUENCE | 30 |
Primitive SNMP application types | Identifier in hex |
IpAddress | 40 |
Counter (Counter32 in SNMPv2) | 41 |
Gauge (Gauge32 in SNMPv 2) | 42 |
TimeTicks | 43 |
Opaque | 44 |
NsapAddress | 45 |
Counter64 (available only in SNMPv2) | 46 |
Uinteger32 (available only in SNMPv2) | 47 |
Context-specific types within an SNMP Message | Identifier in hex |
GetRequest-PDU | A0 |
GetNextRequestPUD | A1 |
GetResponse-PDU (Response-PDU in SNMPv 2) | A2 |
SetRequest-PDU | A3 |
Trap-PDU (obsolete in SNMPv 2) | A4 |
GetBulkRequest-PDU (added in SNMPv 2) | A5 |
InformRequest-PDU (added in SNMPv 2) | A6 |
SNMPv2-Trap-PDU (added in SNMPv 2) | A7 |
Using the identifier value we can easily communicate with the SNMP agent and easily generate the response we require ASN.1 and BER has thus alleviated the bad (and sad) working conditions of the network administrators the world over. Now let us attempt to write a few programs that will actually simulate a the manager querying an agent. To know more about these program keeps reading or better keep clicking.
Mr. Vijay Mukhi
Ms. Sonal Kotecha
Mr. Arsalan Zaidi
Mr. Vinesh Kurup
Vijay Mukhi's Computer
Institute
VMCI, B-13, Everest Building, Tardeo, Mumbai 400 034, India
Tel : 91-22-496 4335 /6/7/8/9
Fax : 91-22-307 28 59
e-mail : vmukhi@giasbm01.vsnl.net.in
http://www.vijaymukhi.com