The correct answer is (a).
This question would be better asked on the SNMPv3 mailing list
than on this generic mailing list.
A manager accepting (b) is behaving in the spirit of "be flexible
in what you accept", but it will probably interpret the value incorrectly
according to what was meant in the MIB definition.
Bert
> ----------
> From: Puja Singh[SMTP:[EMAIL PROTECTED]]
> Sent: Friday, April 13, 2001 3:55 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; Shivendra Kumar; Abhishek Bagchi; Puja
> Singh
> Subject: Octet string encoding
>
> 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
>
> -
> This message was passed through [EMAIL PROTECTED], which
> is a sublist of [EMAIL PROTECTED] Not all messages are passed.
> Decisions on what to pass are made solely by Maurizio Codogno.
>