r25068: Older samba3 DCs will return DCERPC_FAULT_OP_RNG_ERROR for every opcode on the
[Samba.git] / source / lib / ldb / tools / cmdline.h
blob0855f77575cae9dd0f7026b0767f254af7fc2bf5
1 /*
2 ldb database library - command line handling for ldb tools
4 Copyright (C) Andrew Tridgell 2005
6 ** NOTE! The following LGPL license applies to the ldb
7 ** library. This does NOT imply that all of Samba is released
8 ** under the LGPL
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2 of the License, or (at your option) any later version.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include <popt.h>
27 struct ldb_cmdline {
28 const char *url;
29 enum ldb_scope scope;
30 const char *basedn;
31 int interactive;
32 int sorted;
33 const char *editor;
34 int verbose;
35 int recursive;
36 int all_records;
37 int nosync;
38 const char **options;
39 int argc;
40 const char **argv;
41 int num_records;
42 int num_searches;
43 const char *sasl_mechanism;
44 const char *input;
45 const char *output;
46 char **controls;
49 struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const char **argv,
50 void (*usage)(void));
53 struct ldb_control **parse_controls(void *mem_ctx, char **control_strings);
54 int handle_controls_reply(struct ldb_control **reply, struct ldb_control **request);