The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions
control.c File Reference

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

#include <freeradius-devel/ldap/base.h>
+ Include dependency graph for control.c:

Go to the source code of this file.

Functions

int fr_ldap_control_add_client (fr_ldap_connection_t *conn, LDAPControl *ctrl, bool freeit)
 Add a clientctrl to a connection handle. More...
 
int fr_ldap_control_add_server (fr_ldap_connection_t *conn, LDAPControl *ctrl, bool freeit)
 Add a serverctrl to a connection handle. More...
 
void fr_ldap_control_clear (fr_ldap_connection_t *conn)
 Clear and free any controls associated with a connection. More...
 
USES_APPLE_DEPRECATED_API void fr_ldap_control_merge (LDAPControl *serverctrls_out[], LDAPControl *clientctrls_out[], size_t serverctrls_len, size_t clientctrls_len, fr_ldap_connection_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
b8d3d4188a5ab477d12609ecdcaa1a4c6ce69acd
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

◆ fr_ldap_control_add_client()

int fr_ldap_control_add_client ( fr_ldap_connection_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 117 of file control.c.

◆ fr_ldap_control_add_server()

int fr_ldap_control_add_server ( fr_ldap_connection_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 93 of file control.c.

◆ fr_ldap_control_clear()

void fr_ldap_control_clear ( fr_ldap_connection_t conn)

Clear and free any controls associated with a connection.

Parameters
connto clear controls from.

Definition at line 134 of file control.c.

+ Here is the caller graph for this function:

◆ fr_ldap_control_merge()

USES_APPLE_DEPRECATED_API void fr_ldap_control_merge ( LDAPControl *  serverctrls_out[],
LDAPControl *  clientctrls_out[],
size_t  serverctrls_len,
size_t  clientctrls_len,
fr_ldap_connection_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 overridden 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 48 of file control.c.

+ Here is the caller graph for this function: