Lines Matching refs:addr
14 const char * hostapd_ip_txt(const struct hostapd_ip_addr *addr, char *buf, in hostapd_ip_txt() argument
17 if (buflen == 0 || addr == NULL) in hostapd_ip_txt()
20 if (addr->af == AF_INET) { in hostapd_ip_txt()
21 os_strlcpy(buf, inet_ntoa(addr->u.v4), buflen); in hostapd_ip_txt()
26 if (addr->af == AF_INET6) { in hostapd_ip_txt()
27 if (inet_ntop(AF_INET6, &addr->u.v6, buf, buflen) == NULL) in hostapd_ip_txt()
36 int hostapd_parse_ip_addr(const char *txt, struct hostapd_ip_addr *addr) in hostapd_parse_ip_addr() argument
39 if (inet_aton(txt, &addr->u.v4)) { in hostapd_parse_ip_addr()
40 addr->af = AF_INET; in hostapd_parse_ip_addr()
45 if (inet_pton(AF_INET6, txt, &addr->u.v6) > 0) { in hostapd_parse_ip_addr()
46 addr->af = AF_INET6; in hostapd_parse_ip_addr()