-extern void destroy_queue(packet_queue_t *);
-extern char *hostlookup(unsigned long);
-extern ip_mask_t *strtoip(char*);
+extern bool hostnames;
+
+extern struct addrinfo *str2addrinfo(const char *address, const char *service, int socktype) __attribute__((__malloc__));
+extern sockaddr_t str2sockaddr(const char *address, const char *port);
+extern void sockaddr2str(const sockaddr_t *sa, char **address, char **port);
+extern char *sockaddr2hostname(const sockaddr_t *sa) __attribute__((__malloc__));
+extern int sockaddrcmp(const sockaddr_t *a, const sockaddr_t *b);
+extern int sockaddrcmp_noport(const sockaddr_t *a, const sockaddr_t *b);
+extern void sockaddrunmap(sockaddr_t *sa);
+extern void sockaddrfree(sockaddr_t *sa);
+extern void sockaddrcpy(sockaddr_t *dest, const sockaddr_t *src);
+extern void sockaddr_setport(sockaddr_t *sa, const char *port);