Lines Matching full:query

202 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
250 /* Prepare the response into the query buffer: move the name in create_answer()
251 * query buffer has to get enough free space: dns_hdr + answer in create_answer()
253 if ((net_buf_max_len(query) - query->len) < (DNS_MSG_HEADER_SIZE + in create_answer()
260 memmove(query->data + DNS_MSG_HEADER_SIZE, query->data, query->len); in create_answer()
262 setup_dns_hdr(query->data, 1); in create_answer()
264 add_answer(query, qtype, MDNS_TTL, addr_len, addr); in create_answer()
266 query->len += DNS_MSG_HEADER_SIZE + in create_answer()
277 struct net_buf *query, in send_response() argument
311 ret = create_answer(sock, query, qtype, sizeof(struct in_addr), (uint8_t *)addr); in send_response()
328 ret = create_answer(sock, query, qtype, sizeof(struct in6_addr), (uint8_t *)addr); in send_response()
337 ret = zsock_sendto(sock, query->data, query->len, 0, in send_response()
366 /* Depending on segment count in the query, third buffer could hold in send_sd_response()
436 NET_DBG("unable to extract query (%d)", ret); in send_sd_response()
446 * A DNS query for PTR records with the name in send_sd_response()
472 NET_DBG("matched query: %s.%s.%s.%s port: %u", in send_sd_response()
528 /* Store the DNS query name into a temporary net_buf, which will be in dns_read()
548 queries > 1 ? "queries" : "query", in dns_read()
573 NET_DBG("[%d] query %s/%s label %s (%d bytes)", queries, in dns_read()
577 /* If the query matches to our hostname, then send reply. in dns_read()
584 NET_DBG("%s query to our hostname %s.local", "mDNS", in dns_read()