select() loop and LDAP
Erik Alapää
alapaa at operax.com
Mon May 30 11:40:43 UTC 2005
Hello! I am modifying the ISC DHCP relay code, adding functionality
for sniffing the DHCP packets and sending some info (IP addresses,
Circuit ID:s etc.) to an LDAP server (I am using openldap) . I plan to
use asynchronous LDAP commands and use the sparsely documented
ldap_get_option(ld, LDAP_OPT_DESC, &fd) to obtain a descriptor for the
LDAP socket that can be used in a select() loop.
My question: Can someone give me advice on how to modify the select()
handling in the ISC relay code to be able to check when the LDAP
server sends me stuff? One thing that confuses me is the fact that
there are several select() invocations both in omapip/dispatch.c and
in /work.linux-2.2/omapip/dispatch.c - is the work.linux-2.2 code
specialized Linux code generated from generic code in the "normal"
omapip/ directory?
A second question: Can someone give me a link to a website with
example code for using select() and openldap?
Best regards,
--
Erik Alapää
Software Engineer M. Sc., Lic. Ind. Math.
Aurorum Science Park 8
SE 997 75 Luleå
Sweden
+46 70 535 17 14 (mobile)
+46 920 75510 (fax)
http://www.operax.com
More information about the dhcp-hackers
mailing list