Home
last modified time | relevance | path

Searched refs:dns_msg (Results 1 – 9 of 9) sorted by relevance

/Zephyr-latest/subsys/net/lib/dns/
Ddns_pack.c69 static inline void set_dns_msg_response(struct dns_msg_t *dns_msg, int type, in set_dns_msg_response() argument
72 dns_msg->response_type = type; in set_dns_msg_response()
73 dns_msg->response_position = pos; in set_dns_msg_response()
74 dns_msg->response_length = len; in set_dns_msg_response()
109 int dns_unpack_answer(struct dns_msg_t *dns_msg, int dname_ptr, uint32_t *ttl, in dns_unpack_answer() argument
118 answer = dns_msg->msg + dns_msg->answer_offset; in dns_unpack_answer()
121 dns_msg->msg_size - dns_msg->answer_offset); in dns_unpack_answer()
137 rem_size = dns_msg->msg_size - dns_msg->answer_offset - dname_len; in dns_unpack_answer()
154 pos = dns_msg->answer_offset + dname_len + in dns_unpack_answer()
164 set_dns_msg_response(dns_msg, DNS_RESPONSE_IP, pos, len); in dns_unpack_answer()
[all …]
Dresolve.c739 struct dns_msg_t *dns_msg, in dns_validate_msg() argument
757 if (dns_msg->msg_size < (sizeof(*dns_id) + sizeof(uint16_t))) { in dns_validate_msg()
768 *dns_id = dns_unpack_header_id(dns_msg->msg); in dns_validate_msg()
770 if (dns_header_rcode(dns_msg->msg) == DNS_HEADER_REFUSED) { in dns_validate_msg()
778 if (dns_header_qr(dns_msg->msg) == DNS_QUERY) { in dns_validate_msg()
783 ret = dns_unpack_response_header(dns_msg, *dns_id); in dns_validate_msg()
789 if (dns_header_qdcount(dns_msg->msg) != 1) { in dns_validate_msg()
797 ret = dns_unpack_response_query(dns_msg); in dns_validate_msg()
813 dns_msg->answer_offset = dns_msg->query_offset; in dns_validate_msg()
827 while (server_idx < dns_header_ancount(dns_msg->msg)) { in dns_validate_msg()
[all …]
Ddns_internal.h15 struct dns_msg_t *dns_msg,
Ddispatcher.c41 struct dns_msg_t dns_msg; in dns_dispatch() local
48 dns_msg.msg = dns_data->data; in dns_dispatch()
49 dns_msg.msg_size = data_len; in dns_dispatch()
52 if (dns_msg.msg_size < (sizeof(uint16_t) + sizeof(uint16_t))) { in dns_dispatch()
57 if (dns_header_rcode(dns_msg.msg) == DNS_HEADER_REFUSED) { in dns_dispatch()
62 is_query = (dns_header_qr(dns_msg.msg) == DNS_QUERY); in dns_dispatch()
Ddns_pack.h348 int dns_unpack_answer(struct dns_msg_t *dns_msg, int dname_ptr, uint32_t *ttl,
402 int dns_unpack_response_query(struct dns_msg_t *dns_msg);
422 struct dns_msg_t *dns_msg, uint16_t pos);
462 int dns_unpack_query(struct dns_msg_t *dns_msg, struct net_buf *buf,
Dmdns_responder.c352 struct dns_msg_t *dns_msg, in send_sd_response() argument
433 ret = dns_sd_query_extract(dns_msg->msg, in send_sd_response()
434 dns_msg->msg_size, &filter, label, size, &n); in send_sd_response()
521 struct dns_msg_t dns_msg; in dns_read() local
537 dns_msg.msg = dns_data->data; in dns_read()
538 dns_msg.msg_size = data_len; in dns_read()
540 ret = mdns_unpack_query_header(&dns_msg, NULL); in dns_read()
562 ret = dns_unpack_query(&dns_msg, result, &qtype, &qclass); in dns_read()
591 &dns_msg, result); in dns_read()
Dllmnr_responder.c435 struct dns_msg_t dns_msg; in dns_read() local
454 dns_msg.msg = dns_data->data; in dns_read()
455 dns_msg.msg_size = data_len; in dns_read()
457 ret = llmnr_unpack_query_header(&dns_msg, &dns_id); in dns_read()
482 ret = dns_unpack_query(&dns_msg, result, &qtype, &qclass); in dns_read()
/Zephyr-latest/tests/net/lib/dns_packet/src/
Dmain.c1103 struct dns_msg_t dns_msg = { 0 }; in run_dns_malformed_response() local
1109 dns_msg.msg = buf; in run_dns_malformed_response()
1110 dns_msg.msg_size = len; in run_dns_malformed_response()
1112 dns_id = dns_unpack_header_id(dns_msg.msg); in run_dns_malformed_response()
1122 ret = dns_validate_msg(&dns_ctx, &dns_msg, &dns_id, &query_idx, in run_dns_malformed_response()
1132 struct dns_msg_t dns_msg = { 0 }; in run_dns_valid_response() local
1138 dns_msg.msg = buf; in run_dns_valid_response()
1139 dns_msg.msg_size = len; in run_dns_valid_response()
1141 ret = dns_validate_msg(&dns_ctx, &dns_msg, &dns_id, &query_idx, in run_dns_valid_response()
1172 struct dns_msg_t dns_msg = { 0 }; in run_dns_valid_cname_response() local
[all …]
/Zephyr-latest/tests/net/socket/getaddrinfo/src/
Dmain.c53 struct dns_msg_t dns_msg; in check_dns_query() local
70 dns_msg.msg = buf; in check_dns_query()
71 dns_msg.msg_size = buf_len; in check_dns_query()
73 ret = mdns_unpack_query_header(&dns_msg, NULL); in check_dns_query()
87 ret = dns_unpack_query(&dns_msg, result, &qtype, &qclass); in check_dns_query()