2 * Copyright (C) 2006-2009 Stig Venaas <venaas@uninett.no>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
13 struct addrinfo *addrinfo;
16 struct hostportres *newhostport(char *hostport, char *default_port, uint8_t prefixok);
17 int addhostport(struct list **hostports, char **hostport, char *portdefault, uint8_t prefixok);
18 void freehostport(struct hostportres *hp);
19 void freehostports(struct list *hostports);
20 int resolvehostport(struct hostportres *hp, int socktype, uint8_t passive);
21 int resolvehostports(struct list *hostports, int socktype);
22 struct addrinfo *resolvepassiveaddrinfo(char *hostport, char *default_port, int socktype);
23 int addressmatches(struct list *hostports, struct sockaddr *addr, uint8_t checkport);
24 int connecttcphostlist(struct list *hostports, struct addrinfo *src);