14.02.2014 Views

ldapv3.pdf 7947KB Apr 17 2013 11:30:42 AM - mirror omadata

ldapv3.pdf 7947KB Apr 17 2013 11:30:42 AM - mirror omadata

ldapv3.pdf 7947KB Apr 17 2013 11:30:42 AM - mirror omadata

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

printf("Objects Found: %d\n",<br />

ldap_count_entries(ld, r));<br />

Simple C LDAP Query<br />

for(e = ldap_first_entry(ld, r);<br />

e != NULL;<br />

e = ldap_next_entry(ld, e)) {<br />

printf("DN: %s\n", ldap_get_dn(ld, e));<br />

...<br />

}<br />

Walk The Objects<br />

Display the number of objects<br />

resulting from the operation<br />

referred to by the struct located<br />

at r<br />

Point e at the first object<br />

Loop until e doesn't refer to an object<br />

Point e at the object following e<br />

Display the dn of the object<br />

located at e<br />

The code to walk the attributes of the object at e (found<br />

on the next slide) goes here.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!