[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: LDAP C API: Data Types and Legacy Implementations



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


OTOH, the encoding example should cast 0x80 in
	ber_printf(ber,"ti",0x80,val2)
to (ber_tag_t).


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().)


BTW, "berval's" should be "struct berval's" in the printf 'v'
description.

-- 
Hallvard