s3-rpc_server: run minimal_includes.pl.
[samba.git] / source3 / include / tldap.h
index 3da7d69d86115b03d6d85b432b70138a3a5efd73..36cbdce2dd0b68c8dbfb9c4b665fa372919e0716 100644 (file)
@@ -29,7 +29,7 @@ struct tldap_message;
 struct tldap_control {
        const char *oid;
        DATA_BLOB value;
-       bool iscritical;
+       bool critical;
 };
 
 struct tldap_attribute {
@@ -48,6 +48,7 @@ struct tldap_mod {
 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);
@@ -104,11 +105,12 @@ int tldap_search(struct tldap_context *ld,
                 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,
@@ -122,7 +124,7 @@ struct tevent_req *tldap_add_send(TALLOC_CTX *mem_ctx,
                                  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);
 
@@ -130,14 +132,14 @@ struct tevent_req *tldap_modify_send(TALLOC_CTX *mem_ctx,
                                     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);
 
@@ -156,12 +158,12 @@ int tldap_delete(struct tldap_context *ld, const char *dn,
 
 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 */
@@ -273,4 +275,6 @@ void tldap_set_debug(struct tldap_context *ld,
 #define TLDAP_SCOPE_ONE (1)
 #define TLDAP_SCOPE_SUB (2)
 
+#define TLDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319"
+
 #endif