The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
sync.h
Go to the documentation of this file.
1#pragma once
2/*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or (at
6 * your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16 */
17
18/**
19 * $Id: e4e2327a548c5f87d13df73709c62642e38f7eaa $
20 * @file lib/ldap/sync.h
21 *
22 * @brief Common definitions required by both network and worker for LDAP sync
23 *
24 * @copyright 2022 Network RADIUS SAS (legal@networkradius.com)
25 */
26
27#include <freeradius-devel/protocol/ldap/freeradius.internal.h>
28
29/** Types of the internal packets for processing LDAP sync messages
30 */
31typedef enum {
32 FR_LDAP_SYNC_CODE_UNDEFINED = 0, //!< Packet code has not been set.
33 FR_LDAP_SYNC_CODE_PRESENT = FR_PACKET_TYPE_VALUE_PRESENT,
34 //!< LDAP server indicates a particular object is
35 //!< present and unchanged.
36 FR_LDAP_SYNC_CODE_ADD = FR_PACKET_TYPE_VALUE_ADD,
37 //!< Object has been added to the LDAP directory.
38 FR_LDAP_SYNC_CODE_MODIFY = FR_PACKET_TYPE_VALUE_MODIFY,
39 //!< Object has been modified.
40 FR_LDAP_SYNC_CODE_DELETE = FR_PACKET_TYPE_VALUE_DELETE,
41 //!< Object has been deleted.
42 FR_LDAP_SYNC_CODE_ENTRY_RESPONSE = FR_PACKET_TYPE_VALUE_RESPONSE,
43 //!< Response packet to present / add / modify / delete.
44 FR_LDAP_SYNC_CODE_COOKIE_LOAD = FR_PACKET_TYPE_VALUE_COOKIE_LOAD,
45 //!< Before the sync starts, request any previously stored cookie.
46 FR_LDAP_SYNC_CODE_COOKIE_LOAD_RESPONSE = FR_PACKET_TYPE_VALUE_COOKIE_LOAD_RESPONSE,
47 //!< Response with the returned cookie.
48 FR_LDAP_SYNC_CODE_COOKIE_LOAD_FAIL = FR_PACKET_TYPE_VALUE_COOKIE_LOAD_FAIL,
49 //!< Response when coolie load fails
50 FR_LDAP_SYNC_CODE_COOKIE_STORE = FR_PACKET_TYPE_VALUE_COOKIE_STORE,
51 //!< The server has sent a new cookie.
52 FR_LDAP_SYNC_CODE_COOKIE_STORE_RESPONSE = FR_PACKET_TYPE_VALUE_COOKIE_STORE_RESPONSE,
53 //!< Response to storing the new cookie.
54 FR_LDAP_SYNC_CODE_MAX = FR_PACKET_TYPE_VALUE_COOKIE_STORE_RESPONSE + 1,
55 FR_LDAP_SYNC_CODE_DO_NOT_RESPOND = 256 //!< Special rcode to indicate we will not respond.
57
58#define FR_LDAP_SYNC_PACKET_CODE_VALID(_code) (((_code) > 0) && ((_code) < FR_LDAP_SYNC_CODE_MAX))
fr_ldap_sync_packet_code_t
Types of the internal packets for processing LDAP sync messages.
Definition sync.h:31
@ FR_LDAP_SYNC_CODE_PRESENT
LDAP server indicates a particular object is present and unchanged.
Definition sync.h:33
@ FR_LDAP_SYNC_CODE_COOKIE_STORE_RESPONSE
Response to storing the new cookie.
Definition sync.h:52
@ FR_LDAP_SYNC_CODE_ENTRY_RESPONSE
Response packet to present / add / modify / delete.
Definition sync.h:42
@ FR_LDAP_SYNC_CODE_COOKIE_LOAD_FAIL
Response when coolie load fails.
Definition sync.h:48
@ FR_LDAP_SYNC_CODE_ADD
Object has been added to the LDAP directory.
Definition sync.h:36
@ FR_LDAP_SYNC_CODE_UNDEFINED
Packet code has not been set.
Definition sync.h:32
@ FR_LDAP_SYNC_CODE_COOKIE_STORE
The server has sent a new cookie.
Definition sync.h:50
@ FR_LDAP_SYNC_CODE_COOKIE_LOAD_RESPONSE
Response with the returned cookie.
Definition sync.h:46
@ FR_LDAP_SYNC_CODE_DELETE
Object has been deleted.
Definition sync.h:40
@ FR_LDAP_SYNC_CODE_DO_NOT_RESPOND
Special rcode to indicate we will not respond.
Definition sync.h:55
@ FR_LDAP_SYNC_CODE_COOKIE_LOAD
Before the sync starts, request any previously stored cookie.
Definition sync.h:44
@ FR_LDAP_SYNC_CODE_MAX
Definition sync.h:54
@ FR_LDAP_SYNC_CODE_MODIFY
Object has been modified.
Definition sync.h:38