#ifndef _NISDB_LDAP_H
#define _NISDB_LDAP_H
#include <sys/time.h>
#include <thread.h>
#include <synch.h>
#include <pthread.h>
#include <rpcsvc/nis.h>
#include "ldap_parse.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
ini_none,
from_ldap,
from_ldap_update_only,
to_ldap,
to_ldap_update_only
} __nis_initial_update_t;
typedef enum {
use_cached,
ret_retry,
try_again,
ret_unavail,
no_such_name,
fail
} __nis_retrieve_error_t;
typedef enum {
sto_retry,
system_error,
sto_unavail,
sto_fail
} __nis_store_error_t;
typedef enum {
std_delete_entry,
abandon
} __nis_store_error_disp_t;
typedef enum {
continue_using,
ref_retry,
continue_using_retry,
cache_expired,
tryagain
} __nis_refresh_error_t;
typedef enum {
pass_error,
cre_retry
} __nis_thread_creation_error_t;
typedef enum {
de_retry,
rollback,
rollback_retry
} __nis_dump_error_t;
typedef enum {
from_copy,
directory_locked,
from_live
} __nis_resync_service_t;
typedef enum {
accumulate,
bounded_accumulate,
upd_none
} __nis_update_batching_t;
typedef enum {
block,
ewm_tryagain
} __nis_exclusive_wait_mode_t;
typedef enum {
no_match_only,
mat_always,
mat_never
} __nis_match_fetch_t;
typedef struct {
int attempts;
time_t timeout;
} __nisdb_retry_t;
typedef struct {
time_t initTtlLo;
time_t initTtlHi;
time_t ttl;
time_t *expire;
time_t enumExpire;
bool_t fromLDAP;
bool_t toLDAP;
bool_t isMaster;
__nis_retrieve_error_t retrieveError;
__nisdb_retry_t retrieveErrorRetry;
__nis_store_error_t storeError;
__nisdb_retry_t storeErrorRetry;
__nis_store_error_disp_t
storeErrorDisp;
__nis_refresh_error_t refreshError;
__nisdb_retry_t refreshErrorRetry;
__nis_match_fetch_t matchFetch;
__nis_table_mapping_t *tm;
zotypes objType;
zotypes expireType;
char *objName;
bool_t isDeferredTable;
mutex_t enumLock;
pthread_t enumTid;
int enumStat;
int enumDeferred;
uint_t enumEntries;
ulong_t enumTime;
} __nisdb_table_mapping_t;
typedef struct {
__nis_initial_update_t initialUpdate;
__nis_thread_creation_error_t threadCreationError;
__nisdb_retry_t threadCreationErrorTimeout;
__nis_dump_error_t dumpError;
__nisdb_retry_t dumpErrorTimeout;
__nis_resync_service_t resyncService;
__nis_update_batching_t updateBatching;
__nisdb_retry_t updateBatchingTimeout;
__nis_exclusive_wait_mode_t exclusiveWaitMode;
int numberOfServiceThreads;
int emulate_yp;
int maxRPCRecordSize;
} __nis_config_t;
extern __nisdb_table_mapping_t ldapDBTableMapping;
extern __nis_config_t ldapConfig;
#ifdef __cplusplus
}
#endif
#endif