1 USING: alien alien.c-types io kernel ldap ldap.libldap
2 namespaces prettyprint tools.test ;
5 "void*" <c-object> "ldap://localhost:389" initialize
7 get-ldp LDAP_OPT_PROTOCOL_VERSION LDAP_VERSION3 <int> set-option
10 get-ldp LDAP_OPT_PROTOCOL_VERSION "int*" <c-object> [ get-option ] keep
15 get-ldp "cn=jimbob,dc=example,dc=com" "secret" [
17 ! get-ldp "dc=example,dc=com" LDAP_SCOPE_ONELEVEL "(objectclass=*)" f 0
18 ! "void*" <c-object> [ search-s ] keep *int .
21 get-ldp "dc=example,dc=com" LDAP_SCOPE_SUBTREE "(objectclass=*)" f 0
25 ! get-ldp LDAP_RES_ANY 0 f "void*" <c-object> result .
27 get-ldp LDAP_RES_ANY LDAP_MSG_ALL f "void*" <c-object> result
35 get-ldp get-message get-dn .
37 "Entries count: " write
39 get-ldp get-message count-entries .
46 get-ldp get-message first-entry entry set get-ldp entry get
47 "void*" <c-object> first-attribute dup . attr set
51 get-ldp entry get attr get get-values *char* .
53 get-ldp get-message first-message msgtype result-type
55 get-ldp get-message next-message msgtype result-type