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