SCHEMA
All the subsystems get a default "cn" attribute, represented by the
-subsystem's name, and they all have "top", "LDAPsubEntry" and
-"monitorSubEntry" objectclasses (the latter has not been defined yet,
-pending the design of the monitor schema and its registration under
-OpenLDAP's OID).
-At present "extensibleObject" is used, and the "description" attribute
+subsystem's name, and they all have "top", "monitor" and "extensibleObject"
+objectclasses.
+"extensibleObject" is used, and the "description" attribute
is used to hold the monitor information of each entry.
#define SLAPD_MONITOR_SENT_DN \
SLAPD_MONITOR_SENT_RDN "," SLAPD_MONITOR_DN
+#define SLAPD_MONITOR_OBJECTCLASSES \
+ "objectClass: top\n" \
+ "objectClass: monitor\n" \
+ "objectClass: extensibleObject\n" \
+ "structuralObjectClass: monitor\n"
+
struct monitorsubsys {
int mss_type;
char *mss_name;
snprintf( buf, sizeof( buf ),
"dn: cn=%d,%s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: %d\n",
i,
monitor_subsys[SLAPD_MONITOR_BACKEND].mss_dn.bv_val,
*/
snprintf( buf, sizeof( buf ),
"dn: cn=Total,%s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitor\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: Total\n",
monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val );
*/
snprintf( buf, sizeof( buf ),
"dn: cn=Current,%s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: Current\n",
monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val );
snprintf( buf, sizeof( buf ),
"dn: cn=%ld,%s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: %ld\n",
c->c_connid, monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val,
c->c_connid );
snprintf( buf, sizeof( buf ),
"dn: cn=%d,%s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: %d\n",
i,
monitor_subsys[SLAPD_MONITOR_DATABASE].mss_dn.bv_val,
snprintf( buf, sizeof( buf ),
"dn: %s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: %s\n",
monitor_subsys[ i ].mss_dn.bv_val,
monitor_subsys[ i ].mss_name );
snprintf( buf, sizeof( buf ),
"dn: " SLAPD_MONITOR_DN "\n"
"objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
+ "objectClass: monitor\n"
"objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ "structuralObjectClass: monitor\n"
"cn: Monitor" );
e = str2entry( buf );
*/
snprintf( buf, sizeof( buf ),
"dn: cn=Initiated,%s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: Initiated\n",
monitor_subsys[SLAPD_MONITOR_OPS].mss_dn.bv_val );
*/
snprintf( buf, sizeof( buf ),
"dn: cn=Completed,%s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: Completed\n",
monitor_subsys[SLAPD_MONITOR_OPS].mss_dn.bv_val );
*/
snprintf( buf, sizeof( buf ),
"dn: cn=Entries,%s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: Entries\n",
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );
*/
snprintf( buf, sizeof( buf ),
"dn: cn=Referrals,%s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: Referrals\n",
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );
*/
snprintf( buf, sizeof( buf ),
"dn: cn=PDU,%s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: PDU\n",
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );
*/
snprintf( buf, sizeof( buf ),
"dn: cn=Bytes,%s\n"
- "objectClass: top\n"
- "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
- "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
- "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+ SLAPD_MONITOR_OBJECTCLASSES
"cn: Bytes\n",
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );