Home
last modified time | relevance | path

Searched refs:dnsrec (Results 1 - 19 of 19) sorted by relevance

/third_party/node/deps/cares/src/lib/
H A Dares_qcache.c38 ares_dns_record_t *dnsrec; member
43 static char *ares__qcache_calc_key(const ares_dns_record_t *dnsrec) in ares__qcache_calc_key() argument
50 if (dnsrec == NULL || buf == NULL) { in ares__qcache_calc_key()
57 buf, ares_dns_opcode_tostr(ares_dns_record_get_opcode(dnsrec))); in ares__qcache_calc_key()
67 flags = ares_dns_record_get_flags(dnsrec); in ares__qcache_calc_key()
82 for (i = 0; i < ares_dns_record_query_cnt(dnsrec); i++) { in ares__qcache_calc_key()
87 status = ares_dns_record_query_get(dnsrec, i, &name, &qtype, &qclass); in ares__qcache_calc_key()
192 ares_dns_record_destroy(entry->dnsrec); in ares__qcache_entry_destroy_cb()
235 static unsigned int ares__qcache_calc_minttl(ares_dns_record_t *dnsrec) in ares__qcache_calc_minttl() argument
242 for (i = 0; i < ares_dns_record_rr_cnt(dnsrec, (ares_dns_section_ in ares__qcache_calc_minttl()
261 ares__qcache_soa_minimum(ares_dns_record_t *dnsrec) ares__qcache_soa_minimum() argument
294 ares_dns_record_t *dnsrec = NULL; ares__qcache_calc_key_frombuf() local
310 ares__qcache_insert(ares__qcache_t *qcache, ares_dns_record_t *dnsrec, const unsigned char *qbuf, size_t qlen, const struct timeval *now) ares__qcache_insert() argument
387 ares__qcache_fetch(ares__qcache_t *qcache, const ares_dns_record_t *dnsrec, const struct timeval *now, unsigned char **buf, size_t *buf_len) ares__qcache_fetch() argument
424 ares_qcache_insert(ares_channel_t *channel, const struct timeval *now, const struct query *query, ares_dns_record_t *dnsrec) ares_qcache_insert() argument
439 ares_dns_record_t *dnsrec = NULL; ares_qcache_fetch() local
[all...]
H A Dares_dns_record.c35 ares_status_t ares_dns_record_create(ares_dns_record_t **dnsrec, in ares_dns_record_create() argument
40 if (dnsrec == NULL) { in ares_dns_record_create()
44 *dnsrec = NULL; in ares_dns_record_create()
51 *dnsrec = ares_malloc_zero(sizeof(**dnsrec)); in ares_dns_record_create()
52 if (*dnsrec == NULL) { in ares_dns_record_create()
56 (*dnsrec)->id = id; in ares_dns_record_create()
57 (*dnsrec)->flags = flags; in ares_dns_record_create()
58 (*dnsrec)->opcode = opcode; in ares_dns_record_create()
59 (*dnsrec) in ares_dns_record_create()
63 ares_dns_record_get_id(const ares_dns_record_t *dnsrec) ares_dns_record_get_id() argument
71 ares_dns_record_get_flags(const ares_dns_record_t *dnsrec) ares_dns_record_get_flags() argument
79 ares_dns_record_get_opcode(const ares_dns_record_t *dnsrec) ares_dns_record_get_opcode() argument
87 ares_dns_record_get_rcode(const ares_dns_record_t *dnsrec) ares_dns_record_get_rcode() argument
195 ares_dns_record_destroy(ares_dns_record_t *dnsrec) ares_dns_record_destroy() argument
230 ares_dns_record_query_cnt(const ares_dns_record_t *dnsrec) ares_dns_record_query_cnt() argument
238 ares_dns_record_query_add(ares_dns_record_t *dnsrec, const char *name, ares_dns_rec_type_t qtype, ares_dns_class_t qclass) ares_dns_record_query_add() argument
279 ares_dns_record_query_get(const ares_dns_record_t *dnsrec, size_t idx, const char **name, ares_dns_rec_type_t *qtype, ares_dns_class_t *qclass) ares_dns_record_query_get() argument
303 ares_dns_record_rr_cnt(const ares_dns_record_t *dnsrec, ares_dns_section_t sect) ares_dns_record_rr_cnt() argument
322 ares_dns_record_rr_prealloc(ares_dns_record_t *dnsrec, ares_dns_section_t sect, size_t cnt) ares_dns_record_rr_prealloc() argument
367 ares_dns_record_rr_add(ares_dns_rr_t **rr_out, ares_dns_record_t *dnsrec, ares_dns_section_t sect, const char *name, ares_dns_rec_type_t type, ares_dns_class_t rclass, unsigned int ttl) ares_dns_record_rr_add() argument
428 ares_dns_record_rr_del(ares_dns_record_t *dnsrec, ares_dns_section_t sect, size_t idx) ares_dns_record_rr_del() argument
470 ares_dns_record_rr_get(ares_dns_record_t *dnsrec, ares_dns_section_t sect, size_t idx) ares_dns_record_rr_get() argument
503 ares_dns_record_rr_get_const(const ares_dns_record_t *dnsrec, ares_dns_section_t sect, size_t idx) ares_dns_record_rr_get_const() argument
[all...]
H A Dares_dns_write.c35 static ares_status_t ares_dns_write_header(const ares_dns_record_t *dnsrec, in ares_dns_write_header() argument
45 status = ares__buf_append_be16(buf, dnsrec->id); in ares_dns_write_header()
54 if (dnsrec->flags & ARES_FLAG_QR) { in ares_dns_write_header()
59 opcode = (unsigned short)(dnsrec->opcode & 0xF); in ares_dns_write_header()
64 if (dnsrec->flags & ARES_FLAG_AA) { in ares_dns_write_header()
69 if (dnsrec->flags & ARES_FLAG_TC) { in ares_dns_write_header()
74 if (dnsrec->flags & ARES_FLAG_RD) { in ares_dns_write_header()
79 if (dnsrec->flags & ARES_FLAG_RA) { in ares_dns_write_header()
86 if (dnsrec->flags & ARES_FLAG_AD) { in ares_dns_write_header()
91 if (dnsrec in ares_dns_write_header()
136 ares_dns_write_questions(const ares_dns_record_t *dnsrec, ares__llist_t **namelist, ares__buf_t *buf) ares_dns_write_questions() argument
834 ares_dns_write_rr(ares_dns_record_t *dnsrec, ares__llist_t **namelist, ares_dns_section_t section, ares__buf_t *buf) ares_dns_write_rr() argument
991 ares_dns_write(ares_dns_record_t *dnsrec, unsigned char **buf, size_t *buf_len) ares_dns_write() argument
1047 ares_dns_record_write_ttl_decrement(ares_dns_record_t *dnsrec, unsigned int ttl_decrement) ares_dns_record_write_ttl_decrement() argument
[all...]
H A Dares_dns_parse.c722 ares_dns_record_t **dnsrec, in ares_dns_parse_header()
737 if (buf == NULL || dnsrec == NULL || qdcount == NULL || ancount == NULL || in ares_dns_parse_header()
742 *dnsrec = NULL; in ares_dns_parse_header()
843 status = ares_dns_record_create(dnsrec, id, dns_flags, opcode, in ares_dns_parse_header()
849 (*dnsrec)->raw_rcode = rcode; in ares_dns_parse_header()
853 ares_dns_record_rr_prealloc(*dnsrec, ARES_SECTION_ANSWER, *ancount); in ares_dns_parse_header()
861 ares_dns_record_rr_prealloc(*dnsrec, ARES_SECTION_AUTHORITY, *nscount); in ares_dns_parse_header()
869 ares_dns_record_rr_prealloc(*dnsrec, ARES_SECTION_ADDITIONAL, *arcount); in ares_dns_parse_header()
878 ares_dns_record_destroy(*dnsrec); in ares_dns_parse_header()
879 *dnsrec in ares_dns_parse_header()
721 ares_dns_parse_header(ares__buf_t *buf, unsigned int flags, ares_dns_record_t **dnsrec, unsigned short *qdcount, unsigned short *ancount, unsigned short *nscount, unsigned short *arcount) ares_dns_parse_header() argument
936 ares_dns_parse_qd(ares__buf_t *buf, ares_dns_record_t *dnsrec) ares_dns_parse_qd() argument
991 ares_dns_parse_rr(ares__buf_t *buf, unsigned int flags, ares_dns_section_t sect, ares_dns_record_t *dnsrec) ares_dns_parse_rr() argument
1133 ares_dns_parse_buf(ares__buf_t *buf, unsigned int flags, ares_dns_record_t **dnsrec) ares_dns_parse_buf() argument
1236 ares_dns_parse(const unsigned char *buf, size_t buf_len, unsigned int flags, ares_dns_record_t **dnsrec) ares_dns_parse() argument
[all...]
H A Dares_parse_mx_reply.c40 ares_dns_record_t *dnsrec = NULL; in ares_parse_mx_reply() local
51 status = ares_dns_parse(abuf, alen, 0, &dnsrec); in ares_parse_mx_reply()
56 if (ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER) == 0) { in ares_parse_mx_reply()
61 for (i = 0; i < ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); i++) { in ares_parse_mx_reply()
63 ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); in ares_parse_mx_reply()
110 ares_dns_record_destroy(dnsrec); in ares_parse_mx_reply()
H A Dares_create_query.c36 ares_dns_record_t *dnsrec = NULL; in ares_create_query() local
53 status = ares_dns_record_create(&dnsrec, id, rd ? ARES_FLAG_RD : 0, in ares_create_query()
59 status = ares_dns_record_query_add(dnsrec, name, (ares_dns_rec_type_t)type, in ares_create_query()
69 status = ares_dns_record_rr_add(&rr, dnsrec, ARES_SECTION_ADDITIONAL, "", in ares_create_query()
97 status = ares_dns_write(dnsrec, bufp, &len); in ares_create_query()
105 ares_dns_record_destroy(dnsrec); in ares_create_query()
H A Dares_parse_caa_reply.c40 ares_dns_record_t *dnsrec = NULL; in ares_parse_caa_reply() local
51 status = ares_dns_parse(abuf, alen, 0, &dnsrec); in ares_parse_caa_reply()
56 if (ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER) == 0) { in ares_parse_caa_reply()
61 for (i = 0; i < ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); i++) { in ares_parse_caa_reply()
65 ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); in ares_parse_caa_reply()
137 ares_dns_record_destroy(dnsrec); in ares_parse_caa_reply()
H A Dares_parse_naptr_reply.c39 ares_dns_record_t *dnsrec = NULL; in ares_parse_naptr_reply() local
50 status = ares_dns_parse(abuf, alen, 0, &dnsrec); in ares_parse_naptr_reply()
55 if (ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER) == 0) { in ares_parse_naptr_reply()
60 for (i = 0; i < ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); i++) { in ares_parse_naptr_reply()
62 ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); in ares_parse_naptr_reply()
132 ares_dns_record_destroy(dnsrec); in ares_parse_naptr_reply()
H A Dares_parse_soa_reply.c38 ares_dns_record_t *dnsrec = NULL; in ares_parse_soa_reply() local
49 status = ares_dns_parse(abuf, alen, 0, &dnsrec); in ares_parse_soa_reply()
54 if (ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER) == 0) { in ares_parse_soa_reply()
59 for (i = 0; i < ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); i++) { in ares_parse_soa_reply()
61 ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); in ares_parse_soa_reply()
115 ares_dns_record_destroy(dnsrec); in ares_parse_soa_reply()
H A Dares_parse_srv_reply.c40 ares_dns_record_t *dnsrec = NULL; in ares_parse_srv_reply() local
51 status = ares_dns_parse(abuf, alen, 0, &dnsrec); in ares_parse_srv_reply()
56 if (ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER) == 0) { in ares_parse_srv_reply()
61 for (i = 0; i < ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); i++) { in ares_parse_srv_reply()
63 ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); in ares_parse_srv_reply()
114 ares_dns_record_destroy(dnsrec); in ares_parse_srv_reply()
H A Dares_parse_txt_reply.c39 ares_dns_record_t *dnsrec = NULL; in ares__parse_txt_reply() local
44 status = ares_dns_parse(abuf, alen, 0, &dnsrec); in ares__parse_txt_reply()
49 if (ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER) == 0) { in ares__parse_txt_reply()
54 for (i = 0; i < ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); i++) { in ares__parse_txt_reply()
56 ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); in ares__parse_txt_reply()
116 ares_dns_record_destroy(dnsrec); in ares__parse_txt_reply()
H A Dares_parse_uri_reply.c40 ares_dns_record_t *dnsrec = NULL; in ares_parse_uri_reply() local
51 status = ares_dns_parse(abuf, alen, 0, &dnsrec); in ares_parse_uri_reply()
56 if (ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER) == 0) { in ares_parse_uri_reply()
61 for (i = 0; i < ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); i++) { in ares_parse_uri_reply()
63 ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); in ares_parse_uri_reply()
113 ares_dns_record_destroy(dnsrec); in ares_parse_uri_reply()
H A Dares__parse_into_addrinfo.c56 ares_dns_record_t *dnsrec = NULL; in ares__parse_into_addrinfo() local
66 status = ares_dns_parse(abuf, alen, 0, &dnsrec); in ares__parse_into_addrinfo()
72 status = ares_dns_record_query_get(dnsrec, 0, &hostname, NULL, NULL); in ares__parse_into_addrinfo()
77 ancount = ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); in ares__parse_into_addrinfo()
86 ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); in ares__parse_into_addrinfo()
180 ares_dns_record_destroy(dnsrec); in ares__parse_into_addrinfo()
H A Dares_parse_ptr_reply.c49 ares_dns_record_t *dnsrec = NULL; in ares_parse_ptr_reply() local
61 status = ares_dns_parse(abuf, alen, 0, &dnsrec); in ares_parse_ptr_reply()
68 status = ares_dns_record_query_get(dnsrec, 0, &ptrname, NULL, NULL); in ares_parse_ptr_reply()
73 ancount = ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); in ares_parse_ptr_reply()
117 ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); in ares_parse_ptr_reply()
198 ares_dns_record_destroy(dnsrec); in ares_parse_ptr_reply()
H A Dares_parse_ns_reply.c50 ares_dns_record_t *dnsrec = NULL; in ares_parse_ns_reply() local
62 status = ares_dns_parse(abuf, alen, 0, &dnsrec); in ares_parse_ns_reply()
67 ancount = ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); in ares_parse_ns_reply()
92 status = ares_dns_record_query_get(dnsrec, 0, &hostname, NULL, NULL); in ares_parse_ns_reply()
112 ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); in ares_parse_ns_reply()
155 ares_dns_record_destroy(dnsrec); in ares_parse_ns_reply()
H A Dares_dns_private.h46 ares_status_t ares_dns_record_rr_prealloc(ares_dns_record_t *dnsrec,
49 void ares_dns_record_write_ttl_decrement(ares_dns_record_t *dnsrec,
H A Dares_private.h585 ares_dns_record_t *dnsrec);
/third_party/node/deps/cares/src/tools/
H A Dadig.c279 static void print_header(const ares_dns_record_t *dnsrec) in print_header() argument
282 ares_dns_opcode_tostr(ares_dns_record_get_opcode(dnsrec)), in print_header()
283 ares_dns_rcode_tostr(ares_dns_record_get_rcode(dnsrec)), in print_header()
284 ares_dns_record_get_id(dnsrec)); in print_header()
286 print_flags(ares_dns_record_get_flags(dnsrec)); in print_header()
288 (unsigned int)ares_dns_record_query_cnt(dnsrec), in print_header()
289 (unsigned int)ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER), in print_header()
290 (unsigned int)ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_AUTHORITY), in print_header()
291 (unsigned int)ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ADDITIONAL)); in print_header()
294 static void print_question(const ares_dns_record_t *dnsrec) in print_question() argument
689 has_opt(ares_dns_record_t *dnsrec, ares_dns_section_t section) has_opt() argument
702 print_section(ares_dns_record_t *dnsrec, ares_dns_section_t section) print_section() argument
723 print_opt_psuedosection(ares_dns_record_t *dnsrec) print_opt_psuedosection() argument
742 ares_dns_record_t *dnsrec = NULL; callback() local
784 ares_dns_record_t *dnsrec = NULL; enqueue_query() local
[all...]
/third_party/node/deps/cares/include/
H A Dares_dns_record.h554 * \param[out] dnsrec Pointer passed by reference for a newly allocated
564 CARES_EXTERN ares_status_t ares_dns_record_create(ares_dns_record_t **dnsrec,
572 * \param[in] dnsrec Initialized record object
574 CARES_EXTERN void ares_dns_record_destroy(ares_dns_record_t *dnsrec);
578 * \param[in] dnsrec Initialized record object
582 ares_dns_record_get_id(const ares_dns_record_t *dnsrec);
586 * \param[in] dnsrec Initialized record object
590 ares_dns_record_get_flags(const ares_dns_record_t *dnsrec);
594 * \param[in] dnsrec Initialized record object
598 ares_dns_record_get_opcode(const ares_dns_record_t *dnsrec);
[all...]

Completed in 11 milliseconds