1189251Ssam/* 2189251Ssam * IP address processing 3189251Ssam * Copyright (c) 2003-2006, Jouni Malinen <j@w1.fi> 4189251Ssam * 5252726Srpaulo * This software may be distributed under the terms of the BSD license. 6252726Srpaulo * See README for more details. 7189251Ssam */ 8189251Ssam 9189251Ssam#ifndef IP_ADDR_H 10189251Ssam#define IP_ADDR_H 11189251Ssam 12189251Ssamstruct hostapd_ip_addr { 13214734Srpaulo int af; /* AF_INET / AF_INET6 */ 14189251Ssam union { 15189251Ssam struct in_addr v4; 16189251Ssam#ifdef CONFIG_IPV6 17189251Ssam struct in6_addr v6; 18189251Ssam#endif /* CONFIG_IPV6 */ 19214734Srpaulo u8 max_len[16]; 20189251Ssam } u; 21189251Ssam}; 22189251Ssam 23189251Ssamconst char * hostapd_ip_txt(const struct hostapd_ip_addr *addr, char *buf, 24189251Ssam size_t buflen); 25189251Ssamint hostapd_ip_diff(struct hostapd_ip_addr *a, struct hostapd_ip_addr *b); 26189251Ssamint hostapd_parse_ip_addr(const char *txt, struct hostapd_ip_addr *addr); 27189251Ssam 28189251Ssam#endif /* IP_ADDR_H */ 29