The session_dns function resolves the IP address of the client associated with a specified session into its DNS name. It 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 is who it claims to be; the session_dns function does not perform this verification.
This function works only if the DNS directive is enabled in the magnus.conf file. For more information, seeChapter 2, SAFs in the magnus.conf File
char *session_dns(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 as the one passed to your SAF.