# num APR_HAS_LDAP_SSL
# num APR_HAS_LDAP_URL_PARSE
+# opaque_t LDAP
+
# num APR_HAS_LDAPSSL_CLIENT_INIT
# num APR_HAS_LDAPSSL_CLIENT_DEINIT
# num APR_HAS_LDAPSSL_ADD_TRUSTED_CERT
# field rc , CInt
# stoptype
--- FIXME What's the type it takes?
--- # cinline APR_LDAP_IS_SERVER_DOWN, <unknown> -> IO CInt
+# cinline APR_LDAP_IS_SERVER_DOWN, CInt -> IO CInt
#endif
\ No newline at end of file
--- /dev/null
+#include <bindings.dsl.h>
+#include <apr_ldap_init.h>
+
+module Bindings.APR.LDAP.Init where
+#strict_import
+import Bindings.APR.LDAP
+import Bindings.APR.Pools
+
+#if APR_HAS_LDAP
+
+# num APU_LDAP_INSUFFICIENT_ACCESS
+# cinline APU_LDAP_SECURITY_ERROR, CInt -> IO CInt
+
+# ccall apr_ldap_ssl_init , Ptr <apr_pool_t> -> Ptr CChar -> CInt -> Ptr (Ptr <apr_ldap_err_t>) -> IO CInt
+# ccall apr_ldap_ssl_deinit, IO CInt
+# ccall apr_ldap_init , Ptr <apr_pool_t> -> Ptr (Ptr <LDAP>) -> Ptr CChar -> CInt -> CInt -> Ptr (Ptr <apr_ldap_err_t>) -> IO CInt
+# ccall apr_ldap_info , Ptr <apr_pool_t> -> Ptr (Ptr <apr_ldap_err_t>) -> IO CInt
+
+#endif
--- /dev/null
+#include <bindings.dsl.h>
+#include <apr_ldap_option.h>
+
+module Bindings.APR.LDAP.Option where
+#strict_import
+import Bindings.APR.LDAP
+import Bindings.APR.Pools
+
+#if APR_HAS_LDAP
+
+# num APR_LDAP_OPT_TLS
+# num APR_LDAP_OPT_TLS_CERT
+# num APR_LDAP_OPT_VERIFY_CERT
+# num APR_LDAP_OPT_REFERRALS
+# num APR_LDAP_OPT_REFHOPLIMIT
+
+# num APR_LDAP_CA_TYPE_UNKNOWN
+# num APR_LDAP_CA_TYPE_DER
+# num APR_LDAP_CA_TYPE_BASE64
+# num APR_LDAP_CA_TYPE_SECMOD
+# num APR_LDAP_CERT_TYPE_UNKNOWN
+# num APR_LDAP_CERT_TYPE_DER
+# num APR_LDAP_CERT_TYPE_BASE64
+# num APR_LDAP_CERT_TYPE_KEY3_DB
+# num APR_LDAP_CERT_TYPE_NICKNAME
+# num APR_LDAP_KEY_TYPE_UNKNOWN
+# num APR_LDAP_KEY_TYPE_DER
+# num APR_LDAP_KEY_TYPE_BASE64
+# num APR_LDAP_CERT_TYPE_PFX
+# num APR_LDAP_KEY_TYPE_PFX
+# num APR_LDAP_CA_TYPE_CACERTDIR_BASE64
+
+# starttype struct apr_ldap_opt_tls_cert_t
+# field type , CInt
+# field path , Ptr CChar
+# field password, Ptr CChar
+# stoptype
+
+# num APR_LDAP_NONE
+# num APR_LDAP_SSL
+# num APR_LDAP_STARTTLS
+# num APR_LDAP_STOPTLS
+
+# ccall apr_ldap_get_option, Ptr <apr_pool_t> -> Ptr <LDAP> -> CInt -> Ptr () -> Ptr (Ptr <apr_ldap_err_t>) -> IO CInt
+# ccall apr_ldap_set_option, Ptr <apr_pool_t> -> Ptr <LDAP> -> CInt -> Ptr () -> Ptr (Ptr <apr_ldap_err_t>) -> IO CInt
+
+#endif
\ No newline at end of file