/*
* Specific schema entities
*/
- ObjectClass *oc_monitor;
- ObjectClass *oc_monitorServer;
- ObjectClass *oc_monitorContainer;
- ObjectClass *oc_monitorCounterObject;
- ObjectClass *oc_monitorOperation;
- ObjectClass *oc_monitorConnection;
- ObjectClass *oc_managedObject;
- ObjectClass *oc_monitoredObject;
-
- AttributeDescription *ad_monitoredInfo;
- AttributeDescription *ad_managedInfo;
- AttributeDescription *ad_monitorCounter;
- AttributeDescription *ad_monitorOpCompleted;
- AttributeDescription *ad_monitorOpInitiated;
- AttributeDescription *ad_monitorConnectionNumber;
- AttributeDescription *ad_monitorConnectionAuthzDN;
- AttributeDescription *ad_monitorConnectionLocalAddress;
- AttributeDescription *ad_monitorConnectionPeerAddress;
- AttributeDescription *ad_monitorTimestamp;
+ ObjectClass *mi_oc_monitor;
+ ObjectClass *mi_oc_monitorServer;
+ ObjectClass *mi_oc_monitorContainer;
+ ObjectClass *mi_oc_monitorCounterObject;
+ ObjectClass *mi_oc_monitorOperation;
+ ObjectClass *mi_oc_monitorConnection;
+ ObjectClass *mi_oc_managedObject;
+ ObjectClass *mi_oc_monitoredObject;
+
+ AttributeDescription *mi_ad_monitoredInfo;
+ AttributeDescription *mi_ad_managedInfo;
+ AttributeDescription *mi_ad_monitorCounter;
+ AttributeDescription *mi_ad_monitorOpCompleted;
+ AttributeDescription *mi_ad_monitorOpInitiated;
+ AttributeDescription *mi_ad_monitorConnectionNumber;
+ AttributeDescription *mi_ad_monitorConnectionAuthzDN;
+ AttributeDescription *mi_ad_monitorConnectionLocalAddress;
+ AttributeDescription *mi_ad_monitorConnectionPeerAddress;
+ AttributeDescription *mi_ad_monitorTimestamp;
/*
* Generic description attribute
*/
- AttributeDescription *ad_description;
- AttributeDescription *ad_seeAlso;
+ AttributeDescription *mi_ad_description;
+ AttributeDescription *mi_ad_seeAlso;
+ AttributeDescription *mi_ad_l;
};
/*
"modifyTimestamp: %s\n",
i,
monitor_subsys[SLAPD_MONITOR_BACKEND].mss_dn.bv_val,
- mi->oc_monitoredObject->soc_cname.bv_val,
- mi->oc_monitoredObject->soc_cname.bv_val,
+ mi->mi_oc_monitoredObject->soc_cname.bv_val,
+ mi->mi_oc_monitoredObject->soc_cname.bv_val,
i,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
bv.bv_val = bi->bi_type;
bv.bv_len = strlen( bv.bv_val );
- attr_merge_normalize_one( e, mi->ad_monitoredInfo,
+ attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo,
&bv, NULL );
- attr_merge_normalize_one( e_backend, mi->ad_monitoredInfo,
+ attr_merge_normalize_one( e_backend, mi->mi_ad_monitoredInfo,
&bv, NULL );
if ( bi->bi_controls ) {
dn.bv_val = buf;
dn.bv_len = strlen( buf );
- attr_merge_normalize_one( e, mi->ad_seeAlso,
+ attr_merge_normalize_one( e, mi->mi_ad_seeAlso,
&dn, NULL );
}
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
bv.bv_val = "0";
bv.bv_len = 1;
- attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
bv.bv_val = "0";
bv.bv_len = 1;
- attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
Attribute *a;
char buf[] = "+9223372036854775807L";
- a = attr_find( e->e_attrs, mi->ad_monitorCounter );
+ a = attr_find( e->e_attrs, mi->mi_ad_monitorCounter );
if ( a == NULL ) {
return( -1 );
}
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
c->c_connid, monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val,
- mi->oc_monitorConnection->soc_cname.bv_val,
- mi->oc_monitorConnection->soc_cname.bv_val,
+ mi->mi_oc_monitorConnection->soc_cname.bv_val,
+ mi->mi_oc_monitorConnection->soc_cname.bv_val,
c->c_connid,
ctmbuf, mtmbuf );
bv.bv_val = buf;
bv.bv_len = strlen( buf );
- attr_merge_one( e, mi->ad_monitoredInfo, &bv, NULL );
+ attr_merge_one( e, mi->mi_ad_monitoredInfo, &bv, NULL );
/* connection number */
snprintf( buf, sizeof( buf ), "%ld", c->c_connid );
bv.bv_val = buf;
bv.bv_len = strlen( buf );
- attr_merge_one( e, mi->ad_monitorConnectionNumber, &bv, NULL );
+ attr_merge_one( e, mi->mi_ad_monitorConnectionNumber, &bv, NULL );
/* authz DN */
- attr_merge_one( e, mi->ad_monitorConnectionAuthzDN,
+ attr_merge_one( e, mi->mi_ad_monitorConnectionAuthzDN,
&c->c_dn, &c->c_ndn );
/* local address */
- attr_merge_one( e, mi->ad_monitorConnectionLocalAddress,
+ attr_merge_one( e, mi->mi_ad_monitorConnectionLocalAddress,
&c->c_sock_name, NULL );
/* peer address */
- attr_merge_one( e, mi->ad_monitorConnectionPeerAddress,
+ attr_merge_one( e, mi->mi_ad_monitorConnectionPeerAddress,
&c->c_peer_name, NULL );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
"modifyTimestamp: %s\n",
i,
monitor_subsys[SLAPD_MONITOR_DATABASE].mss_dn.bv_val,
- mi->oc_monitoredObject->soc_cname.bv_val,
- mi->oc_monitoredObject->soc_cname.bv_val,
+ mi->mi_oc_monitoredObject->soc_cname.bv_val,
+ mi->mi_oc_monitoredObject->soc_cname.bv_val,
i,
- mi->ad_monitoredInfo->ad_cname.bv_val,
+ mi->mi_ad_monitoredInfo->ad_cname.bv_val,
be->bd_info->bi_type,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
j, monitor_subsys[SLAPD_MONITOR_BACKEND].mss_dn.bv_val );
bv.bv_val = buf;
bv.bv_len = strlen( buf );
- attr_merge_normalize_one( e, mi->ad_seeAlso,
+ attr_merge_normalize_one( e, mi->mi_ad_seeAlso,
&bv, NULL );
break;
}
bv.bv_val = buf;
bv.bv_len = strlen( buf );
attr_merge_normalize_one( e_database,
- mi->ad_monitoredInfo, &bv, NULL );
+ mi->mi_ad_monitoredInfo, &bv, NULL );
i++;
#include "lber_pvt.h"
#include "back-monitor.h"
+#define INTEGRATE_CORE_SCHEMA
+
/*
* used by many functions to add description to entries
*/
struct monitorsubsys *ms;
Entry *e, *e_tmp;
struct monitorentrypriv *mp;
- int i;
+ int i, k;
char buf[ BACKMONITOR_BUFSIZE ], *end_of_line;
const char *text;
struct berval bv;
"MAY ( "
"description "
"$ l "
+#if 0 /* temporarily disabled */
"$ st "
"$ street "
"$ postalAddress "
"$ postalCode "
+#endif
"$ seeAlso "
"$ monitoredInfo "
"$ managedInfo "
") )",
- offsetof(struct monitorinfo, oc_monitor) },
+ offsetof(struct monitorinfo, mi_oc_monitor) },
{ "monitorServer", "( 1.3.6.1.4.1.4203.666.3.7 "
"NAME 'monitorServer' "
"DESC 'Server monitoring root entry' "
"SUP monitor STRUCTURAL )",
- offsetof(struct monitorinfo, oc_monitorServer) },
+ offsetof(struct monitorinfo, mi_oc_monitorServer) },
{ "monitorContainer", "( 1.3.6.1.4.1.4203.666.3.8 "
"NAME 'monitorContainer' "
"DESC 'monitor container class' "
"SUP monitor STRUCTURAL )",
- offsetof(struct monitorinfo, oc_monitorContainer) },
+ offsetof(struct monitorinfo, mi_oc_monitorContainer) },
{ "monitorCounterObject", "( 1.3.6.1.4.1.4203.666.3.9 "
"NAME 'monitorCounterObject' "
"DESC 'monitor counter class' "
"SUP monitor STRUCTURAL )",
- offsetof(struct monitorinfo, oc_monitorCounterObject) },
+ offsetof(struct monitorinfo, mi_oc_monitorCounterObject) },
{ "monitorOperation", "( 1.3.6.1.4.1.4203.666.3.10 "
"NAME 'monitorOperation' "
"DESC 'monitor operation class' "
"SUP monitor STRUCTURAL )",
- offsetof(struct monitorinfo, oc_monitorOperation) },
+ offsetof(struct monitorinfo, mi_oc_monitorOperation) },
{ "monitorConnection", "( 1.3.6.1.4.1.4203.666.3.11 "
"NAME 'monitorConnection' "
"DESC 'monitor connection class' "
"SUP monitor STRUCTURAL )",
- offsetof(struct monitorinfo, oc_monitorConnection) },
+ offsetof(struct monitorinfo, mi_oc_monitorConnection) },
{ "managedObject", "( 1.3.6.1.4.1.4203.666.3.12 "
"NAME 'managedObject' "
"DESC 'monitor managed entity class' "
"SUP monitor STRUCTURAL )",
- offsetof(struct monitorinfo, oc_managedObject) },
+ offsetof(struct monitorinfo, mi_oc_managedObject) },
{ "monitoredObject", "( 1.3.6.1.4.1.4203.666.3.13 "
"NAME 'monitoredObject' "
"DESC 'monitor monitored entity class' "
"SUP monitor STRUCTURAL )",
- offsetof(struct monitorinfo, oc_monitoredObject) },
+ offsetof(struct monitorinfo, mi_oc_monitoredObject) },
{ NULL, NULL, -1 }
}, mat[] = {
{ "monitoredInfo", "( 1.3.6.1.4.1.4203.666.1.14 "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} "
"NO-USER-MODIFICATION "
"USAGE directoryOperation )",
- offsetof(struct monitorinfo, ad_monitoredInfo) },
+ offsetof(struct monitorinfo, mi_ad_monitoredInfo) },
{ "managedInfo", "( 1.3.6.1.4.1.4203.666.1.15 "
"NAME 'managedInfo' "
"DESC 'monitor managed info' "
"SUP name )",
- offsetof(struct monitorinfo, ad_managedInfo) },
+ offsetof(struct monitorinfo, mi_ad_managedInfo) },
{ "monitorCounter", "( 1.3.6.1.4.1.4203.666.1.16 "
"NAME 'monitorCounter' "
"DESC 'monitor counter' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 "
"NO-USER-MODIFICATION "
"USAGE directoryOperation )",
- offsetof(struct monitorinfo, ad_monitorCounter) },
+ offsetof(struct monitorinfo, mi_ad_monitorCounter) },
{ "monitorOpCompleted", "( 1.3.6.1.4.1.4203.666.1.17 "
"NAME 'monitorOpCompleted' "
"DESC 'monitor completed operations' "
"SUP monitorCounter "
"NO-USER-MODIFICATION "
"USAGE directoryOperation )",
- offsetof(struct monitorinfo, ad_monitorOpCompleted) },
+ offsetof(struct monitorinfo, mi_ad_monitorOpCompleted) },
{ "monitorOpInitiated", "( 1.3.6.1.4.1.4203.666.1.18 "
"NAME 'monitorOpInitiated' "
"DESC 'monitor initiated operations' "
"SUP monitorCounter "
"NO-USER-MODIFICATION "
"USAGE directoryOperation )",
- offsetof(struct monitorinfo, ad_monitorOpInitiated) },
+ offsetof(struct monitorinfo, mi_ad_monitorOpInitiated) },
{ "monitorConnectionNumber", "( 1.3.6.1.4.1.4203.666.1.19 "
"NAME 'monitorConnectionNumber' "
"DESC 'monitor connection number' "
"SUP monitorCounter "
"NO-USER-MODIFICATION "
"USAGE directoryOperation )",
- offsetof(struct monitorinfo, ad_monitorConnectionNumber) },
+ offsetof(struct monitorinfo, mi_ad_monitorConnectionNumber) },
{ "monitorConnectionAuthzDN", "( 1.3.6.1.4.1.4203.666.1.20 "
"NAME 'monitorConnectionAuthzDN' "
"DESC 'monitor connection authorization DN' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 "
"NO-USER-MODIFICATION "
"USAGE directoryOperation )",
- offsetof(struct monitorinfo, ad_monitorConnectionAuthzDN) },
+ offsetof(struct monitorinfo, mi_ad_monitorConnectionAuthzDN) },
{ "monitorConnectionLocalAddress", "( 1.3.6.1.4.1.4203.666.1.21 "
"NAME 'monitorConnectionLocalAddress' "
"DESC 'monitor connection local address' "
"SUP monitoredInfo "
"NO-USER-MODIFICATION "
"USAGE directoryOperation )",
- offsetof(struct monitorinfo, ad_monitorConnectionLocalAddress) },
+ offsetof(struct monitorinfo, mi_ad_monitorConnectionLocalAddress) },
{ "monitorConnectionPeerAddress", "( 1.3.6.1.4.1.4203.666.1.22 "
"NAME 'monitorConnectionPeerAddress' "
"DESC 'monitor connection peer address' "
"SUP monitoredInfo "
"NO-USER-MODIFICATION "
"USAGE directoryOperation )",
- offsetof(struct monitorinfo, ad_monitorConnectionPeerAddress) },
+ offsetof(struct monitorinfo, mi_ad_monitorConnectionPeerAddress) },
{ "monitorTimestamp", "( 1.3.6.1.4.1.4203.666.1.24 "
"NAME 'monitorTimestamp' "
"DESC 'monitor timestamp' "
"EQUALITY generalizedTimeMatch "
"ORDERING generalizedTimeOrderingMatch "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
- "SINGLE-VALUE )",
- offsetof(struct monitorinfo, ad_monitorTimestamp) },
+ "SINGLE-VALUE"
+ "NO-USER-MODIFICATION "
+ "USAGE directoryOperation )",
+ offsetof(struct monitorinfo, mi_ad_monitorTimestamp) },
+#ifdef INTEGRATE_CORE_SCHEMA
+ { NULL, NULL, -1 }, /* description */
+ { NULL, NULL, -1 }, /* seeAlso */
+ { NULL, NULL, -1 }, /* l */
+#endif /* INTEGRATE_CORE_SCHEMA */
+ { NULL, NULL, -1 }
+#ifdef INTEGRATE_CORE_SCHEMA
+ }, mat_core[] = {
+ { "description", "( 2.5.4.13 "
+ "NAME 'description' "
+ "DESC 'RFC2256: descriptive information' "
+ "EQUALITY caseIgnoreMatch "
+ "SUBSTR caseIgnoreSubstringsMatch "
+ "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024} )",
+ offsetof(struct monitorinfo, mi_ad_description) },
+ { "seeAlso", "( 2.5.4.34 "
+ "NAME 'seeAlso' "
+ "DESC 'RFC2256: DN of related object' "
+ "SUP distinguishedName )",
+ offsetof(struct monitorinfo, mi_ad_seeAlso) },
+ { "l", "( 2.5.4.7 "
+ "NAME ( 'l' 'localityName' ) "
+ "DESC 'RFC2256: locality which this object resides in' "
+ "SUP name )",
+ offsetof(struct monitorinfo, mi_ad_l) },
{ NULL, NULL, -1 }
+#endif /* INTEGRATE_CORE_SCHEMA */
};
-
+
struct tm *tms;
static char tmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
mi->mi_startTime.bv_val = tmbuf;
mi->mi_startTime.bv_len = strlen( tmbuf );
+ /* prepare for schema integration */
+ for ( k = 0; mat[k].name != NULL; k++ );
+
+ for ( i = 0; mat_core[i].name != NULL; i++ ) {
+ AttributeDescription **ad;
+ const char *text;
+
+ ad = ((AttributeDescription **)&(((char *)mi)[mat_core[i].offset]));
+ ad[0] = NULL;
+
+ switch (slap_str2ad( mat_core[i].name, ad, &text ) ) {
+ case LDAP_SUCCESS:
+ break;
+
+#ifdef INTEGRATE_CORE_SCHEMA
+ case LDAP_UNDEFINED_TYPE:
+ mat[k] = mat_core[i];
+ k++;
+ break;
+#endif /* INTEGRATE_CORE_SCHEMA */
+
+ default:
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, CRIT,
+ "monitor_back_db_init: %s: %s\n",
+ mat_core[i].name, text, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "monitor_back_db_init: %s: %s\n",
+ mat_core[i].name, text, 0 );
+#endif
+ return( -1 );
+ }
+ }
+
+ /* schema integration */
for ( i = 0; mat[i].name; i++ ) {
LDAPAttributeType *at;
int code;
}
}
- if ( slap_str2ad( "description", &mi->ad_description, &text ) ) {
-#ifdef NEW_LOGGING
- LDAP_LOG( OPERATION, CRIT,
- "monitor_back_db_init: description: %s\n", text, 0, 0 );
-#else
- Debug( LDAP_DEBUG_ANY,
- "monitor_back_db_init: description: %s\n", text, 0, 0 );
-#endif
- return( -1 );
- }
-
- if ( slap_str2ad( "seeAlso", &mi->ad_seeAlso, &text ) ) {
-#ifdef NEW_LOGGING
- LDAP_LOG( OPERATION, CRIT,
- "monitor_back_db_init: seeAlso: %s\n", text, 0, 0 );
-#else
- Debug( LDAP_DEBUG_ANY,
- "monitor_back_db_init: seeAlso: %s\n", text, 0, 0 );
-#endif
- return( -1 );
- }
-
for ( i = 0; moc[i].name; i++ ) {
LDAPObjectClass *oc;
int code;
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
monitor_subsys[ i ].mss_dn.bv_val,
- mi->oc_monitorContainer->soc_cname.bv_val,
- mi->oc_monitorContainer->soc_cname.bv_val,
+ mi->mi_oc_monitorContainer->soc_cname.bv_val,
+ mi->mi_oc_monitorContainer->soc_cname.bv_val,
monitor_subsys[ i ].mss_name,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
"cn: Monitor\n"
"%s: This subtree contains monitoring/managing objects.\n"
"%s: This object contains information about this server.\n"
+#if 0
"%s: createTimestamp reflects the time this server instance was created.\n"
- "%s: modifyTimestamp reflects the current time.\n"
+ "%s: modifyTimestamp reflects the time this server instance was last accessed.\n"
+#endif
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
- mi->oc_monitorServer->soc_cname.bv_val,
- mi->oc_monitorServer->soc_cname.bv_val,
- mi->ad_description->ad_cname.bv_val,
- mi->ad_description->ad_cname.bv_val,
- mi->ad_description->ad_cname.bv_val,
- mi->ad_description->ad_cname.bv_val,
+ mi->mi_oc_monitorServer->soc_cname.bv_val,
+ mi->mi_oc_monitorServer->soc_cname.bv_val,
+ mi->mi_ad_description->ad_cname.bv_val,
+ mi->mi_ad_description->ad_cname.bv_val,
+#if 0
+ mi->mi_ad_description->ad_cname.bv_val,
+ mi->mi_ad_description->ad_cname.bv_val,
+#endif
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
bv.bv_len = strlen( Versionstr );
}
- if ( attr_merge_normalize_one( e, mi->ad_monitoredInfo,
+ if ( attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo,
&bv, NULL ) ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, CRIT,
}
if ( mi->mi_l.bv_len ) {
- AttributeDescription *ad = NULL;
- const char *text = NULL;
-
- if ( slap_str2ad( "l", &ad, &text ) ) {
-#ifdef NEW_LOGGING
- LDAP_LOG( OPERATION, CRIT, "unable to get 'l'\n",
- SLAPD_MONITOR_DN, 0, 0 );
-#else
- Debug( LDAP_DEBUG_ANY, "unable to get 'l'\n",
- SLAPD_MONITOR_DN, 0, 0 );
-#endif
- return( -1 );
- }
-
- if ( attr_merge_normalize_one( e, ad, &mi->mi_l, NULL ) ) {
+ if ( attr_merge_normalize_one( e, mi->mi_ad_l, &mi->mi_l, NULL ) ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, CRIT,
"unable to add locality to '%s' entry\n",
"modifyTimestamp: %s\n",
i,
monitor_subsys[SLAPD_MONITOR_LISTENER].mss_dn.bv_val,
- mi->oc_monitoredObject->soc_cname.bv_val,
- mi->oc_monitoredObject->soc_cname.bv_val,
+ mi->mi_oc_monitoredObject->soc_cname.bv_val,
+ mi->mi_oc_monitoredObject->soc_cname.bv_val,
i,
- mi->ad_monitorConnectionLocalAddress->ad_cname.bv_val,
+ mi->mi_ad_monitorConnectionLocalAddress->ad_cname.bv_val,
l[i]->sl_name.bv_val,
l[i]->sl_url.bv_val,
mi->mi_startTime.bv_val,
bv.bv_val = "TLS";
bv.bv_len = sizeof("TLS")-1;
- attr_merge_normalize_one( e, mi->ad_monitoredInfo,
+ attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo,
&bv, NULL );
}
#endif /* HAVE_TLS */
bv.bv_val = "UDP";
bv.bv_len = sizeof("UDP")-1;
- attr_merge_normalize_one( e, mi->ad_monitoredInfo,
+ attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo,
&bv, NULL );
}
#endif /* HAVE_TLS */
/* initialize the debug level(s) */
for ( i = 0; int_2_level[ i ].i != 0; i++ ) {
- if ( mi->ad_managedInfo->ad_type->sat_equality->smr_normalize ) {
+ if ( mi->mi_ad_managedInfo->ad_type->sat_equality->smr_normalize ) {
int rc;
- rc = (*mi->ad_managedInfo->ad_type->sat_equality->smr_normalize)(
+ rc = (*mi->mi_ad_managedInfo->ad_type->sat_equality->smr_normalize)(
0,
- mi->ad_managedInfo->ad_type->sat_syntax,
- mi->ad_managedInfo->ad_type->sat_equality,
+ mi->mi_ad_managedInfo->ad_type->sat_syntax,
+ mi->mi_ad_managedInfo->ad_type->sat_equality,
&int_2_level[ i ].s,
&int_2_level[ i ].n, NULL );
if ( rc ) {
}
if ( int_2_level[ i ].i & ldap_syslog ) {
- attr_merge_one( e, mi->ad_managedInfo,
+ attr_merge_one( e, mi->mi_ad_managedInfo,
&int_2_level[ i ].s,
&int_2_level[ i ].n );
}
}
- attr_merge( e, mi->ad_description, desc, NULL );
+ attr_merge( e, mi->mi_ad_description, desc, NULL );
monitor_cache_release( mi, e );
/*
* only the monitor description attribute can be modified
*/
- } else if ( mod->sm_desc != mi->ad_managedInfo) {
+ } else if ( mod->sm_desc != mi->mi_ad_managedInfo) {
rc = LDAP_UNWILLING_TO_PERFORM;
break;
}
"modifyTimestamp: %s\n",
bv_op[ i ].bv_val,
monitor_subsys[SLAPD_MONITOR_OPS].mss_dn.bv_val,
- mi->oc_monitorOperation->soc_cname.bv_val,
- mi->oc_monitorOperation->soc_cname.bv_val,
+ mi->mi_oc_monitorOperation->soc_cname.bv_val,
+ mi->mi_oc_monitorOperation->soc_cname.bv_val,
bv_op[ i ].bv_val,
- mi->ad_monitorOpInitiated->ad_cname.bv_val,
- mi->ad_monitorOpCompleted->ad_cname.bv_val,
+ mi->mi_ad_monitorOpInitiated->ad_cname.bv_val,
+ mi->mi_ad_monitorOpCompleted->ad_cname.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
return( 0 );
}
- a = attr_find( e->e_attrs, mi->ad_monitorOpInitiated );
+ a = attr_find( e->e_attrs, mi->mi_ad_monitorOpInitiated );
assert ( a != NULL );
snprintf( buf, sizeof( buf ), "%ld", nInitiated );
free( a->a_vals[ 0 ].bv_val );
ber_str2bv( buf, 0, 1, &a->a_vals[ 0 ] );
- a = attr_find( e->e_attrs, mi->ad_monitorOpCompleted );
+ a = attr_find( e->e_attrs, mi->mi_ad_monitorOpCompleted );
assert ( a != NULL );
snprintf( buf, sizeof( buf ), "%ld", nCompleted );
free( a->a_vals[ 0 ].bv_val );
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
monitor_subsys[SLAPD_MONITOR_RWW].mss_dn.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
bv.bv_val = "0";
bv.bv_len = 1;
- attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
monitor_subsys[SLAPD_MONITOR_RWW].mss_dn.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
bv.bv_val = "0";
bv.bv_len = 1;
- attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
snprintf( buf, sizeof( buf ), "%ld", num );
- a = attr_find( e->e_attrs, mi->ad_monitorCounter );
+ a = attr_find( e->e_attrs, mi->mi_ad_monitorCounter );
assert( a );
free( a->a_vals[0].bv_val );
ber_str2bv( buf, 0, 1, &a->a_vals[ 0 ] );
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
bv.bv_val = "0";
bv.bv_len = 1;
- attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
bv.bv_val = "0";
bv.bv_len = 1;
- attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
bv.bv_val = "0";
bv.bv_len = 1;
- attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
- mi->oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+ mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
bv.bv_val = "0";
bv.bv_len = 1;
- attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
Attribute *a;
char buf[] = "+9223372036854775807L";
- a = attr_find( e->e_attrs, mi->ad_monitorCounter);
+ a = attr_find( e->e_attrs, mi->mi_ad_monitorCounter);
if ( a == NULL ) {
return( -1 );
}
bv.bv_val = buf;
bv.bv_len = strlen( bv.bv_val );
- attr_merge_normalize_one( e, mi->ad_monitoredInfo, &bv, NULL );
+ attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo, &bv, NULL );
monitor_cache_release( mi, e );
snprintf( buf, sizeof( buf ), "backload=%d",
ldap_pvt_thread_pool_backload( &connection_pool ) );
- a = attr_find( e->e_attrs, mi->ad_monitoredInfo );
+ a = attr_find( e->e_attrs, mi->mi_ad_monitoredInfo );
if ( a != NULL ) {
for ( b = a->a_vals; b[0].bv_val != NULL; b++ ) {
if ( strncmp( b[0].bv_val, "backload=",
bv.bv_val = buf;
bv.bv_len = strlen( buf );
- attr_merge_normalize_one( e, mi->ad_monitoredInfo,
+ attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo,
&bv, NULL );
}
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
monitor_subsys[SLAPD_MONITOR_TIME].mss_dn.bv_val,
- mi->oc_monitoredObject->soc_cname.bv_val,
- mi->oc_monitoredObject->soc_cname.bv_val,
- mi->ad_monitorTimestamp->ad_cname.bv_val,
+ mi->mi_oc_monitoredObject->soc_cname.bv_val,
+ mi->mi_oc_monitoredObject->soc_cname.bv_val,
+ mi->mi_ad_monitorTimestamp->ad_cname.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
"createTimestamp: %s\n"
"modifyTimestamp: %s\n",
monitor_subsys[SLAPD_MONITOR_TIME].mss_dn.bv_val,
- mi->oc_monitoredObject->soc_cname.bv_val,
- mi->oc_monitoredObject->soc_cname.bv_val,
- mi->ad_monitorTimestamp->ad_cname.bv_val,
+ mi->mi_oc_monitoredObject->soc_cname.bv_val,
+ mi->mi_oc_monitoredObject->soc_cname.bv_val,
+ mi->mi_ad_monitorTimestamp->ad_cname.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val,
mi->mi_startTime.bv_val );
len = strlen( tmbuf );
- a = attr_find( e->e_attrs, mi->ad_monitorTimestamp );
+ a = attr_find( e->e_attrs, mi->mi_ad_monitorTimestamp );
if ( a == NULL ) {
return( -1 );
}