Lines Matching full:query

25 int dns_cache_add(struct dns_cache *cache, char const *query, struct dns_addrinfo const *addrinfo,  in dns_cache_add()  argument
32 if (cache == NULL || query == NULL || addrinfo == NULL || ttl == 0) { in dns_cache_add()
36 if (strlen(query) >= CONFIG_DNS_RESOLVER_MAX_QUERY_LEN) { in dns_cache_add()
37 NET_WARN("Query string to big to be processed %u >= " in dns_cache_add()
39 strlen(query)); in dns_cache_add()
45 NET_DBG("Add \"%s\" with TTL %" PRIu32, query, ttl); 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()
75 int dns_cache_remove(struct dns_cache *cache, char const *query) in dns_cache_remove() argument
77 NET_DBG("Remove all entries with query \"%s\"", query); in dns_cache_remove()
78 if (strlen(query) >= CONFIG_DNS_RESOLVER_MAX_QUERY_LEN) { in dns_cache_remove()
79 NET_WARN("Query string to big to be processed %u >= " in dns_cache_remove()
81 strlen(query)); in dns_cache_remove()
90 if (cache->entries[i].in_use && strcmp(cache->entries[i].query, query) == 0) { in dns_cache_remove()
100 int dns_cache_find(struct dns_cache const *cache, const char *query, struct dns_addrinfo *addrinfo, in dns_cache_find() argument
105 NET_DBG("Find \"%s\"", query); in dns_cache_find()
106 if (cache == NULL || query == NULL || addrinfo == NULL || addrinfo_array_len <= 0) { in dns_cache_find()
109 if (strlen(query) >= CONFIG_DNS_RESOLVER_MAX_QUERY_LEN) { in dns_cache_find()
110 NET_WARN("Query string to big to be processed %u >= " in dns_cache_find()
112 strlen(query)); in dns_cache_find()
124 if (strcmp(cache->entries[i].query, query) != 0) { in dns_cache_find()
128 NET_WARN("Found \"%s\" but not enough space in provided buffer.", query); in dns_cache_find()
133 NET_DBG("Found \"%s\"", query); in dns_cache_find()
144 NET_DBG("Could not find \"%s\"", query); in dns_cache_find()
158 NET_DBG("Remove \"%s\"", cache->entries[i].query); in dns_cache_clean()