Return free memory more aggressively.
[radsecproxy.git] / hostport.h
1 /* Copyright (c) 2009, UNINETT AS
2  * Copyright (c) 2012, NORDUnet A/S */
3 /* See LICENSE for licensing information. */
4
5 struct hostportres {
6     char *host;
7     char *port;
8     uint8_t prefixlen;
9     struct addrinfo *addrinfo;
10 };
11
12 struct hostportres *newhostport(char *hostport, char *default_port, uint8_t prefixok);
13 int addhostport(struct list **hostports, char **hostport, char *portdefault, uint8_t prefixok);
14 void freehostport(struct hostportres *hp);
15 void freehostports(struct list *hostports);
16 int resolvehostport(struct hostportres *hp, int af, int socktype, uint8_t passive);
17 int resolvehostports(struct list *hostports, int af, int socktype);
18 struct addrinfo *resolvepassiveaddrinfo(char *hostport, int af, char *default_port, int socktype);
19 int addressmatches(struct list *hostports, struct sockaddr *addr, uint8_t checkport);
20 int connecttcphostlist(struct list *hostports,  struct addrinfo *src);
21
22 /* Local Variables: */
23 /* c-file-style: "stroustrup" */
24 /* End: */