Skip to content

Commit aa462b3

Browse files
committed
man: ares_dns_record_set_id()
Add missing manpage Fixes #817 Fix By: Brad House (@bradh352)
1 parent db2abdc commit aa462b3

3 files changed

Lines changed: 21 additions & 6 deletions

File tree

‎docs/Makefile.inc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ MANPAGES = ares_cancel.3 \
3636
ares_dns_record_rr_del.3 \
3737
ares_dns_record_rr_get.3 \
3838
ares_dns_record_rr_get_const.3 \
39+
ares_dns_record_set_id.3 \
3940
ares_dns_rec_type_fromstr.3 \
4041
ares_dns_rec_type_tostr.3 \
4142
ares_dns_rec_type_t.3 \

‎docs/ares_dns_record.3‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ ares_dns_record_t *ares_dns_record_duplicate(const ares_dns_record_t *dnsrec);
3232

3333
unsigned 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+
3538
unsigned short ares_dns_record_get_flags(const ares_dns_record_t *dnsrec);
3639

3740
ares_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
344347
parameter.
345348

349+
The \fIares_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+
346357
The \fIares_dns_record_get_flags(3)\fP function is used to retrieve the DNS
347358
message 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
429440
is returned on misuse.
430441

431-
\fIares_dns_record_get_id(3)\fP, \fIares_dns_record_get_flags(3)\fP,
432-
\fIares_dns_record_get_opcode(3)\fP, \fIares_dns_record_get_rcode(3)\fP, and
433-
\fIares_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+
\fIares_dns_record_get_id(3)\fP, \fIares_dns_record_set_id(3)\fP,
443+
\fIares_dns_record_get_flags(3)\fP, \fIares_dns_record_get_opcode(3)\fP,
444+
\fIares_dns_record_get_rcode(3)\fP, and \fIares_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

‎docs/ares_dns_record_set_id.3‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.\" Copyright (C) 2023 The c-ares project and its contributors.
2+
.\" SPDX-License-Identifier: MIT
3+
.so man3/ares_dns_record.3

0 commit comments

Comments
 (0)