chiark / gitweb /
asshelp.c: add a lot of debug logging
[gnupg2.git] / dirmngr / ldap-url.h
1 /* Copyright 2007 g10 Code GmbH
2
3  This file is free software; as a special exception the author gives
4  unlimited permission to copy and/or distribute it, with or without
5  modifications, as long as this notice is preserved.
6
7  This file is distributed in the hope that it will be useful, but
8  WITHOUT ANY WARRANTY, to the extent permitted by law; without even
9  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10  PURPOSE.  */
11
12 #ifndef LDAP_URL_H
13 #define LDAP_URL_H 1
14
15 #define LDAP_CONST const
16
17 typedef struct ldap_url_desc
18 {
19   struct ldap_url_desc *lud_next;
20   char *lud_scheme;
21   char *lud_host;
22   int lud_port;
23   char *lud_dn;
24   char **lud_attrs;
25   int lud_scope;
26   char *lud_filter;
27   char **lud_exts;
28   int lud_crit_exts;
29 } LDAPURLDesc;
30
31 #define LDAP_URL_SUCCESS        0x00
32 #define LDAP_URL_ERR_MEM        0x01
33 #define LDAP_URL_ERR_PARAM      0x02
34
35 #define LDAP_URL_ERR_BADSCHEME  0x03
36 #define LDAP_URL_ERR_BADENCLOSURE 0x04
37 #define LDAP_URL_ERR_BADURL     0x05
38 #define LDAP_URL_ERR_BADHOST    0x06
39 #define LDAP_URL_ERR_BADATTRS   0x07
40 #define LDAP_URL_ERR_BADSCOPE   0x08
41 #define LDAP_URL_ERR_BADFILTER  0x09
42 #define LDAP_URL_ERR_BADEXTS    0x0a
43
44 #define LDAPS_PORT 636
45
46 int ldap_is_ldap_url (LDAP_CONST char *url);
47 int ldap_url_parse (LDAP_CONST char *url_in, LDAPURLDesc **ludpp);
48 void ldap_free_urldesc (LDAPURLDesc *ludp);
49
50 #endif /* !LDAP_URL_H */