> Kindly explain as to where is it that the endianess matters, other than
the
> representation of the data in memory. Yhanking you.

The reason it matters is because if you naively try to decode an integer
value on a little-endian machine by memcpy'ing the bytes into an integer
variable, it will come out wrong.  The bytes must be reversed by the
decoder.  If you try to fix this by putting the bytes on the wire in
little-endian order, then you no longer have valid ASN.1 encoded content as
specified in the BER or PER rules.  You have something different.

Regards,

Ed


----- Original Message -----
From: "Ramaswamy R - CTD, Chennai." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 12:54 AM
Subject: RE: [ASN1] What is the bytes order in ASN.1 message?


>
> I would like to get a clarification at this point of the discussion. I am
> under the understanding that endianess comes into picture only when
> accessing a word or dword and above. Not when accessing in bytes. Most of
> BER specifies what the next byte (or octet as it is called) should be, and
> as for PER since bits are appended they effectively form bytes.
>
> I do not quite understand why the consideration of the endianess of the
> encoded byte stream. I am confident that the bit ordering (within a byte)
is
> big-endian though.
>
> Kindly explain as to where is it that the endianess matters, other than
the
> representation of the data in memory. Yhanking you.
>
> Yours Sincerely
> Ramaswamy R
> HCL Technologies Ltd,VPLN,Chennai
> Ph (Off) : 23728366 ext 2344
>
> "Do or do not. There is no try." - Yoda
>
> Disclaimer:
>
> This message and any attachment(s) contained here are information that is
> confidential, proprietary to HCL Technologies and its customers. Contents
> may be privileged or otherwise protected by law. The information is solely
> intended for the individual or the entity it is addressed to. If you are
not
> the intended recipient of this message, you are not authorized to read,
> forward, print, retain, copy or disseminate this message or any part of
it.
> If you have received this e-mail in error, please notify the sender
> immediately by return e-mail and delete it from your computer.
>
>
>
> -----Original Message-----
> From: WangHao [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 31, 2004 7:39 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [ASN1] What is the bytes order in ASN.1 message?
>
>
> > He asked what the standard interface was.  What you are doing is not
> > compatible with the standards and is therefore not relevant.
>
> I think you might misunderstand what I meant. I extended the standard
ASN.1
> notation and designed that notation carefully and considered the
> compatibility, so standard
> ASN.1 notations still work in its way. The default endian is big-endian.
>
> I mean that perhaps endian control should be provided for users to control
> the actual endian just as ECN does.
> There exists the applications that require messages in one endian order be
> converted into messages
> in another endian order or that require messages  in little-endian order
> instead of  in standard big-endian order.
>
> Best regards,
>
> Wang Hao
> _______________________________________________
> ASN1 mailing list
> [EMAIL PROTECTED]
> http://lists.asn1.org/mailman/listinfo/asn1
>
>

_______________________________________________
ASN1 mailing list
[EMAIL PROTECTED]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to