1 /* $OpenBSD: util.h,v 1.3 2021/12/13 18:28:40 deraadt 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 24 __BEGIN_DECLS 25 26 int addrport_parse(const char *, int, struct addrinfo **); 27 const char *addrport_tostring (struct sockaddr *, socklen_t, char *, size_t); 28 29 __END_DECLS 30 #endif 31