Functions for Sending Entries and Results to the ClientChapter 15 Function Reference 493DescriptionCall slapi_send_ldap_result() to send an LDAP result code (such asLDAP_SUCCESS) back to the client.The following arguments are intended for use only in certain situations:• matchedWhen sending an LDAP_NO_SUCH_OBJECT result code back to a client, usematched to specify how much of the target DN could be found in the database.For example, if the client was attempting to find the DNcn=Babs Jensen, ou=Product Division, l=US, dc=example,dc=comand the database contains entries for c=US and l=US,dc=example,dc=com butno entry for ou=Product Division,l=US,dc=example,dc=com, you shouldset the matched parameter tol=US, dc=example,dc=com• urlsWhen sending an LDAP_PARTIAL_RESULTS result code back to an LDAPv2client or an LDAP_REFERRAL result code back to an LDAPv3 client, use urls tospecify the referral URLs.For LDAPv3 referrals, you can call the slapi_str2filter() to send referralsto LDAPv3 clients and collect them for LDAPv2 clients. You can pass the arrayof collected referrals to the urls argument of slapi_send_ldap_results().For example:matched When sending back an LDAP_NO_SUCH_OBJECT result code, usethis argument to specify the portion of the target DN that could bematched. Pass NULL in other situations.text Error message that you want sent back to the client. Pass NULL if youdo not want an error message sent back.nentries When sending back the result code for an LDAP search operation,use this argument to specify the number of matching entries found.urls When sending back an LDAP_PARTIAL_RESULTS result code to anLDAPv2 client or an LDAP_REFERRAL result code to an LDAPv3client, use this argument to specify the array of berval structurescontaining the referral URLs. Pass NULL in other situations.