All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
control.c File Reference

Functions for managing server/client side sort controls. More...

#include "ldap.h"
+ Include dependency graph for control.c:

Go to the source code of this file.

Functions

int rlm_ldap_control_add_client (ldap_handle_t *conn, LDAPControl *ctrl, bool freeit)
 Add a clientctrl to a connection handle. More...
 
int rlm_ldap_control_add_server (ldap_handle_t *conn, LDAPControl *ctrl, bool freeit)
 Add a serverctrl to a connection handle. More...
 
void rlm_ldap_control_clear (ldap_handle_t *conn)
 Clear and free any controls associated with a connection. More...
 
void rlm_ldap_control_merge (LDAPControl *serverctrls_out[], LDAPControl *clientctrls_out[], size_t serverctrls_len, size_t clientctrls_len, ldap_handle_t *conn, LDAPControl *serverctrls_in[], LDAPControl *clientctrls_in[])
 Merge connection and call specific client and server controls. More...
 

Detailed Description

Functions for managing server/client side sort controls.

Id:
ea6c471035c9db93ab9a00117346c7394ac9ac96
Author
Arran Cudbard-Bell a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg

Definition in file control.c.

Function Documentation

int rlm_ldap_control_add_client ( ldap_handle_t conn,
LDAPControl *  ctrl,
bool  freeit 
)

Add a clientctrl to a connection handle.

All internal LDAP functions will pass this clientctrl to libldap.

Parameters
connto add control to.
ctrlto add.
freeitWhether the control should be freed when the handle is released or closed.
Returns
  • 0 on success.
  • -1 on failure (exceeded maximum controls).

Definition at line 110 of file control.c.

int rlm_ldap_control_add_server ( ldap_handle_t conn,
LDAPControl *  ctrl,
bool  freeit 
)

Add a serverctrl to a connection handle.

All internal LDAP functions will pass this serverctrl to the server.

Parameters
connto add control to.
ctrlto add.
freeitWhether the control should be freed when the handle is released or closed.
Returns
  • 0 on success.
  • -1 on failure (exceeded maximum controls).

Definition at line 86 of file control.c.

void rlm_ldap_control_clear ( ldap_handle_t conn)

Clear and free any controls associated with a connection.

Parameters
connto clear controls from.

Definition at line 127 of file control.c.

+ Here is the caller graph for this function:

void rlm_ldap_control_merge ( LDAPControl *  serverctrls_out[],
LDAPControl *  clientctrls_out[],
size_t  serverctrls_len,
size_t  clientctrls_len,
ldap_handle_t conn,
LDAPControl *  serverctrls_in[],
LDAPControl *  clientctrls_in[] 
)

Merge connection and call specific client and server controls.

LDAP_OPT_CLIENT_CONTROLS and LDAP_OPT_SERVER_CONTROLS are useless because they're overriden in their entirety if any call specific controls are specified.

Parameters
[out]serverctrls_outWhere to write serverctrls.
[out]clientctrls_outWhere to write clientctrls.
[in]serverctrls_lenlength of serverctrls array.
[in]clientctrls_lenlength of clientctrls array.
[in]connto get controls from.
[in]serverctrls_infrom arguments.
[in]clientctrls_infrom_arguments.

Definition at line 41 of file control.c.

+ Here is the caller graph for this function: