xref: /openbsd-src/usr.sbin/radiusd/util.h (revision 0b7734b3d77bb9b21afec6f4621cae6c805dbd45)
1 /*	$OpenBSD: util.h,v 1.2 2015/08/27 01:02:35 yasuoka Exp $	*/
2 
3 #ifndef RADIUSD_UTIL_H
4 #define	RADIUSD_UTIL_H
5 /*
6  * Copyright (c) 2013 Internet Initiative Japan Inc.
7  *
8  * Permission to use, copy, modify, and distribute this software for any
9  * purpose with or without fee is hereby granted, provided that the above
10  * copyright notice and this permission notice appear in all copies.
11  *
12  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19  */
20 
21 #include <sys/socket.h>	/* for struct sockaddr */
22 #include <netdb.h>	/* for struct addrinfo */
23 #include <sys/cdefs.h>
24 
25 __BEGIN_DECLS
26 
27 int		 addrport_parse(const char *, int, struct addrinfo **);
28 const char	*addrport_tostring (struct sockaddr *, socklen_t, char *, size_t);
29 
30 __END_DECLS
31 #endif
32