00001 /*00002 * IP address processing00003 * Copyright (c) 2003-2006, Jouni Malinen <j@w1.fi>00004 *00005 * This program is free software; you can redistribute it and/or modify00006 * it under the terms of the GNU General Public License version 2 as00007 * published by the Free Software Foundation.00008 *00009 * Alternatively, this software may be distributed under the terms of BSD00010 * license.00011 *00012 * See README and COPYING for more details.00013 */00014
00015 #ifndef IP_ADDR_H00016 #define IP_ADDR_H00017
00018struct hostapd_ip_addr {
00019intaf; /* AF_INET / AF_INET6 */00020 union {
00021struct in_addr v4;
00022 #ifdef CONFIG_IPV600023 struct in6_addr v6;
00024 #endif /* CONFIG_IPV6 */00025u8max_len[16];
00026 } u;
00027 };
00028
00029 constchar * hostapd_ip_txt(conststructhostapd_ip_addr *addr, char *buf,
00030 size_t buflen);
00031 inthostapd_ip_diff(structhostapd_ip_addr *a, structhostapd_ip_addr *b);
00032 inthostapd_parse_ip_addr(constchar *txt, structhostapd_ip_addr *addr);
00033
00034 #endif /* IP_ADDR_H */