file
connection.h
Classes
- struct ldap_sasl_options_t
- struct ldap_sasl_defaults_t
- struct ldap_sasl_params_t
- struct ldap_connection_config_t
- struct ldap_search_request_t
- struct ldap_request_t
- struct ldap_connection_ctx_t
Enums
- enum BindType { BIND_TYPE_INTERACTIVE = 1, BIND_TYPE_SIMPLE = 2 }
Typedefs
-
using ldap_schema_t = struct ldap_
schema_ t -
using ldap_sasl_options_t = struct ldap_
sasl_ options_ t -
using ldap_sasl_defaults_t = struct ldap_
sasl_ defaults_ t -
using ldap_sasl_params_t = struct ldap_
sasl_ params_ t -
using ldap_connection_config_t = struct ldap_
connection_ config_ t -
using ld_entry_t = struct ld_
entry_ s - using operation_callback_fn = enum OperationReturnCode(*)(int, LDAPMessage*, struct ldap_connection_ctx_t*)
- using search_callback_fn = enum OperationReturnCode(*)(struct ldap_connection_ctx_t*connection, ld_entry_t**entries, void*user_data)
- using LDHandle = struct ldhandle
-
using ldap_search_request_t = struct ldap_
search_ request_ t -
using ldap_request_t = struct ldap_
request_ t -
using ldap_connection_ctx_t = struct ldap_
connection_ ctx_ t
Functions
-
auto connection_configure(struct ldap_
global_ context_ t* global_ctx, struct ldap_ connection_ ctx_ t* connection, struct ldap_ connection_ config_ t* config) -> enum OperationReturnCode - connection_configure Configures connection while performing following actions:
-
auto connection_start_tls(struct ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - connection_start_tls Setups tls transport.
-
auto connection_sasl_bind(struct ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - connection_sasl_bind Tries to perform non interactive connection using sasl bind. Installs connection_bind_on_read operation handler.
-
auto connection_ldap_bind(struct ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - connection_ldap_bind Performs interactive bind and installs connection_bind_on_read operation handler.
-
auto connection_close(struct ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - connection_close Closes connection and frees resources associated with said connection.
- void connection_on_read(verto_ctx* ctx, verto_ev* ev)
- connection_on_read This callback is performed on read operation.
- void connection_on_write(verto_ctx* ctx, verto_ev* ev)
- connection_on_read This callback is performed on write operation.
-
auto connection_bind_on_read(int rc,
LDAPMessage* message,
struct ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - connection_bind_on_read This callback is performed during bind operation.
-
auto connection_start_tls_on_read(int rc,
LDAPMessage* message,
struct ldap_
connection_ ctx_ t* connection) -> enum OperationReturnCode - connection_start_tls_on_read This callback is performed during initiation of tls connection.
Defines
- #define MAX_REQUESTS
Enum documentation
enum BindType
Enumerators | |
---|---|
BIND_TYPE_INTERACTIVE |
We are going to perform interactive bind. |
BIND_TYPE_SIMPLE |
We are going to perform simple bind. |
Function documentation
enum OperationReturnCode connection_configure(struct ldap_ global_ context_ t* global_ctx,
struct ldap_ connection_ ctx_ t* connection,
struct ldap_ connection_ config_ t* config)
connection_configure Configures connection while performing following actions:
Parameters | |
---|---|
global_ctx | [in] global context to use |
connection | [out] configured connection ready to be supplied to connection state machine |
config | [in] connection configuration contains parameters for sasl, tls, etc. |
Returns |
|
- Creates LDAP handle and sets protocol version, turns on async connection flag.
- Depending on usage of sasl configures sals flags for connection. Allocates structure to hold sasl parameters.
- Depending on usage of TLS configures TLS flags for connection.
- Creates event base for connection.
enum OperationReturnCode connection_start_tls(struct ldap_ connection_ ctx_ t* connection)
connection_start_tls Setups tls transport.
Parameters | |
---|---|
connection in | connection to use |
enum OperationReturnCode connection_sasl_bind(struct ldap_ connection_ ctx_ t* connection)
connection_sasl_bind Tries to perform non interactive connection using sasl bind. Installs connection_bind_on_read operation handler.
Parameters | |
---|---|
connection | [in] connection to perform bind with. |
Returns |
|
enum OperationReturnCode connection_ldap_bind(struct ldap_ connection_ ctx_ t* connection)
connection_ldap_bind Performs interactive bind and installs connection_bind_on_read operation handler.
Parameters | |
---|---|
connection | [in] connection to perform bind on |
Returns |
|
enum OperationReturnCode connection_close(struct ldap_ connection_ ctx_ t* connection)
connection_close Closes connection and frees resources associated with said connection.
Parameters | |
---|---|
connection | [in] connection to use |
Returns | RETURN_CODE_SUCCESS. |
void connection_on_read(verto_ctx* ctx, verto_ev* ev)
connection_on_read This callback is performed on read operation.
Parameters | |
---|---|
ctx | [in] event context |
ev | [in] event |
void connection_on_write(verto_ctx* ctx, verto_ev* ev)
connection_on_read This callback is performed on write operation.
Parameters | |
---|---|
ctx | [in] event context |
ev | [in] event |
enum OperationReturnCode connection_bind_on_read(int rc,
LDAPMessage* message,
struct ldap_ connection_ ctx_ t* connection)
connection_bind_on_read This callback is performed during bind operation.
Parameters | |
---|---|
rc | [in] result code of bind operation. |
message | [in] message received during operation. |
connection | [in] connection used during bind operation. |
Returns |
|
enum OperationReturnCode connection_start_tls_on_read(int rc,
LDAPMessage* message,
struct ldap_ connection_ ctx_ t* connection)
connection_start_tls_on_read This callback is performed during initiation of tls connection.
Parameters | |
---|---|
rc in | result code of bind operation. |
message in | message received during operation. |
connection in | connection used during bind operation. |
Returns |
|