]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
need this outside for back monitor ...
[openldap] / servers / slapd / slap.h
index 470fbfc5130c72bb6f9e09fcf64830aa69075011..6f42c54e249ef604831f96370261d27330a30e0c 100644 (file)
@@ -234,7 +234,9 @@ typedef struct slap_ssf_set {
 #define SLAP_SCHERR_SYN_NOT_FOUND      13
 #define SLAP_SCHERR_MR_INCOMPLETE      14
 #define SLAP_SCHERR_NOT_SUPPORTED      15
-#define SLAP_SCHERR_BAD_DESCR  16
+#define SLAP_SCHERR_BAD_DESCR          16
+#define SLAP_SCHERR_OIDM                       17
+#define SLAP_SCHERR_LAST                       SLAP_SCHERR_OIDM
 
 typedef union slap_sockaddr {
        struct sockaddr sa_addr;
@@ -495,6 +497,7 @@ typedef struct slap_attr_desc {
 typedef struct slap_attr_name {
        struct berval an_name;
        AttributeDescription *an_desc;
+       ObjectClass *an_oc;
 } AttributeName;
 
 #define slap_ad_is_lang(ad)            ( (ad)->ad_lang.bv_len != 0 )
@@ -509,38 +512,52 @@ struct slap_internal_schema {
        ObjectClass *si_oc_extensibleObject;
        ObjectClass *si_oc_alias;
        ObjectClass *si_oc_referral;
+       ObjectClass *si_oc_rootdse;
        ObjectClass *si_oc_subentry;
        ObjectClass *si_oc_subschema;
-       ObjectClass *si_oc_rootdse;
+       ObjectClass *si_oc_collectiveAttributes;
+       ObjectClass *si_oc_dynamicObject;
 
        /* objectClass attribute descriptions */
        AttributeDescription *si_ad_objectClass;
 
        /* operational attribute descriptions */
        AttributeDescription *si_ad_structuralObjectClass;
-       AttributeDescription *si_ad_entryUUID;
-       AttributeDescription *si_ad_entryCSN;
        AttributeDescription *si_ad_creatorsName;
        AttributeDescription *si_ad_createTimestamp;
        AttributeDescription *si_ad_modifiersName;
        AttributeDescription *si_ad_modifyTimestamp;
        AttributeDescription *si_ad_hasSubordinates;
        AttributeDescription *si_ad_subschemaSubentry;
+       AttributeDescription *si_ad_collectiveSubentry;
+       AttributeDescription *si_ad_collectiveExclusions;
+       AttributeDescription *si_ad_entryUUID;
+       AttributeDescription *si_ad_entryCSN;
 
        /* root DSE attribute descriptions */
+       AttributeDescription *si_ad_altServer;
        AttributeDescription *si_ad_namingContexts;
        AttributeDescription *si_ad_supportedControl;
        AttributeDescription *si_ad_supportedExtension;
        AttributeDescription *si_ad_supportedLDAPVersion;
        AttributeDescription *si_ad_supportedSASLMechanisms;
        AttributeDescription *si_ad_supportedFeatures;
+       AttributeDescription *si_ad_vendorName;
+       AttributeDescription *si_ad_vendorVersion;
+
+       /* subentry attribute descriptions */
+       AttributeDescription *si_ad_administrativeRole;
+       AttributeDescription *si_ad_subtreeSpecification;
 
        /* subschema subentry attribute descriptions */
+       AttributeDescription *si_ad_ditStructureRules;
+       AttributeDescription *si_ad_ditContentRules;
+       AttributeDescription *si_ad_nameForms;
        AttributeDescription *si_ad_objectClasses;
        AttributeDescription *si_ad_attributeTypes;
        AttributeDescription *si_ad_ldapSyntaxes;
        AttributeDescription *si_ad_matchingRules;
-       AttributeDescription *si_ad_matchingRulesUse;
+       AttributeDescription *si_ad_matchingRuleUse;
 
        /* Aliases & Referrals */
        AttributeDescription *si_ad_aliasedObjectName;
@@ -553,7 +570,12 @@ struct slap_internal_schema {
        AttributeDescription *si_ad_aci;
 #endif
 
+       /* dynamic entries */
+       AttributeDescription *si_ad_entryTtl;
+       AttributeDescription *si_ad_dynamicSubtrees;
+
        /* Other attributes descriptions */
+       AttributeDescription *si_ad_distinguishedName;
        AttributeDescription *si_ad_name;
        AttributeDescription *si_ad_cn;
        AttributeDescription *si_ad_userPassword;
@@ -993,6 +1015,21 @@ struct slap_backend_db {
 #define                be_sync bd_info->bi_tool_sync
 #endif
 
+#define SLAP_BFLAG_NOLASTMOD           0x0001U
+#define        SLAP_BFLAG_GLUE_INSTANCE        0x0010U /* a glue backend */
+#define        SLAP_BFLAG_GLUE_SUBORDINATE     0x0020U /* child of a glue hierarchy */
+#define        SLAP_BFLAG_GLUE_LINKED          0x0040U /* child is connected to parent */
+#define SLAP_BFLAG_ALIASES             0x0100U
+#define SLAP_BFLAG_REFERRALS   0x0200U
+#define SLAP_BFLAG_SUBENTRIES  0x0400U
+#define SLAP_BFLAG_NOMONITOR   0x1000U
+       slap_mask_t     be_flags;
+#define SLAP_LASTMOD(be)       (!((be)->be_flags & SLAP_BFLAG_NOLASTMOD))
+#define SLAP_ALIASES(be)       ((be)->be_flags & SLAP_BFLAG_ALIASES)
+#define SLAP_REFERRALS(be)     ((be)->be_flags & SLAP_BFLAG_REFERRALS)
+#define SLAP_SUBENTRIES(be)    ((be)->be_flags & SLAP_BFLAG_SUBENTRIES)
+#define SLAP_MONITOR(be)       (!(be)->be_flags & SLAP_BFLAG_NOMONITOR))
+
        slap_mask_t     be_restrictops;         /* restriction operations */
 #define SLAP_RESTRICT_OP_ADD           0x0001U
 #define        SLAP_RESTRICT_OP_BIND           0x0002U
@@ -1052,13 +1089,7 @@ struct slap_backend_db {
        struct berval be_update_ndn;    /* allowed to make changes (in replicas) */
        BVarray be_update_refs; /* where to refer modifying clients to */
        char    *be_realm;
-       int     be_lastmod;     /* keep track of lastmodified{by,time}     */
 
-#define        SLAP_GLUE_INSTANCE      0x01    /* a glue backend */
-#define        SLAP_GLUE_SUBORDINATE   0x02    /* child of a glue hierarchy */
-#define        SLAP_GLUE_LINKED        0x04    /* child is connected to parent */
-
-       int     be_glueflags;   /* */
        void    *be_private;    /* anything the backend database needs     */
 };
 
@@ -1173,7 +1204,7 @@ typedef int (BI_tool_entry_reindex) LDAP_P(( BackendDB *be, ID id ));
 typedef int (BI_tool_sync) LDAP_P(( BackendDB *be ));
 
 struct slap_backend_info {
-       char    *bi_type;       /* type of backend */
+       char    *bi_type; /* type of backend */
 
        /*
         * per backend type routines:
@@ -1460,6 +1491,23 @@ typedef struct sasl_regexp {
 #define FLAG_GETDN_AUTHCID 2
 #define FLAG_GETDN_AUTHZID 4
 
+/*
+ * listener; need to access it from monitor backend
+ */
+typedef struct slap_listener {
+       char* sl_url;
+       char* sl_name;
+#ifdef HAVE_TLS
+       int             sl_is_tls;
+#endif
+#ifdef LDAP_CONNECTIONLESS
+       int     sl_is_udp;              /* UDP listener is also data port */
+#endif
+       ber_socket_t            sl_sd;
+       Sockaddr sl_sa;
+#define sl_addr        sl_sa.sa_in_addr
+} Listener;
+
 LDAP_END_DECL
 
 #include "proto-slap.h"