Lines Matching refs:entries
18 cache->entries[i].in_use = false; in dns_cache_flush()
50 if (!cache->entries[i].in_use) { in dns_cache_add()
54 } else if (sys_timepoint_cmp(closest_to_expiry, cache->entries[i].expiry) > 0) { in dns_cache_add()
56 closest_to_expiry = cache->entries[i].expiry; in dns_cache_add()
61 NET_DBG("Overwrite \"%s\"", cache->entries[index_to_replace].query); in dns_cache_add()
64 strncpy(cache->entries[index_to_replace].query, query, in dns_cache_add()
66 cache->entries[index_to_replace].data = *addrinfo; in dns_cache_add()
67 cache->entries[index_to_replace].expiry = sys_timepoint_calc(K_SECONDS(ttl)); in dns_cache_add()
68 cache->entries[index_to_replace].in_use = true; in dns_cache_add()
90 if (cache->entries[i].in_use && strcmp(cache->entries[i].query, query) == 0) { in dns_cache_remove()
91 cache->entries[i].in_use = false; in dns_cache_remove()
121 if (!cache->entries[i].in_use) { in dns_cache_find()
124 if (strcmp(cache->entries[i].query, query) != 0) { in dns_cache_find()
131 addrinfo[found] = cache->entries[i].data; in dns_cache_find()
153 if (!cache->entries[i].in_use) { in dns_cache_clean()
157 if (sys_timepoint_expired(cache->entries[i].expiry)) { in dns_cache_clean()
158 NET_DBG("Remove \"%s\"", cache->entries[i].query); in dns_cache_clean()
159 cache->entries[i].in_use = false; in dns_cache_clean()