|  | The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
    | 
 Include dependency graph for proto_ldap_sync_ldap.h:
 Include dependency graph for proto_ldap_sync_ldap.h: This graph shows which files directly or indirectly include this file:
 This graph shows which files directly or indirectly include this file:Go to the source code of this file.
| Data Structures | |
| struct | proto_ldap_sync_ldap_t | 
| struct | proto_ldap_sync_ldap_thread_t | 
| struct | sync_packet_ctx_s | 
| Tracking structure for ldap sync packets.  More... | |
| struct | sync_state_s | 
| State of an individual sync.  More... | |
| Macros | |
| #define | SYNC_UUID_LENGTH 16 | 
| Typedefs | |
| typedef struct sync_packet_ctx_s | sync_packet_ctx_t | 
| typedef struct sync_state_s | sync_state_t | 
| Enumerations | |
| enum | sync_packet_status_t { SYNC_PACKET_PENDING = 0 , SYNC_PACKET_PREPARING , SYNC_PACKET_PROCESSING , SYNC_PACKET_COMPLETE } | 
| enum | sync_packet_type_t { SYNC_PACKET_TYPE_CHANGE = 0 , SYNC_PACKET_TYPE_COOKIE } | 
| enum | sync_phases_t { SYNC_PHASE_INIT = 0 , SYNC_PHASE_PRESENT = 1 , SYNC_PHASE_DELETE = 2 , SYNC_PHASE_DONE = 3 } | 
| Phases of the initial refresh stage for RFC 4533 servers.  More... | |
| Functions | |
| void | ldap_sync_cookie_event (fr_timer_list_t *tl, UNUSED fr_time_t now, void *uctx) | 
| Event to handle storing of cookies on a timed basis. | |
| int | ldap_sync_cookie_send (sync_packet_ctx_t *sync_packet_ctx) | 
| Enqueue a new cookie store packet. | |
| int | ldap_sync_cookie_store (sync_state_t *sync, bool refresh) | 
| Add a new cookie packet ctx to the pending list. | |
| 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. | |
| 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. | |
| int8_t | sync_state_cmp (void const *one, void const *two) | 
| Compare two sync state structures on msgid. | |
| Variables | |
| static fr_table_num_sorted_t const | sync_ldap_msg_table [] | 
| Types of LDAP messages relevant to LDAP sync. | |
| static size_t const | sync_ldap_msg_table_len = NUM_ELEMENTS(sync_ldap_msg_table) | 
| fr_table_num_sorted_t const | sync_op_table [] | 
| Operations performed on entries. | |
| size_t | sync_op_table_len | 
| struct proto_ldap_sync_ldap_t | 
Definition at line 90 of file proto_ldap_sync_ldap.h.
 Collaboration diagram for proto_ldap_sync_ldap_t:
 Collaboration diagram for proto_ldap_sync_ldap_t:| Data Fields | ||
|---|---|---|
| CONF_SECTION * | cs | our configuration | 
| fr_ldap_config_t | handle_config | Connection configuration instance. | 
| uint32_t | ldap_debug | Debug flag for the SDK. | 
| uint32_t | max_outstanding | Maximum number of outstanding packets. | 
| proto_ldap_sync_t * | parent | The module that spawned us. | 
| uint32_t | recv_buff | How big the kernel's receive buffer should be. | 
| bool | recv_buff_is_set | Whether we were provided with a recv_buff. | 
| char const * | server | Server string from the config. LDAP sync needs to remain against a single server so this is used rather than the server_str array in fr_ldap_config_t. | 
| char const * | tls_random_file | Path to the random file if /dev/random and /dev/urandom are unavailable. | 
| struct proto_ldap_sync_ldap_thread_t | 
Definition at line 112 of file proto_ldap_sync_ldap.h.
 Collaboration diagram for proto_ldap_sync_ldap_thread_t:
 Collaboration diagram for proto_ldap_sync_ldap_thread_t:| Data Fields | ||
|---|---|---|
| connection_t * | conn | Our connection to the LDAP directory. | 
| fr_timer_t * | conn_retry_ev | When to retry re-establishing the conn. | 
| fr_event_list_t * | el | Network side event list. | 
| proto_ldap_sync_ldap_t const * | inst | instance data | 
| fr_listen_t * | li | Our listener. | 
| char const * | name | socket name | 
| fr_network_t * | nr | Network handler. | 
| fr_listen_t * | parent | master IO handler. | 
| struct sync_packet_ctx_s | 
Tracking structure for ldap sync packets.
Definition at line 140 of file proto_ldap_sync_ldap.h.
 Collaboration diagram for sync_packet_ctx_s:
 Collaboration diagram for sync_packet_ctx_s:| Data Fields | ||
|---|---|---|
| uint8_t * | cookie | Cookie to store - can be NULL. | 
| fr_dlist_t | entry | Entry in list of pending packets. | 
| fr_pair_list_t | pairs | Pairs to send with change packets. | 
| bool | refresh | Does the sync require a refresh. | 
| sync_packet_status_t | status | Status of this packet. | 
| sync_state_t * | sync | Sync packet relates to. | 
| sync_packet_type_t | type | Type of packet. | 
| struct sync_state_s | 
State of an individual sync.
Definition at line 44 of file proto_ldap_sync_ldap.h.
 Collaboration diagram for sync_state_s:
 Collaboration diagram for sync_state_s:| Data Fields | ||
|---|---|---|
| uint32_t | changes_since_cookie | How many changes have been added since the last cookie was stored. | 
| sync_config_t const * | config | Configuration for this sync. | 
| fr_ldap_connection_t * | conn | Connection the sync is running on. | 
| uint8_t * | cookie | Opaque cookie, used to resume synchronisation. | 
| fr_timer_t * | cookie_ev | Timer event for sending cookies. | 
| fr_dlist_head_t * | filter | Parsed filter to be applied on the network side before passing packets to the worker. Predominantly to overcome Active Directory's lack of filtering in persistent searches. | 
| proto_ldap_sync_t const * | inst | Module instance for this sync. | 
| int | msgid | The unique identifier for this sync session. | 
| fr_rb_node_t | node | Entry in the tree of nodes. | 
| fr_dlist_head_t | pending | List of pending changes in progress. | 
| uint32_t | pending_cookies | How many cookies are in the pending heap. | 
| sync_phases_t | phase | Phase this sync is in. | 
| fr_timer_t * | retry_ev | Timer event for retrying failed changes. | 
| size_t | sync_no | Array position of config for this sync. | 
| fr_pair_list_t | trigger_args | Arguments to make available in triggers. | 
| #define SYNC_UUID_LENGTH 16 | 
Definition at line 31 of file proto_ldap_sync_ldap.h.
| typedef struct sync_packet_ctx_s sync_packet_ctx_t | 
Definition at line 153 of file proto_ldap_sync_ldap.h.
| typedef struct sync_state_s sync_state_t | 
Definition at line 78 of file proto_ldap_sync_ldap.h.
| enum sync_packet_status_t | 
Definition at line 126 of file proto_ldap_sync_ldap.h.
| enum sync_packet_type_t | 
| Enumerator | |
|---|---|
| SYNC_PACKET_TYPE_CHANGE | Packet is an entry change. | 
| SYNC_PACKET_TYPE_COOKIE | |
Definition at line 133 of file proto_ldap_sync_ldap.h.
| enum sync_phases_t | 
Phases of the initial refresh stage for RFC 4533 servers.
Definition at line 35 of file proto_ldap_sync_ldap.h.
| void ldap_sync_cookie_event | ( | fr_timer_list_t * | tl, | 
| UNUSED fr_time_t | now, | ||
| void * | uctx | ||
| ) | 
Event to handle storing of cookies on a timed basis.
Looks at the head of the list of pending sync packets for a cookie. A cookie at the head says that all the previous changes have been completed, so the cookie can be sent.
Definition at line 255 of file proto_ldap_sync_ldap.c.
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| int ldap_sync_cookie_send | ( | sync_packet_ctx_t * | sync_packet_ctx | ) | 
Enqueue a new cookie store packet.
Create a new internal packet containing the cookie we received from the LDAP server. This allows the administrator to store the cookie and provide it on a future call to load Cookie.
| [in] | sync_packet_ctx | packet context containing the cookie to store. | 
Definition at line 287 of file proto_ldap_sync_ldap.c.
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| int ldap_sync_cookie_store | ( | sync_state_t * | sync, | 
| bool | refresh | ||
| ) | 
Add a new cookie packet ctx to the pending list.
Does not actually send the packet.
| [in] | sync | the cookie was received for. | 
| [in] | refresh | the sync after storing this cookie. | 
Definition at line 228 of file proto_ldap_sync_ldap.c.
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 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.
| [in] | sync | notification has arrived for. | 
| [in] | uuid | of the entry (RFC 4533 only). | 
| [in] | orig_dn | original DN of the entry - provided by those directories implementing persistent search, when an entry is renamed. | 
| [in] | msg | containing the entry. | 
| [in] | op | The type of modification we need to perform to our representation of the entry. | 
Definition at line 420 of file proto_ldap_sync_ldap.c.
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 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.
| [in] | ctx | to allocate the sync state in. | 
| [in] | conn | which the sync will run on. | 
| [in] | inst | module instance for the sync. | 
| [in] | sync_no | number of the sync in the array of configs. | 
| [in] | config | for the sync. | 
Definition at line 188 of file proto_ldap_sync_ldap.c.
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| int8_t sync_state_cmp | ( | void const * | one, | 
| void const * | two | ||
| ) | 
Compare two sync state structures on msgid.
| [in] | one | first sync to compare. | 
| [in] | two | second sync to compare. | 
Definition at line 140 of file proto_ldap_sync_ldap.c.
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Types of LDAP messages relevant to LDAP sync.
Definition at line 82 of file proto_ldap_sync_ldap.h.
| 
 | static | 
Definition at line 88 of file proto_ldap_sync_ldap.h.
| 
 | extern | 
Operations performed on entries.
Definition at line 109 of file proto_ldap_sync_ldap.c.
| 
 | extern | 
Definition at line 115 of file proto_ldap_sync_ldap.c.
 1.9.8
 1.9.8