struct tldap_control {
const char *oid;
DATA_BLOB value;
- bool iscritical;
+ bool critical;
};
struct tldap_attribute {
bool tevent_req_is_ldap_error(struct tevent_req *req, int *perr);
struct tldap_context *tldap_context_create(TALLOC_CTX *mem_ctx, int fd);
+bool tldap_connection_ok(struct tldap_context *ld);
bool tldap_context_setattr(struct tldap_context *ld,
const char *name, const void *pptr);
void *tldap_context_getattr(struct tldap_context *ld, const char *name);
struct tldap_control *sctrls, int num_sctrls,
struct tldap_control *cctrls, int num_cctrls,
int timelimit, int sizelimit, int deref,
- TALLOC_CTX *mem_ctx, struct tldap_message ***pentries,
+ TALLOC_CTX *mem_ctx, struct tldap_message ***entries,
struct tldap_message ***refs);
bool tldap_entry_dn(struct tldap_message *msg, char **dn);
-bool tldap_entry_attributes(struct tldap_message *msg, int *num_attributes,
- struct tldap_attribute **attributes);
+bool tldap_entry_attributes(struct tldap_message *msg,
+ struct tldap_attribute **attributes,
+ int *num_attributes);
struct tevent_req *tldap_add_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
int num_cctrls);
int tldap_add_recv(struct tevent_req *req);
int tldap_add(struct tldap_context *ld, const char *dn,
- int num_attributes, struct tldap_mod *attributes,
+ struct tldap_mod *attributes, int num_attributes,
struct tldap_control *sctrls, int num_sctrls,
struct tldap_control *cctrls, int num_cctrls);
struct tevent_context *ev,
struct tldap_context *ld,
const char *dn,
- int num_mods, struct tldap_mod *mods,
+ struct tldap_mod *mods, int num_mods,
struct tldap_control *sctrls,
int num_sctrls,
struct tldap_control *cctrls,
int num_cctrls);
int tldap_modify_recv(struct tevent_req *req);
int tldap_modify(struct tldap_context *ld, const char *dn,
- int num_mods, struct tldap_mod *mods,
+ struct tldap_mod *mods, int num_mods,
struct tldap_control *sctrls, int num_sctrls,
struct tldap_control *cctrls, int num_cctrls);
int tldap_msg_id(const struct tldap_message *msg);
int tldap_msg_type(const struct tldap_message *msg);
-const char *tldap_req_matcheddn(struct tevent_req *req);
-const char *tldap_req_diagnosticmessage(struct tevent_req *req);
-const char *tldap_req_referral(struct tevent_req *req);
-const char *tldap_ctx_matcheddn(struct tldap_context *ctx);
-const char *tldap_ctx_diagnosticmessage(struct tldap_context *ctx);
-const char *tldap_ctx_referral(struct tldap_context *ctx);
+const char *tldap_msg_matcheddn(struct tldap_message *msg);
+const char *tldap_msg_diagnosticmessage(struct tldap_message *msg);
+const char *tldap_msg_referral(struct tldap_message *msg);
+void tldap_msg_sctrls(struct tldap_message *msg, int *num_sctrls,
+ struct tldap_control **sctrls);
+struct tldap_message *tldap_ctx_lastmsg(struct tldap_context *ld);
const char *tldap_err2string(int rc);
/* DEBUG */
#define TLDAP_SCOPE_ONE (1)
#define TLDAP_SCOPE_SUB (2)
+#define TLDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319"
+
#endif