31#define SYNC_UUID_LENGTH 16
83 {
L(
"intermediateResponse"), LDAP_RES_INTERMEDIATE },
84 {
L(
"searchRes"), LDAP_RES_SEARCH_RESULT },
85 {
L(
"searchResEntry"), LDAP_RES_SEARCH_ENTRY },
86 {
L(
"searchResReference"), LDAP_RES_SEARCH_REFERENCE }
#define USES_APPLE_DEPRECATED_API
#define L(_str)
Helper for initialising arrays of string literals.
A section grouping multiple CONF_PAIR.
Head of a doubly linked list.
Entry in a doubly linked list.
Connection configuration.
Tracks the state of a libldap connection handle.
Stores all information relating to an event list.
static const conf_parser_t config[]
sync_op_t
Operations to perform on entries.
An instance of a proto_ldap_sync listen section.
Areas of the directory to receive notifications for.
int ldap_sync_cookie_send(sync_packet_ctx_t *sync_packet_ctx)
Enqueue a new cookie store packet.
fr_dlist_head_t * filter
Parsed filter to be applied on the network side before passing packets to the worker.
uint32_t pending_cookies
How many cookies are in the pending heap.
uint8_t * cookie
Opaque cookie, used to resume synchronisation.
size_t sync_no
Array position of config for this sync.
@ SYNC_PACKET_TYPE_CHANGE
Packet is an entry change.
@ SYNC_PACKET_TYPE_COOKIE
sync_phases_t phase
Phase this sync is in.
uint32_t max_outstanding
Maximum number of outstanding packets.
int msgid
The unique identifier for this sync session.
uint8_t * cookie
Cookie to store - can be NULL.
uint32_t ldap_debug
Debug flag for the SDK.
fr_pair_list_t pairs
Pairs to send with change packets.
char const * tls_random_file
Path to the random file if /dev/random and /dev/urandom are unavailable.
fr_dlist_head_t pending
List of pending changes in progress.
static size_t const sync_ldap_msg_table_len
int ldap_sync_cookie_store(sync_state_t *sync, bool refresh)
Add a new cookie packet ctx to the pending list.
void ldap_sync_cookie_event(fr_event_list_t *el, fr_time_t now, void *uctx)
sync_config_t const * config
Configuration for this sync.
static fr_table_num_sorted_t const sync_ldap_msg_table[]
Types of LDAP messages relevant to LDAP sync.
sync_state_t * sync
Sync packet relates to.
fr_dlist_t entry
Entry in list of pending packets.
fr_rb_node_t node
Entry in the tree of nodes.
sync_packet_status_t status
Status of this packet.
fr_event_timer_t const * conn_retry_ev
When to retry re-establishing the conn.
@ SYNC_PACKET_PREPARING
Packet being prepared.
@ SYNC_PACKET_PENDING
Packet not yet sent.
@ SYNC_PACKET_PROCESSING
Packet sent to worker.
@ SYNC_PACKET_COMPLETE
Packet response received from worker.
fr_listen_t * li
Our listener.
bool recv_buff_is_set
Whether we were provided with a recv_buff.
int ldap_sync_entry_send(sync_state_t *sync, uint8_t const uuid[SYNC_UUID_LENGTH], struct berval *orig_dn, LDAPMessage *msg, sync_op_t op)
Enqueue a new entry change packet.
connection_t * conn
Our connection to the LDAP directory.
proto_ldap_sync_t const * inst
Module instance for this sync.
fr_table_num_sorted_t const sync_op_table[]
Operations performed on entries.
uint32_t recv_buff
How big the kernel's receive buffer should be.
fr_ldap_config_t handle_config
Connection configuration instance.
fr_network_t * nr
Network handler.
int8_t sync_state_cmp(void const *one, void const *two)
Compare two sync state structures on msgid.
fr_listen_t * parent
master IO handler.
sync_state_t * sync_state_alloc(TALLOC_CTX *ctx, fr_ldap_connection_t *conn, proto_ldap_sync_t const *inst, size_t sync_no, sync_config_t const *config)
Allocate a sync state.
proto_ldap_sync_t * parent
The module that spawned us.
bool refresh
Does the sync require a refresh.
sync_phases_t
Phases of the initial refresh stage for RFC 4533 servers.
@ SYNC_PHASE_DELETE
Currently in the delete phase.
@ SYNC_PHASE_DONE
Refresh phase is complete.
@ SYNC_PHASE_INIT
We haven't entered any of the refresh phases.
@ SYNC_PHASE_PRESENT
Currently in the present phase.
sync_packet_type_t type
Type of packet.
uint32_t changes_since_cookie
How many changes have been added since the last cookie was stored.
char const * server
Server string from the config.
char const * name
socket name
fr_event_timer_t const * cookie_ev
Timer event for sending cookies.
fr_ldap_connection_t * conn
Connection the sync is running on.
CONF_SECTION * cs
our configuration
fr_pair_list_t trigger_args
Arguments to make available in triggers.
fr_event_timer_t const * retry_ev
Timer event for retrying failed changes.
fr_event_list_t * el
Network side event list.
proto_ldap_sync_ldap_t const * inst
instance data
Tracking structure for ldap sync packets.
State of an individual sync.
eap_aka_sim_process_conf_t * inst
An element in a lexicographically sorted array of name to num mappings.
static fr_event_list_t * el