Sun Java System Web Server 7.0 Update 3 NSAPI Developer's Guide

session_dns() Function

The session_dns function resolves the IP address of the client associated with a specified session into its DNS name. The function returns a newly allocated string. You can use session_dns to change the numeric IP address into something more readable.

The session_maxdns function verifies that the client matches its claimed identity. The session_dns function does not perform this verification.


Note –

This function works only if the DNS directive is enabled in the magnus.conf file. For more information, see Appendix B, Alphabetical List of NSAPI Functions and Macros.


Syntax

char *session_dns(Session *sn);

Return Values

A string containing the host name, or NULL if the DNS name cannot be found for the IP address.

Parameters

Session *sn is the session.

The Session is the same parameter as the one passed to your SAF.