diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/socket.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/socket.h b/include/socket.h index 593550018..d3a45475d 100644 --- a/include/socket.h +++ b/include/socket.h @@ -115,6 +115,12 @@ namespace irc * @return true if the conversion was successful, false if unknown address family */ CoreExport bool satoap(const irc::sockets::sockaddrs* sa, std::string& addr, int &port); + /** Convert a binary sockaddr to a user-readable string. + * This means IPv6 addresses are written as [::1]:6667, and *:6668 is used for 0.0.0.0:6668 + * @param sa The structure to convert + * @return The string; "<unknown>" if not a valid address + */ + CoreExport std::string satouser(const irc::sockets::sockaddrs* sa); } } |