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

draft-ietf-ldap-c-api-00 buglets



Paragraph 7.2:

> option (...) followed by the
>        type of the corresponding outvalue or invalue parameter.

Wrong.  The argument must be (implicitly or explicitly) converted to
`void*', since different pointer types may be binary incompatible.

>    LDAP_OPT_DESC (0x01) int *
>    (...)
>   LDAP_OPT_REBIND_FN (0x06) function pointer

Function pointers may be too wide to fit into `void*'.
Pass a *pointer* to a function pointer instead.  (And rename the option
if there are implementations in use that follow the current draft.)

>          See the discussion of ldap_bind() and friends below.
> 
>   LDAP_OPT_REBIND_ARG (0x07) void *
>          See the discussion of ldap_bind() and friends below.

I don't see any mention of rebind fn/arg in the ldap_bind section.

You might reserve a range of LDAP_OPT_* values for extensions and/or
reserve a range for future standardization (meaning "extensions that get
their own RFC", probably:-)

===

Paragraph 7.6:

ldap_search_ext(_s) use parameters `timeoutp' and `sizelimit'.
The description of the parameters does not mention `sizelimit', and
describes `timeout' without 'p'.

===

A section which lists briefly which part of the C namespaces the LDAP
library uses, would be nice.  (Even struct/union members are
significant, since the user must not #define macros with the same
names.)  ISO C defines these relevant categories:
	external symbols,
	macros,
	struct/union/enum tags,
	struct/union members,
	ordinary identifiers.
The draft may be using a bit too wide a name space.  If so, rename some
identifiers.  Implementations can still provide a compatibility mode
which #defines the old identifiers to the new ones.

-- 
Hallvard