Lines Matching defs:addr
20 const char * hostapd_ip_txt(const struct hostapd_ip_addr *addr, char *buf,
23 if (buflen == 0 || addr == NULL)
26 if (addr->af == AF_INET) {
27 os_strlcpy(buf, inet_ntoa(addr->u.v4), buflen);
32 if (addr->af == AF_INET6) {
33 if (inet_ntop(AF_INET6, &addr->u.v6, buf, buflen) == NULL)
66 int hostapd_parse_ip_addr(const char *txt, struct hostapd_ip_addr *addr)
69 if (inet_aton(txt, &addr->u.v4)) {
70 addr->af = AF_INET;
75 if (inet_pton(AF_INET6, txt, &addr->u.v6) > 0) {
76 addr->af = AF_INET6;