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

Re: ASN.1 Encoding Technique



Love Hörnquist Åstrand wrote:
> Michael B Allen <mba2000@ioplex.com> writes:
> 
>> Love,
>>
>> I was reading your Blog. I got the impression that you were still working
>> on your ASN.1 compiler. I have a little bit of experience here.
> 
> What you describe is pretty much how the encoder works today. Except that
> we don't use the buf_t. Our structures also are encoded backwards to avoid
> fixing up the length afterward.
> 
> What I'm trying to describe is something that doesn't generates c-code, but
> tables that is parsed runtime instead, I think there is too much repetition
> of code that can be described better.

You might have a look at LDAP's liblber. I've used it to parse and 
generate Kerberos structures on many occasions. (Of course, that made 
sense since I was writing plugins for LDAP servers, and liblber was 
already present. Saved a ton of memory by not needing to link libasn1 etc.)

-- 
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc
   OpenLDAP Core Team            http://www.openldap.org/project/