/*
*
* Copyright 1999 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*
* Comments:
*
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include "macos.h"
#endif /* MACOS */
#endif
#include "lber.h"
#include "ldap.h"
#include "ldap-private.h"
#include "ldap-int.h"
BerElement * ldap_build_extended_operation_req(LDAP *ld, char *exoid, struct berval *exdata, LDAPControl ** serverctrls)
{
int rv;
/* an extended operation request looks like this:
* ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
* requestName [0] LDAPOID,
* requestValue [1] OCTECT STRING OPTIONAL
* }
*/
return( NULLBER );
}
if ( ber_printf( ber, "{it{ts", ++ld->ld_msgid, LDAP_REQ_EXTENDED, LDAP_TAG_EXT_NAME, exoid ) == -1 ) {
return( NULLBER );
}
return( NULLBER );
}
return( NULLBER );
}
/* LDAPv3 */
/* Code controls if any */
if (serverctrls && serverctrls[0]) {
return( NULLBER );
}
/* Otherwise, is there any global server ctrls ? */
return( NULLBER );
}
}
return( NULLBER );
}
return (ber);
}
/* ldap_extended_operation - initiate an ldap extended operation.
* Parameters :
* ld : LDAP descriptor.
* exoid : OID of the request.
* exdata : Arbitrary data required by the operation.
* serverctrls : List of server controls.
* clientctrls : List of client controls.
* msgidp : msg id returned if operation succeeded.
* Returns LDAP_SUCCESS or error code.
*/
{
int rv;
#ifdef _REENTRANT
#endif
if (rv == LDAP_SUCCESS)
rv = LDAP_OTHER;
#ifdef _REENTRANT
#endif
return( rv);
}
/* send the message */
if (rv == -1) {
if (rv == LDAP_SUCCESS){
rv = LDAP_OTHER;
}
#ifdef _REENTRANT
#endif
return (rv);
}
#if _REENTRANT
#endif
return ( LDAP_SUCCESS );
}
{
int msgid;
int retcode;
if ((retcode = ldap_extended_operation(ld, exoid, exdata, serverctrls, clientctrls, &msgid)) != LDAP_SUCCESS)
return (retcode);
}