The session_maxdns function resolves the IP address of the client associated with a specified session into its DNS name. This function returns a newly allocated string. You can use session_maxdns to change the numeric IP address into something more readable.
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.
char *session_maxdns(Session *sn);
A string containing the host name, or NULL if the DNS name cannot be found for the IP address.
Session *sn is the Session.
The Session is the same parameter as the one passed to your SAF.