@@ -32,6 +32,9 @@ ares_dns_record_t *ares_dns_record_duplicate(const ares_dns_record_t *dnsrec);
3232
3333unsigned short ares_dns_record_get_id(const ares_dns_record_t *dnsrec);
3434
35+ ares_bool_t ares_dns_record_set_id(ares_dns_record_t *dnsrec,
36+ unsigned short id);
37+
3538unsigned short ares_dns_record_get_flags(const ares_dns_record_t *dnsrec);
3639
3740ares_dns_opcode_t ares_dns_record_get_opcode(const ares_dns_record_t *dnsrec);
@@ -343,6 +346,14 @@ message id from the DNS record provided in the
343346.IR dnsrec
344347parameter.
345348
349+ The \fI ares_dns_record_set_id(3) \fP function is used to set the DNS
350+ message id in the
351+ .IR id
352+ parameter from the DNS record provided in the
353+ .IR dnsrec
354+ parameter. This id will be overwritten when passing the record to c-ares,
355+ so mostly exists for external purposes.
356+
346357The \fI ares_dns_record_get_flags(3) \fP function is used to retrieve the DNS
347358message flags from the DNS record provided in the
348359.IR dnsrec
@@ -428,12 +439,12 @@ is returned on out of memory,
428439.B ARES_EFORMERR
429440is returned on misuse.
430441
431- \fI ares_dns_record_get_id(3) \fP , \fI ares_dns_record_get_flags (3)\fP ,
432- \fI ares_dns_record_get_opcode (3)\fP , \fI ares_dns_record_get_rcode (3)\fP , and
433- \fI ares_dns_record_query_cnt (3)\fP all returned their prescribed datatype
434- values and in general can't fail except for misuse cases, in which a 0 may
435- be returned, however 0 can also be a valid return value for most of these
436- functions.
442+ \fI ares_dns_record_get_id(3) \fP , \fI ares_dns_record_set_id (3)\fP ,
443+ \fI ares_dns_record_get_flags (3)\fP , \fI ares_dns_record_get_opcode (3)\fP ,
444+ \fI ares_dns_record_get_rcode (3)\fP , and \fI ares_dns_record_query_cnt(3) \fP
445+ all returned their prescribed datatype values and in general can't fail except
446+ for misuse cases, in which a 0 may be returned, however 0 can also be a valid
447+ return value for most of these functions.
437448
438449
439450.SH AVAILABILITY
0 commit comments