ietf
[Top] [All Lists]

Octet string encoding

2001-04-13 07:00:02
Hi,

We are working on SNMP Agent implementation.  We have a query regarding
the encoding of Octet string within a response PDU whether the Octet
string should be encoded as ascii or as hex & what should be the size of
the variable binding within the PDU?
If a MIB object is defined as of type Octet String of size 6 , when we
send the response we can send it as:
(a) Octet String as Hex , which will get encoded as Octet string of
length 6 bytes.
The equivalent ASN.1 representation will look like
Type = 04 , length = 06 and then the six bytes value
(b) Octet string a Ascii , which will get encoded as Octet string of
length 12 bytes.
Here each hex digit becomes an ASCII character so it needs twice the
space.

We would like to understand whether both the above representations are
correct and acceptable. Or, Is it that only (a) is acceptable.

I know it is a very basic question, but, I think I need an answer as I
find the standard SNMP managers accepting both.

Regards,
Puja



<Prev in Thread] Current Thread [Next in Thread>