diff options
Diffstat (limited to 'src/host.c')
-rw-r--r-- | src/host.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -10,6 +10,15 @@ #include <sys/socket.h> #include <netdb.h> +/** + * \brief convert addrinfo to simple IP address + * + * \param address addrinfo struct containing the IP + * \param ip string for the resulting IP + * \param length length of ip + * \return 0 on failure, 1 on success + */ + static inline int addr_to_ip(const struct addrinfo *address, char *ip, int length) { void *ptr; switch (address->ai_family) { |