slapi_get_source_ip()
This slapi routine returns the IP address
that is sent in the audit control.
- Syntax
#include <slapi-plugin.h> int slapi_get_source_ip( Slapi_PBlock *pb, char ** sourceIP );- Input Parameters
-
- pb
- A pointer to a parameter block.
- sourceIP
- The IP address of the connection source.
- Returns
- If the return code is
LDAP_SUCCESSandsourceIPis set, then this source IP is used for connection. - Usage
- A
slapiAPI that returns the IP address that is sent in the audit control.Note: The user must free the returnedsourceIPafter its use. In addition, it must be checked that theclientIPis from a trusted proxy web administration or application. - Errors
- This API returns the following error codes:
LDAP_PARAM_ERROR- If thepbparameter is nullLDAP_OPERATIONS_ERROR- If the API encounters error that processes the requestLDAP_NO_MEMORY- Failed to allocate required memory.
- See also
- slapi_get_client_ip().