-typedef int (BI_op_bind) LDAP_P(( BackendDB *bd,
- struct slap_conn *c, struct slap_op *o,
- struct berval *dn, struct berval *ndn, int method,
- struct berval *cred, struct berval *edn ));
-typedef int (BI_op_unbind) LDAP_P((BackendDB *bd,
- struct slap_conn *c, struct slap_op *o ));
-typedef int (BI_op_search) LDAP_P((BackendDB *bd,
- struct slap_conn *c, struct slap_op *o,
- struct berval *base, struct berval *nbase,
- int scope, int deref,
- int slimit, int tlimit,
- Filter *f, struct berval *filterstr,
- AttributeName *attrs, int attrsonly));
-typedef int (BI_op_compare)LDAP_P((BackendDB *bd,
- struct slap_conn *c, struct slap_op *o,
- struct berval *dn, struct berval *ndn,
- AttributeAssertion *ava));
-typedef int (BI_op_modify) LDAP_P((BackendDB *bd,
- struct slap_conn *c, struct slap_op *o,
- struct berval *dn, struct berval *ndn,
- Modifications *m));
-typedef int (BI_op_modrdn) LDAP_P((BackendDB *bd,
- struct slap_conn *c, struct slap_op *o,
- struct berval *dn, struct berval *ndn,
- struct berval *newrdn, struct berval *nnewrdn,
- int deleteoldrdn,
- struct berval *newSup, struct berval *nnewSup ));
-typedef int (BI_op_add) LDAP_P((BackendDB *bd,
- struct slap_conn *c, struct slap_op *o,
- Entry *e));
-typedef int (BI_op_delete) LDAP_P((BackendDB *bd,
- struct slap_conn *c, struct slap_op *o,
- struct berval *dn, struct berval *ndn));
-typedef int (BI_op_abandon) LDAP_P((BackendDB *bd,
- struct slap_conn *c, struct slap_op *o,
- ber_int_t msgid));
-typedef int (BI_op_cancel) LDAP_P((BackendDB *bd,
- struct slap_conn *c, struct slap_op *o,
- ber_int_t msgid));
-
-typedef int (BI_op_extended) LDAP_P((
- BackendDB *be,
- struct slap_conn *conn,
- struct slap_op *op,
- struct berval *reqoid,
- struct berval * reqdata,
- char **rspoid,
- struct berval ** rspdata,
- LDAPControl *** rspctrls,
- const char ** text,
- BerVarray *refs ));
-
-typedef int (BI_entry_release_rw) LDAP_P((BackendDB *bd,
- struct slap_conn *c, struct slap_op *o,
- Entry *e, int rw));
-
-typedef int (BI_chk_referrals) LDAP_P((BackendDB *bd,
- struct slap_conn *c, struct slap_op *o,
- struct berval *dn, struct berval *ndn,
- const char **text ));
-
-typedef int (BI_acl_group) LDAP_P((Backend *bd,
- struct slap_conn *c, struct slap_op *o,
- Entry *e,
- struct berval *bdn,
- struct berval *edn,
- ObjectClass *group_oc,
- AttributeDescription *group_at ));
-
-typedef int (BI_acl_attribute) LDAP_P((Backend *bd,
- struct slap_conn *c, struct slap_op *o,
- Entry *e, struct berval *edn,
- AttributeDescription *entry_at,
- BerVarray *vals ));
-
-typedef int (BI_operational) LDAP_P((Backend *bd,
- struct slap_conn *c, struct slap_op *o,
- Entry *e, AttributeName *attrs, int opattrs, Attribute **a ));
-
-typedef int (BI_has_subordinates) LDAP_P((Backend *bd,
- struct slap_conn *c, struct slap_op *o,
- Entry *e, int *has_subordinates ));
+typedef struct req_bind_s {
+ int rb_method;
+ struct berval rb_cred;
+ struct berval rb_edn;
+ slap_ssf_t rb_ssf;
+} req_bind_s;
+
+typedef struct req_search_s {
+ int rs_scope;
+ int rs_deref;
+ int rs_slimit;
+ int rs_tlimit;
+ int rs_attrsonly;
+ AttributeName *rs_attrs;
+ Filter *rs_filter;
+ struct berval rs_filterstr;
+} req_search_s;
+
+typedef struct req_compare_s {
+ AttributeAssertion *rs_ava;
+} req_compare_s;
+
+typedef struct req_modify_s {
+ Modifications *rs_modlist;
+} req_modify_s;
+
+typedef struct req_modrdn_s {
+ struct berval rs_newrdn;
+ struct berval rs_nnewrdn;
+ struct berval *rs_newSup;
+ struct berval *rs_nnewSup;
+ int rs_deleteoldrdn;
+} req_modrdn_s;
+
+typedef struct req_add_s {
+ Entry *rs_e;
+} req_add_s;
+
+typedef struct req_abandon_s {
+ ber_int_t rs_msgid;
+} req_abandon_s;
+
+typedef struct req_extended_s {
+ struct berval rs_reqoid;
+ struct berval *rs_reqdata;
+} req_extended_s;
+
+typedef enum slap_reply_e {
+ REP_RESULT,
+ REP_SASL,
+ REP_EXTENDED,
+ REP_SEARCH,
+ REP_SEARCHREF,
+ REP_INTERMEDIATE
+} slap_reply_t;
+
+typedef struct rep_sasl_s {
+ struct berval *r_sasldata;
+} rep_sasl_s;
+
+typedef struct rep_extended_s {
+ const char *r_rspoid;
+ struct berval *r_rspdata;
+} rep_extended_s;
+
+typedef struct rep_search_s {
+ Entry *r_entry;
+ AttributeName *r_attrs;
+ int r_nentries;
+ BerVarray r_v2ref;
+} rep_search_s;
+
+typedef struct slap_rep {
+ slap_reply_t sr_type;
+ ber_tag_t sr_tag;
+ ber_int_t sr_msgid;
+ ber_int_t sr_err;
+ const char *sr_matched;
+ const char *sr_text;
+ BerVarray sr_ref;
+ LDAPControl **sr_ctrls;
+ union sr_u {
+ rep_sasl_s sru_sasl;
+ rep_extended_s sru_extended;
+ rep_search_s sru_search;
+ } sr_un;
+} SlapReply;
+
+/* short hands for response members */
+#define sr_attrs sr_un.sru_search.r_attrs
+#define sr_entry sr_un.sru_search.r_entry
+#define sr_v2ref sr_un.sru_search.r_v2ref
+#define sr_nentries sr_un.sru_search.r_nentries
+#define sr_rspoid sr_un.sru_extended.r_rspoid
+#define sr_rspdata sr_un.sru_extended.r_rspdata
+#define sr_sasldata sr_un.sru_sasl.r_sasldata
+
+typedef int (BI_op_bind) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_op_unbind) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_op_search) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_op_compare) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_op_modify) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_op_modrdn) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_op_add) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_op_delete) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_op_abandon) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_op_cancel) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_op_extended) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_entry_release_rw) LDAP_P(( struct slap_op *op, Entry *e, int rw ));
+typedef int (BI_entry_get_rw) LDAP_P(( struct slap_op *op, struct berval *ndn,
+ ObjectClass *oc, AttributeDescription *at, int rw, Entry **e ));
+typedef int (BI_chk_referrals) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_operational) LDAP_P(( struct slap_op *op, struct slap_rep *rs, int opattrs, Attribute **ap ));
+typedef int (BI_has_subordinates) LDAP_P(( struct slap_op *op, Entry *e, int *hasSubs ));