[Date Prev][Date Next] [Chronological] [Thread] [Top]

need client ip-address in shell-backend



Hi all,

I hope that somebody can help me because I have very less experiences in
C-programming. I need the shell-backend of openldap and looking for an
easy way to get the IP-address of the client, which started a
communication to the ldap-server on port 389.

Part of the C-source from /openldap/slapd/back-shell/add.c

==============================================================
...

/* write out the request to the add process */

fprintf (wfp, "ADD\n" );
fprintf (wfp, "msgid: %ld\n", (long) op->o_msgid );

/ * and here is my stuff */
fprintf (wfp, "ipaddr: %s\n", inet_ntoa( conn-> ??????) ); 

    /* need here the IP-address of the client */
    /* which connected the ldap-server on standard-port */

print_suffixes (wfp,be );
ldap_pvt_thread_mutex_lock( &entry2str_mutex );

....
==============================================================

I need it in "modify" and "search" too. It would be very nice, if
somebody has a hint. Thank you very much.

Adi