Handle failing rs_context_create().
[libradsec.git] / hostport.h
1 /*
2  * Copyright (C) 2006-2009 Stig Venaas <venaas@uninett.no>
3  *
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.
7  */
8
9 #include "hostport_types.h"
10
11 struct hostportres *newhostport(char *hostport, char *default_port, uint8_t prefixok);
12 int addhostport(struct list **hostports, char **hostport, char *portdefault, uint8_t prefixok);
13 void freehostport(struct hostportres *hp);
14 void freehostports(struct list *hostports);
15 int resolvehostport(struct hostportres *hp, int socktype, uint8_t passive);
16 int resolvehostports(struct list *hostports, int socktype);
17 struct addrinfo *resolvepassiveaddrinfo(char *hostport, char *default_port, int socktype);
18 int addressmatches(struct list *hostports, struct sockaddr *addr, uint8_t checkport);
19 int connecttcphostlist(struct list *hostports,  struct addrinfo *src);
20
21 /* Local Variables: */
22 /* c-file-style: "stroustrup" */
23 /* End: */