• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * IP address processing
3  * Copyright (c) 2003-2006, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef IP_ADDR_H
10 #define IP_ADDR_H
11 
12 #include "netinet/in.h"
13 #include "common.h"
14 
15 struct hostapd_ip_addr {
16 	int af; /* AF_INET / AF_INET6 */
17 	union {
18 		struct in_addr v4;
19 #ifdef CONFIG_IPV6
20 		struct in6_addr v6;
21 #endif /* CONFIG_IPV6 */
22 		u8 max_len[16];
23 	} u;
24 };
25 
26 const char * hostapd_ip_txt(const struct hostapd_ip_addr *addr, char *buf,
27 			    size_t buflen);
28 int hostapd_parse_ip_addr(const char *txt, struct hostapd_ip_addr *addr);
29 
30 #endif /* IP_ADDR_H */
31