24 RCSID(
"$Id: fb069a7ef58500950114cb0d5b9b1ad1f912533b $")
28 #include <freeradius-devel/ldap/base.h>
30 #define STATE_TRANSITION(_new) \
32 DEBUG4("Changed state %s -> %s", \
33 fr_table_str_by_value(fr_ldap_connection_states, c->state, "<INVALID>"), \
34 fr_table_str_by_value(fr_ldap_connection_states, _new, "<INVALID>")); \
#define USES_APPLE_DEPRECATED_API
#define FALL_THROUGH
clang 10 doesn't recognised the FALL-THROUGH comment anymore
@ CONNECTION_FAILED
Connection is being reconnected because it failed.
char const * mech
SASL mech(s) to try.
char const * proxy
Identity to proxy.
char const * admin_password
Password used in administrative bind.
fr_ldap_state_t state
LDAP connection state machine.
char const * admin_identity
Identity we bind as when we need to query the LDAP directory.
int fr_ldap_bind_async(fr_ldap_connection_t *c, char const *bind_dn, char const *password, LDAPControl **serverctrls, LDAPControl **clientctrls)
Install I/O handlers for the bind operation.
fr_ldap_state_t
LDAP connection handle states.
@ FR_LDAP_STATE_ERROR
Connection is in an error state.
@ FR_LDAP_STATE_BIND
Connection is being bound.
@ FR_LDAP_STATE_START_TLS
TLS is being negotiated.
@ FR_LDAP_STATE_RUN
Connection is muxing/demuxing requests.
@ FR_LDAP_STATE_INIT
Connection uninitialised.
fr_ldap_config_t const * config
rlm_ldap connection configuration.
bool start_tls
Send the Start TLS message to the LDAP directory to start encrypted communications using the standard...
char const * realm
Kerberos realm.
fr_ldap_sasl_t admin_sasl
SASL parameters used when binding as the admin.
int fr_ldap_start_tls_async(fr_ldap_connection_t *c, LDAPControl **serverctrls, LDAPControl **clientctrls)
Install I/O handlers for Start TLS negotiation.
connection_t * conn
Connection state handle.
Tracks the state of a libldap connection handle.
void fr_ldap_state_error(fr_ldap_connection_t *c)
Signal that there's been an error on the connection.
fr_ldap_state_t fr_ldap_state_next(fr_ldap_connection_t *c)
Move between LDAP connection states.
#define STATE_TRANSITION(_new)
int fr_ldap_sasl_bind_async(fr_ldap_connection_t *c, char const *mechs, char const *identity, char const *password, char const *proxy, char const *realm, LDAPControl **serverctrls, LDAPControl **clientctrls)
Install I/O handlers for the bind operation.
void connection_signal_reconnect(connection_t *conn, connection_reason_t reason)
Asynchronously signal the connection should be reconnected.
void connection_signal_connected(connection_t *conn)
Asynchronously signal that the connection is open.