[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: LDAP C API: Data Types and Legacy Implementations
Hallvard B Furuseth wrote:
>
> Mark Smith writes:
> > At present, the U-M LDAP implementation (and most implementations
> > based on it) requires callers to pass int's when encoding integers and
> > enumerations (with ber_printf) but long *'s when decoding (ber_scanf).
>
> In the current draft too.
> ber_printf 'X' (bitstring): char*, int
> ber_printf 'o' (octet string): char*, int
Good catch. I think the "int"s should be changed to ber_int_t in the
above text.
> ...
> OTOH, the encoding example should cast 0x80 in
> ber_printf(ber,"ti",0x80,val2)
> to (ber_tag_t).
Right again.
> ...
> Another matter: Is suggest this is added to ber_scanf:
>
> 't' Tag. A pointer to a ber_tag_t should be supplied. The value
> stored will be the tag of the next element, represented so
> it can be written by the 't' format to ber_printf.
>
> (It would just do ber_peek_tag().)
I am in favor of adding this... I know the Netscape/Mozilla
implementation and some others already implement the 't' format
specifier for ber_scanf().
> ...
> BTW, "berval's" should be "struct berval's" in the printf 'v'
> description.
Yes, the existing text is somewhat sloppy.
Thanks for your comments and help.
--
Mark Smith
Directory Architect / Sun-Netscape Alliance
My words are my own, not my employer's. Got LDAP?