Lines Matching refs:inet_ntop_cache
13 if (srv->inet_ntop_cache[i].ts != 0 && srv->inet_ntop_cache[i].family == addr->plain.sa_family) { in inet_ntop_cache_get_ip()
14 if (srv->inet_ntop_cache[i].family == AF_INET6 && in inet_ntop_cache_get_ip()
15 0 == memcmp(srv->inet_ntop_cache[i].addr.ipv6.s6_addr, addr->ipv6.sin6_addr.s6_addr, 16)) { in inet_ntop_cache_get_ip()
18 } else if (srv->inet_ntop_cache[i].family == AF_INET && in inet_ntop_cache_get_ip()
19 srv->inet_ntop_cache[i].addr.ipv4.s_addr == addr->ipv4.sin_addr.s_addr) { in inet_ntop_cache_get_ip()
35 srv->inet_ntop_cache[i].b2, INET6_ADDRSTRLEN); in inet_ntop_cache_get_ip()
37 srv->inet_ntop_cache[i].ts = srv->cur_ts; in inet_ntop_cache_get_ip()
38 srv->inet_ntop_cache[i].family = addr->plain.sa_family; in inet_ntop_cache_get_ip()
40 if (srv->inet_ntop_cache[i].family == AF_INET) { in inet_ntop_cache_get_ip()
41 srv->inet_ntop_cache[i].addr.ipv4.s_addr = addr->ipv4.sin_addr.s_addr; in inet_ntop_cache_get_ip()
42 } else if (srv->inet_ntop_cache[i].family == AF_INET6) { in inet_ntop_cache_get_ip()
43 memcpy(srv->inet_ntop_cache[i].addr.ipv6.s6_addr, addr->ipv6.sin6_addr.s6_addr, 16); in inet_ntop_cache_get_ip()
47 return srv->inet_ntop_cache[i].b2; in inet_ntop_cache_get_ip()