From f2d6619255e9644f4f134dfe98a24342d35e618b Mon Sep 17 00:00:00 2001 From: venaas Date: Wed, 18 Feb 2009 15:37:01 +0000 Subject: updated files for 1.3-beta release git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.3@480 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- hostport.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 hostport.h (limited to 'hostport.h') diff --git a/hostport.h b/hostport.h new file mode 100644 index 0000000..d28f8ee --- /dev/null +++ b/hostport.h @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2006-2009 Stig Venaas + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + */ + +struct hostportres { + char *host; + char *port; + uint8_t prefixlen; + struct addrinfo *addrinfo; +}; + +struct hostportres *newhostport(char *hostport, char *default_port, uint8_t prefixok); +int addhostport(struct list **hostports, char **hostport, char *portdefault, uint8_t prefixok); +void freehostport(struct hostportres *hp); +void freehostports(struct list *hostports); +int resolvehostport(struct hostportres *hp, int socktype, uint8_t passive); +int resolvehostports(struct list *hostports, int socktype); +struct addrinfo *resolvepassiveaddrinfo(char *hostport, char *default_port, int socktype); +int addressmatches(struct list *hostports, struct sockaddr *addr); +int connecttcphostlist(struct list *hostports, struct addrinfo *src); -- cgit v1.1