Home
last modified time | relevance | path

Searched full:query (Results 1 – 25 of 245) sorted by relevance

12345678910

/Zephyr-latest/subsys/net/lib/dns/
Ddns_cache.c25 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()
[all …]
Ddns_cache.h22 char query[CONFIG_DNS_RESOLVER_MAX_QUERY_LEN]; member
63 * @param query Query which should be persisted in the cache.
64 * @param addrinfo Addrinfo resulting from the query which will be returned
71 int dns_cache_add(struct dns_cache *cache, char const *query, struct dns_addrinfo const *addrinfo,
75 * @brief Removes all entries with the given query
78 * @param query Query which should be searched for.
82 int dns_cache_remove(struct dns_cache *cache, char const *query);
85 * @brief Tries to find the specified query entry within the cache.
88 * @param query Query which should be searched for.
89 * @param addrinfo dns_addrinfo array which will be written if the query was found.
[all …]
Dllmnr_responder.c194 static void add_question(struct net_buf *query, enum dns_rr_type qtype) in add_question() argument
196 char *dot = query->data + DNS_MSG_HEADER_SIZE; in add_question()
214 offset = DNS_MSG_HEADER_SIZE + query->len + 1; in add_question()
215 UNALIGNED_PUT(htons(qtype), (uint16_t *)(query->data+offset)); in add_question()
218 UNALIGNED_PUT(htons(DNS_CLASS_IN), (uint16_t *)(query->data+offset)); in add_question()
221 static int add_answer(struct net_buf *query, uint32_t ttl, in add_answer() argument
224 const uint16_t q_len = query->len + 1 + DNS_QTYPE_LEN + DNS_QCLASS_LEN; in add_answer()
227 memcpy(query->data + offset, query->data + DNS_MSG_HEADER_SIZE, q_len); in add_answer()
230 UNALIGNED_PUT(htonl(ttl), query->data + offset); in add_answer()
233 UNALIGNED_PUT(htons(addr_len), query->data + offset); in add_answer()
[all …]
Dmdns_responder.c202 static void add_answer(struct net_buf *query, enum dns_rr_type qtype, in add_answer() argument
205 char *dot = query->data + DNS_MSG_HEADER_SIZE; in add_answer()
224 query->len += 1; in add_answer()
226 offset = DNS_MSG_HEADER_SIZE + query->len; in add_answer()
227 UNALIGNED_PUT(htons(qtype), (uint16_t *)(query->data+offset)); in add_answer()
232 (uint16_t *)(query->data+offset)); in add_answer()
236 UNALIGNED_PUT(htonl(ttl), query->data + offset); in add_answer()
239 UNALIGNED_PUT(htons(addr_len), query->data + offset); in add_answer()
242 memcpy(query->data + offset, addr, addr_len); in add_answer()
246 struct net_buf *query, in create_answer() argument
[all …]
Ddns_sd.h43 * @brief Extract labels from a DNS-SD PTR query
56 * @param query a pointer to the start of the query
57 * @param query_size the number of bytes contained in the query
63 * @return on success, number of bytes read from @p query
68 int dns_sd_query_extract(const uint8_t *query, size_t query_size, struct dns_sd_rec *record,
119 * @brief Handle a DNS PTR Query with DNS Service Discovery
122 * matches a particular DNS PTR query.
Dresolve.c4 * An API for applications to do DNS query.
234 /* Query again if we got CNAME */ in dispatcher_cb()
258 NET_DBG("DNS cname query failed %d times", failure); in dispatcher_cb()
542 /* There was query to this server already */ in dns_resolve_init_locked()
632 * @param pending_query the query slot in question
634 * @param reclaim_if_available if the slot is marked in use, but the query has
638 * @return true if and only if the slot can be used for a new query.
648 && pending_query->query == NULL in check_query_active()
672 /* Invoke the callback associated with a query slot, if still relevant.
676 * @param status the query status value
[all …]
Ddns_pack.h141 * | QR | 15 | 1 | 0 := Query, 1 := Response |
144 /** Query count */
355 * @param src_id Transaction id, it must match the id used in the query
370 * @brief Packs the query message
372 * @param buf Buffer that will contain the resultant query
373 * @param len Number of bytes used to encode the query
379 * @param qtype Query type: AA, AAAA. See enum dns_rr_type
389 * @brief Unpacks the response's query.
391 * @details RFC 1035 states that the response's query comes after the first
425 * @brief Unpacks the mDNS query. This is special version for multicast DNS
[all …]
/Zephyr-latest/tests/net/lib/dns_cache/src/
Dmain.c26 const char *query = "example.com"; in ZTEST() local
28 zassert_ok(dns_cache_add(&test_dns_cache, query, &info_write, TEST_DNS_CACHE_DEFAULT_TTL), in ZTEST()
30 zassert_equal(1, dns_cache_find(&test_dns_cache, query, &info_read, 1)); in ZTEST()
37 const char *query = "example.com"; in ZTEST() local
39 zassert_equal(0, dns_cache_find(&test_dns_cache, query, &info_read, 1)); in ZTEST()
47 const char *query = "example.com"; in ZTEST() local
50 zassert_ok(dns_cache_add(&test_dns_cache, query, &info_write, in ZTEST()
55 dns_cache_find(&test_dns_cache, query, info_read, TEST_DNS_CACHE_SIZE)); in ZTEST()
63 const char *query = "example.com"; in ZTEST() local
66 zassert_ok(dns_cache_add(&test_dns_cache, query, &info_write, in ZTEST()
[all …]
/Zephyr-latest/tests/kernel/obj_core/obj_core_stats/src/
Dmain.c81 * kernel sampling. The same goes for the query stats. in ZTEST()
261 "Thread query stats changed while blocked\n"); in ZTEST()
434 struct sys_memory_stats query; in test_mem_block_query() local
437 status = k_obj_core_stats_query(K_OBJ_CORE(&mem_block), &query, in test_mem_block_query()
438 sizeof(query)); in test_mem_block_query()
440 "%s: Failed to get query stats (%d)\n", str, status); in test_mem_block_query()
442 zassert_equal(query.free_bytes, expected->free_bytes, in test_mem_block_query()
444 str, expected->free_bytes, query.free_bytes); in test_mem_block_query()
446 zassert_equal(query.allocated_bytes, expected->allocated_bytes, in test_mem_block_query()
448 str, expected->allocated_bytes, query.allocated_bytes); in test_mem_block_query()
[all …]
/Zephyr-latest/samples/net/dns_resolve/src/
Dmain.c45 LOG_INF("DNS query was canceled"); in dns_result_cb()
94 LOG_INF("mDNS query was canceled"); in mdns_result_cb()
139 static const char *query = "www.zephyrproject.org"; in do_ipv4_lookup() local
143 ret = dns_get_addr_info(query, in do_ipv4_lookup()
147 (void *)query, in do_ipv4_lookup()
249 LOG_INF("Getting IPv4 address via DHCP before issuing DNS query"); in setup_dhcpv4()
266 static const char *query = "zephyr.local"; in do_mdns_ipv4_lookup() local
269 LOG_DBG("Doing mDNS IPv4 query"); in do_mdns_ipv4_lookup()
271 ret = dns_get_addr_info(query, in do_mdns_ipv4_lookup()
275 (void *)query, in do_mdns_ipv4_lookup()
[all …]
/Zephyr-latest/include/zephyr/net/
Ddns_resolve.h35 * DNS query type enum
38 /** IPv4 query */
40 /** IPv6 query */
310 * @param status The status of the query:
314 * DNS_EAI_CANCELED if the query was canceled manually or timeout happened
318 * @param info Query results are stored here.
404 * This is set to a non-null value when the query is started,
407 * If the query completed at a point where the work item was
409 * query is complete, but release of the query slot will be
413 const char *query; member
[all …]
Dsntp.h72 * @brief Perform SNTP query
84 * @brief Attempt to receive an SNTP response after issuing a query
103 * @brief Convenience function to query SNTP in one-shot fashion
109 * @param timeout Query timeout
119 * @brief Convenience function to query SNTP in one-shot fashion
127 * @param timeout Query timeout
/Zephyr-latest/samples/net/mdns_responder/
DREADME.rst19 - avahi or similar mDNS capable application that is able to query mDNS
43 If the query is successful, then following information is printed:
49 For a IPv6 query, type this:
55 If the query is successful, then following information is printed:
67 If the query is successful, then the following information is printed:
/Zephyr-latest/tests/net/lib/dns_packet/src/
Dmain.c26 * Type: standard query (IPv4)
39 * Type: standard query (IPv6)
75 /* This is a query */ in eval_query()
81 /* This is a query (standard query) */ in eval_query()
87 /* Authoritative Answer must be 0 for a Query */ in eval_query()
240 /* For the DNS response, this value is standard query */ in eval_response1()
423 zassert_equal(rc, 0, "Query test failed for domain: "DNAME1); in ZTEST()
427 zassert_not_equal(rc, 0, "Query test with invalid domain name failed"); in ZTEST()
431 zassert_not_equal(rc, 0, "Query test for IPv4 with RR type AAAA failed"); in ZTEST()
435 zassert_not_equal(rc, 0, "Query test with invalid ID failed"); in ZTEST()
[all …]
/Zephyr-latest/doc/_extensions/zephyr/domain/static/js/
Dcodesample-livesearch.js22 function highlightMatches(node, query) { argument
25 const index = text.toLowerCase().indexOf(query);
26 if (index !== -1 && query.length > 0) {
31 highlight.textContent = text.substring(index, index + query.length);
32 const after = document.createTextNode(text.substring(index + query.length));
41 node.childNodes.forEach((child) => highlightMatches(child, query));
/Zephyr-latest/samples/net/sockets/http_client/
DKconfig9 int "Send a sample HTTP query this many times"
12 Send a sample HTTP query this many times before exiting. A value of
/Zephyr-latest/include/zephyr/debug/
Dcoredump.h38 /** Query ID */
50 * - -ENOTSUP if this query is not supported.
58 * - -ENOTSUP if this query is not supported.
64 * Max value for query ID.
243 /* Perform query on backend */
244 coredump_backend_query_t query; member
331 * @brief Perform query on coredump subsystem.
333 * Query the coredump subsystem for information, for example, if there is
336 * @param[in] query_id Query ID
338 * @return Depends on the query
/Zephyr-latest/doc/_static/js/
Dscorer.js33 // query matches the full name of an object
44 // query found in title
46 // query found in terms
/Zephyr-latest/subsys/net/lib/coap/
Dcoap_link_format.c135 const struct coap_option *query) in match_attributes() argument
140 * query, for example: 'rt=lux temperature', if I want to list in match_attributes()
146 if (query->len != attr_len) { in match_attributes()
150 if (!strncmp((char *) query->value, *attr, attr_len)) { in match_attributes()
159 const struct coap_option *query, in match_queries_resource() argument
178 if (query->len > href_len + 1 && in match_queries_resource()
179 !strncmp((char *) query->value, "href", href_len)) { in match_queries_resource()
181 const char *uri = (char *) query->value + href_len + 1; in match_queries_resource()
182 uint16_t uri_len = query->len - (href_len + 1); in match_queries_resource()
187 return match_attributes(attributes, query); in match_queries_resource()
[all …]
/Zephyr-latest/samples/net/sockets/coap_server/src/
Dquery.c47 LOG_INF("Unexpected length of query: " in query_get()
56 LOG_INF("query[%d]: %s", i + 1, str); in query_get()
97 static const char * const query_path[] = { "query", NULL };
98 COAP_RESOURCE_DEFINE(query, coap_server,
/Zephyr-latest/scripts/west_commands/zspdx/
Dsbom.py36 # create Cmake file-based API directories and query file
40 # check that query dir exists as a directory, or else create it
41 cmakeApiDirPath = os.path.join(build_dir, ".cmake", "api", "v1", "query")
44 log.err(f'cmake api query directory {cmakeApiDirPath} exists and is not a directory')
55 log.err(f'cmake api query file {queryFilePath} exists and is not a directory')
/Zephyr-latest/tests/net/lib/dns_resolve/src/
Dmain.c153 DBG("Skipping this query dns id %u\n", current_dns_id); in sender_iface()
157 /* We need to cancel the query manually so that we in sender_iface()
330 zassert_equal(ret, -EINVAL, "Wrong return code for query"); in ZTEST()
453 zassert_equal(ret, 0, "Cannot create IPv4 query"); in ZTEST()
483 zassert_equal(ret, 0, "Cannot create IPv4 query"); in ZTEST()
505 zassert_equal(ret, 0, "Cannot create IPv6 query"); in ZTEST()
547 zassert_equal(ret, 0, "Cannot create IPv4 query"); in ZTEST()
550 zassert_equal(ret, 0, "Cannot cancel IPv4 query"); in ZTEST()
573 zassert_equal(ret, 0, "Cannot create IPv6 query"); in ZTEST()
576 zassert_equal(ret, 0, "Cannot cancel IPv6 query"); in ZTEST()
[all …]
/Zephyr-latest/tests/kernel/obj_core/obj_core_stats_api/src/
Dmain.c128 struct k_thread_runtime_stats query; in ZTEST() local
134 * Attempt to query stats for an object core that is not enabled in ZTEST()
138 status = k_obj_core_stats_query(K_OBJ_CORE(&test_sem), &query, in ZTEST()
143 saved_query = K_OBJ_CORE(test_thread)->type->stats_desc->query; in ZTEST()
144 K_OBJ_CORE(test_thread)->type->stats_desc->query = NULL; in ZTEST()
146 &query, sizeof(query)); in ZTEST()
149 K_OBJ_CORE(test_thread)->type->stats_desc->query = saved_query; in ZTEST()
152 * Note: Testing the stats query function pointer is done in in ZTEST()
213 * Note: Further testing the stats query function pointer is done in in ZTEST()
/Zephyr-latest/subsys/net/lib/shell/
Ddns.c120 if (!ctx->queries[i].cb || !ctx->queries[i].query) { in print_dns_info()
130 ctx->queries[i].query, in print_dns_info()
135 ctx->queries[i].query, in print_dns_info()
209 PR_WARNING("Unknown query type, specify either " in cmd_net_dns_query()
220 PR("Query for '%s' sent.\n", host); in cmd_net_dns_query()
238 /* So this is a query then */ in cmd_net_dns()
262 SHELL_CMD(query, NULL,
270 "Show how DNS is configured. Optionally do a query using a given name.",
/Zephyr-latest/include/zephyr/arch/posix/
Dposix_trace.h28 * Where the <output> should be set to 0 to query about posix_print_trace output
30 * and 1 to query about the warning and error output (posix_print_error/warning)

12345678910