Add prototypes for grouping functions

Add ldap_find_control()
This commit is contained in:
Kurt Zeilenga 2004-03-14 00:57:44 +00:00
parent 0787c28078
commit af9e1583a7
2 changed files with 128 additions and 3 deletions

View file

@ -664,6 +664,11 @@ ldap_create_control LDAP_P((
int iscritical,
LDAPControl **ctrlp ));
LDAP_F( LDAPControl * )
ldap_find_control LDAP_P((
LDAP_CONST char *oid,
LDAPControl **ctrls ));
LDAP_F( void )
ldap_control_free LDAP_P((
LDAPControl *ctrl ));
@ -729,6 +734,110 @@ ldap_parse_intermediate LDAP_P((
LDAPControl ***serverctrls,
int freeit ));
/*
* in groupings.c:
*/
LDAP_F( int )
ldap_grouping_create_operation LDAP_P((
LDAP *ld,
LDAP_CONST char *grpoid,
struct berval *grpdata,
LDAPControl **serverctrls,
LDAPControl **clientctrls,
int *msgidp ));
LDAP_F( int )
ldap_grouping_create_operation_s LDAP_P((
LDAP *ld,
LDAP_CONST char *grpoid,
struct berval *grpdata,
LDAPControl **serverctrls,
LDAPControl **clientctrls,
struct berval **retgrpcookiep,
struct berval **retgrpdatap ));
LDAP_F( int )
ldap_parse_grouping_create_result LDAP_P((
LDAP *ld,
LDAPMessage *res,
struct berval **retgrpcookiep,
struct berval **retgrpdatap,
LDAPControl ***serverctrls,
int freeit ));
LDAP_F( int )
ldap_grouping_end_operation LDAP_P((
LDAP *ld,
LDAP_CONST char *grpoid,
struct berval *grpdata,
LDAPControl **serverctrls,
LDAPControl **clientctrls,
int *msgidp ));
LDAP_F( int )
ldap_grouping_end_operation_s LDAP_P((
LDAP *ld,
LDAP_CONST char *grpoid,
struct berval *grpdata,
LDAPControl **serverctrls,
LDAPControl **clientctrls,
struct berval **retgrpdatap ));
LDAP_F( int )
ldap_parse_grouping_end_result LDAP_P((
LDAP *ld,
LDAPMessage *res,
struct berval **retgrpdatap,
LDAPControl ***serverctrls,
int freeit ));
LDAP_F( int )
ldap_grouping_action_operation LDAP_P((
LDAP *ld,
LDAP_CONST char *grpoid,
struct berval *grpdata,
LDAPControl **serverctrls,
LDAPControl **clientctrls,
int *msgidp ));
LDAP_F( int )
ldap_grouping_action_operation_s LDAP_P((
LDAP *ld,
LDAP_CONST char *grpoid,
struct berval *grpdata,
LDAPControl **serverctrls,
LDAPControl **clientctrls,
struct berval **retgrpcookiep,
struct berval **retgrpdatap ));
LDAP_F( int )
ldap_parse_grouping_action_result LDAP_P((
LDAP *ld,
LDAPMessage *res,
struct berval **retgrpcookiep,
struct berval **retgrpdatap,
LDAPControl ***serverctrls,
int freeit ));
LDAP_F( int )
ldap_parse_grouping_end_notice LDAP_P((
LDAP *ld,
LDAPMessage *res,
struct berval **retdatap,
struct berval **retgrpcookiep,
struct berval **retgrpdatap,
int freeit ));
LDAP_F( int )
ldap_parse_grouping_info_notice LDAP_P((
LDAP *ld,
LDAPMessage *res,
struct berval **retdatap,
struct berval **retgrpcookiep,
struct berval **retgrpdatap,
int freeit ));
/*
* in abandon.c:
*/

View file

@ -26,9 +26,6 @@
* LICENSE, OR OTHER PRIOR WRITTEN CONSENT FROM NOVELL, COULD SUBJECT THE
* PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY.
*---
* Modification to OpenLDAP source by Novell, Inc.
* June 2000 sfs Added control utilities
*--
* Note: A verbatim copy of version 2.0.1 of the OpenLDAP Public License
* can be found in the file "build/LICENSE-2.0.1" in this distribution
* of OpenLDAP Software.
@ -392,6 +389,25 @@ ldap_control_dup( const LDAPControl *c )
return new;
}
LDAPControl *
ldap_find_control(
LDAP_CONST char *oid,
LDAPControl **ctrls )
{
if( ctrls == NULL || *ctrls == NULL ) {
return NULL;
}
for( ; *ctrls != NULL; ctrls++ ) {
if( strcmp( (*ctrls)->ldctl_oid, oid ) == 0 ) {
return *ctrls;
}
}
return NULL;
}
/*
ldap_create_control