5 Copyright (c) 1995 Regents of the University of Michigan.
8 Redistribution and use in source and binary forms are permitted
9 provided that this notice is preserved and that due credit is given
10 to the University of Michigan at Ann Arbor. The name of the University
11 may not be used to endorse or promote products derived from this
12 software without specific prior written permission. This software
13 is provided ``as is'' without express or implied warranty.
19 #include <ldap_cdefs.h>
23 #define MAXLINELEN 512
25 #define STR_OP_SEARCH "SEARCH"
30 #define IP_TYPE_SUFFIX 0x01
31 #define IP_TYPE_BASE 0x02
32 #define IP_TYPE_SCOPE 0x03
33 #define IP_TYPE_ALIASDEREF 0x04
34 #define IP_TYPE_SIZELIMIT 0x05
35 #define IP_TYPE_TIMELIMIT 0x06
36 #define IP_TYPE_FILTER 0x07
37 #define IP_TYPE_ATTRSONLY 0x08
38 #define IP_TYPE_ATTRS 0x09
56 #define LDOP_SEARCH 0x01
59 union ldapop_params_u {
60 struct ldsrchparms LDsrchparams;
62 #define ldop_srch ldop_params.LDsrchparams
74 struct ldattr **lde_attrs;
79 void debug_printf(const char *, ...) LDAP_GCCATTR((format(printf, 1, 2)));
80 #else /* LDAP_DEBUG */
81 #define debug_printf (void) /* Ignore "arguments" */
82 #endif /* LDAP_DEBUG */
87 void write_result( FILE *fp, int code, char *matched, char *info );
88 void write_entry( struct ldop *op, struct ldentry *entry, FILE *ofp );
89 int test_filter( struct ldop *op, struct ldentry *entry );
90 void free_entry( struct ldentry *entry );
91 int attr_requested( char *name, struct ldop *op );
92 int parse_input( FILE *ifp, FILE *ofp, struct ldop *op );
93 struct inputparams *find_input_tag( char **linep );
94 void add_strval( char ***sp, char *val );
95 char *ecalloc( unsigned nelem, unsigned elsize );
96 void *erealloc( void *s, unsigned size );
97 char *estrdup( char *s );
98 extern void dump_ldop (struct ldop *op);
105 extern char *progname;