1 /* shell.h - shell backend header file */
4 * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
5 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
15 #if defined(HAVE_RECVMSG) && !defined(NO_THREADS)
16 # define SHELL_SURROGATE_PARENT
19 #ifdef SHELL_SURROGATE_PARENT
21 extern ldap_pvt_thread_mutex_t shell_surrogate_index_mutex;
22 extern ldap_pvt_thread_mutex_t shell_surrogate_fd_mutex[2];
23 extern int shell_surrogate_fd[2];
24 extern pid_t shell_surrogate_pid;
26 typedef struct berval Cmd_info;
27 #define MAKE_CMD_INFO(args) make_cmd_info( args )
28 #define IS_NULLCMD(cmd) ((cmd).bv_val == NULL)
30 extern void make_surrogate_parent LDAP_P(( void ));
32 #else /* !SHELL_SURROGATE_PARENT */
34 typedef char **Cmd_info;
35 #define MAKE_CMD_INFO(args) ldap_charray_dup( args )
36 #define IS_NULLCMD(cmd) ((cmd) == NULL)
38 #endif /* SHELL_SURROGATE_PARENT */
41 Cmd_info si_bind; /* cmd + args to exec for bind */
42 Cmd_info si_unbind; /* cmd + args to exec for unbind */
43 Cmd_info si_search; /* cmd + args to exec for search */
44 Cmd_info si_compare; /* cmd + args to exec for compare */
45 Cmd_info si_modify; /* cmd + args to exec for modify */
46 Cmd_info si_modrdn; /* cmd + args to exec for modrdn */
47 Cmd_info si_add; /* cmd + args to exec for add */
48 Cmd_info si_delete; /* cmd + args to exec for delete */
49 Cmd_info si_abandon; /* cmd + args to exec for abandon */
52 struct slap_backend_db;
56 extern pid_t forkandexec LDAP_P((
61 extern void print_suffixes LDAP_P((
63 struct slap_backend_db *bd));
65 extern int read_and_send_results LDAP_P((
66 struct slap_backend_db *bd,
67 struct slap_conn *conn,