Plan 9 from Bell Labs’s /usr/web/sources/contrib/anothy/src/lib/djb-ape/dns/dns_ip4_qualify.3

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TH dns_ip4_qualify 3
.SH NAME
dns_ip4_qualify \- find IP addresses for host names
.SH SYNTAX
.B #include <dns.h>

int \fBdns_ip4_qualify\fP(&\fIout\fR,&\fIfqdn\fR,&\fIudn\fR);

stralloc \fIout\fR = {0};
.br
stralloc \fIfqdn\fR = {0};
.br
stralloc \fIudn\fR;

.SH DESCRIPTION
.B dns_ip4_qualify
feeds the name \fIudn\fR through qualification and looks up 4-byte IP
addresses for the result. It puts the fully qualified domain name into
\fIfqdn\fR, puts the concatenation of the IP addresses into \fIout\fR,
and returns 0. If the domain does not exist in DNS, or has no IP
addresses, \fIout\fR will be empty.

If \fBdns_ip4_qualify\fR has trouble with the qualification, has trouble
with DNS, or runs out of memory, it returns -1, setting \fIerrno\fR
appropriately.  It may or may not change \fIout\fR and \fIfqdn\fR.

.SH QUALIFICATION
Please read http://cr.yp.to/dnscache/qualify.html.

.SH "SEE ALSO"
dns_ip6_qualify(3), dns_ip4(3)

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.