From openldap-technical Mon Apr 29 15:58:41 2024 From: Howard Chu Date: Mon, 29 Apr 2024 15:58:41 +0000 To: openldap-technical Subject: Re: Need information related to multi thread support in OpenLDAP c sdk client Message-Id: X-MARC-Message: https://marc.info/?l=openldap-technical&m=171440616032543 c.venugopal521@gmail.com wrote: > Hi Team, > > We are working on migration of nsldap C sdk to OpenLDAP c sdk for our application client code. As part of this activity, replacing API one by one and also looking for constant replacement. > > In NSLDAP C SDK: > /* > * Thread function callbacks (an API extension -- > * LDAP_API_FEATURE_X_THREAD_FUNCTIONS). > */ > #define LDAP_OPT_THREAD_FN_PTRS 0x05 /* 5 - API extension */ > nsldap c sdk has thread function pointers option to support multi thread functionality for client programs. In our existing code, we are using 'LDAP_OPT_THREAD_FN_PTRS' option with ldap_set_option API like "Client code usage: ldap_set_option(hLDAP, LDAP_OPT_THREAD_FN_PTRS, &tfns);". > > Now, we are looking for similar functionality with in OpenLDAP to use it in our client program. Gone through OpenLDAP document and source code, but with my knowledge, did not get any equivalent one. > > Could you please provide more details on this to achieve equivalent functionality of LDAP_OPT_THREAD_FN_PTRS with OpenLDAP? No such feature exists; OpenLDAP libldap uses the underlying platform's native thread API. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/