Subject: RE: PDU type

From: "Natale, Robert C (Bob)" <[email-masked]>
Date: Tue, 4 Sep 2001 02:08:25 -0400

> > From: Jonathan Natale <[email-masked]>
> > Date: Sat, 1 Sep 2001 19:31:58 -0400 

Hi Jonathan,

> > why is the pdu type "a1", "a2", "a3", "a4", or "a5" on a 
> > Sniffer, BUT all docs (for example "TCP/IP Illustrated Volume 1" 
> > -W.R.Stevens. Fig. 25.3, p.362) indicate it is "1", "2", "3",
> > "4", or "5" ???

The Sniffer dump is showing you the ASN.1/BER-encoded value of the
corresponding application-level value.

In most SNMP development environments you will find a header file
that defines the PDU types in a manner similar to this (from the
standard v3 winsnmp.h file at www.winsnmp.com):

   #define SNMP_PDU_GET   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0)

Where previously in that header file (or a prior one) the following
defines (among others of this nature) would have been given to define
the PDU construct itself:

   #define ASN_CONTEXT       (0x80)
   #define ASN_CONSTRUCTOR   (0x20)

So, in the case of the Get PDU, this equates to 0x100 (160 decimal)
which yields a binary value of 10100000, which yields the nibbles
values of "a0"...and so forth.

Left me know if that is not clear or seems otherwise problematic
to you.

Thanks,

BobN