[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BER encoding of Unsigned32 and BITS



Chum:
SPPI treats BITS the same way SNMPv2/SMIv2 does, as a pseudotype.
Hence the encoding will be the same.

For:
DsIfAlgDropCapsEntry ::= SEQUENCE {
        dsIfAlgDropCapsType                BITS,
        dsIfAlgDropCapsMQCount             Unsigned32
}

I want to encode the following:

dsIfAlgDropCapsType/BITS/value = 0011100 (binary)
tag value = 0x04  (same as for OCTET STRING)
length     = 0x01
value       = 0x38  (for binary 0011 100 0, with zero padded at LSBit)

Hope this helped.

We may also need to see if the SPPI needs to be updated on explaining this.

-- Kwok --


At 11:25 AM 9/4/03 +0000, chum chum wrote:
Hello,

I read the RFC 3084 (COPS-PR) and find in the example of BER encoding for EDP that:

02 01 08 :ipv4FilterIndex/Unsigned32/Value = 8

However, in the book "Understanding SNMP MIBs", page 396, Unsigned32 has a tag encoding of 0x42, not 0x02. Could someone tell me which one is correct?

How about BER encoding for BITS?
For example, in RFC 3317 (COPS-PR for DiffServ)

DsIfAlgDropCapsEntry ::= SEQUENCE {
        dsIfAlgDropCapsType                BITS,
        dsIfAlgDropCapsMQCount             Unsigned32
}

I want to encode the following:

dsIfAlgDropCapsType/BITS/value = 0011100 (binary)
Tag value = ??
length = ??
value = ??

Thank you very much,
C.