]> git.sur5r.net Git - openldap/commitdiff
added structural objectclass; reworked obejctclasses to use 'monitor' and 'extensible...
authorPierangelo Masarati <ando@openldap.org>
Fri, 11 Jan 2002 10:27:58 +0000 (10:27 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 11 Jan 2002 10:27:58 +0000 (10:27 +0000)
servers/slapd/back-monitor/README
servers/slapd/back-monitor/back-monitor.h
servers/slapd/back-monitor/backend.c
servers/slapd/back-monitor/conn.c
servers/slapd/back-monitor/database.c
servers/slapd/back-monitor/init.c
servers/slapd/back-monitor/operation.c
servers/slapd/back-monitor/sent.c

index 298c7f3a0aea10871db8f0be5ae337b5ee5c4ba3..d98f9d89a19057f16c66f9686cf195d066f0d03b 100644 (file)
@@ -39,11 +39,9 @@ to ease the addition of new subsystems.
 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.
 
 
index ed1699a0cda5c480aa9b9af0dfff1f501c581825..bbd392c26e584a8762a382493777c917f87f25e2 100644 (file)
@@ -162,6 +162,12 @@ struct monitorinfo {
 #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;
index 76fbf85e449c5d7d977e88112d095fab028b0ed9..c43f7989d617f298e4746a12072169977c6ea1b8 100644 (file)
@@ -83,13 +83,7 @@ monitor_subsys_backend_init(
 
                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,
index a810637f4e1b8349c14b9e1d9647a62c871ddc5c..559310afb6ba6dba6af568a74597210f44577ee2 100644 (file)
@@ -78,13 +78,7 @@ monitor_subsys_conn_init(
         */
        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 );
        
@@ -142,13 +136,7 @@ monitor_subsys_conn_init(
         */
        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 );
        
@@ -270,13 +258,7 @@ conn_create(
 
        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 );
index 0569b784dd80b4ce14d716dda467732c6aa965b0..42083ce91c423cea2212e76d363da82ce264a9c2 100644 (file)
@@ -82,13 +82,7 @@ monitor_subsys_database_init(
 
                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,
index 81daaf29d820af8c6f8870fe5ee3bc79e4c0fad5..6841175b187eb8e5cadc047d023fcb1a384d28dc 100644 (file)
@@ -323,13 +323,7 @@ monitor_back_db_init(
 
                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 );
@@ -378,12 +372,9 @@ monitor_back_db_init(
        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 );
index 73ae9f83e483c1361ac4c54b76423a2ece011918..7dbb0a51ad10f3c24be2debf3e98a86de53ead6e 100644 (file)
@@ -78,13 +78,7 @@ monitor_subsys_ops_init(
         */
        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 );
 
@@ -141,13 +135,7 @@ monitor_subsys_ops_init(
         */
        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 );
 
index e5b39379b002ee9f2ebc1811fafc66e9a96810e5..39926e338d25a2f03b2625681e4e4292f6d245b0 100644 (file)
@@ -78,13 +78,7 @@ monitor_subsys_sent_init(
         */
        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 );
 
@@ -141,13 +135,7 @@ monitor_subsys_sent_init(
         */
        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 );
 
@@ -203,13 +191,7 @@ monitor_subsys_sent_init(
         */
        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 );
 
@@ -265,13 +247,7 @@ monitor_subsys_sent_init(
         */
        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 );