diff options
Diffstat (limited to 'include/sockets.h')
| -rw-r--r-- | include/sockets.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sockets.h b/include/sockets.h index 772a08a65..6caeea19c 100644 --- a/include/sockets.h +++ b/include/sockets.h @@ -60,8 +60,19 @@ union CoreExport sockaddrs /* The same as above but not */ inline bool operator!=(const sockaddrs &other) const { return !(*this == other); } + /** The equivalent of inet_pton + * @param type AF_INET or AF_INET6 + * @param address The address to place in the sockaddr structures + * @param pport An option port to include in the sockaddr structures + * @throws A socket exception if given invalid IPs + */ void pton(int type, const Anope::string &address, int pport = 0); + /** The equivalent of inet_ntop + * @param type AF_INET or AF_INET6 + * @param address The in_addr or in_addr6 structure + * @throws A socket exception if given an invalid structure + */ void ntop(int type, const void *src); }; |
