dns_name6_domain -> void
man page clarifications
This commit is contained in:
parent
155762ce19
commit
d3afa18c42
@ -4,11 +4,15 @@ dns_name4_domain \- construct host name for reverse lookup
|
|||||||
.SH SYNTAX
|
.SH SYNTAX
|
||||||
.B #include <dns.h>
|
.B #include <dns.h>
|
||||||
|
|
||||||
int \fBdns_name4_domain\fP(char \fIq\fR[DNS_NAME4_DOMAIN],
|
void \fBdns_name4_domain\fP(char \fIq\fR[DNS_NAME4_DOMAIN],
|
||||||
const char* \fIip\fR[4]);
|
const char* \fIip\fR[4]);
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
dns_name4_domain is a low-level component of dns_name4. It converts an
|
dns_name4_domain is a low-level component of dns_name4. It converts an
|
||||||
IP address such as 1.2.3.4 into a domain name such as
|
IP address such as 1.2.3.4 into a domain name such as
|
||||||
4.3.2.1.in-addr.arpa and places the packet-encoded domain name into \fIq\fR.
|
4.3.2.1.in-addr.arpa and places the packet-encoded domain name into \fIq\fR.
|
||||||
|
|
||||||
|
q is zero terminated.
|
||||||
|
|
||||||
|
q must have space for DNS_NAME4_DOMAIN bytes.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
dns_name4(3), dns_name6_domain(3)
|
dns_name4(3), dns_name6_domain(3)
|
||||||
|
@ -4,7 +4,7 @@ dns_name6_domain \- construct host name for reverse lookup
|
|||||||
.SH SYNTAX
|
.SH SYNTAX
|
||||||
.B #include <dns.h>
|
.B #include <dns.h>
|
||||||
|
|
||||||
int \fBdns_name6_domain\fP(char \fIq\fR[DNS_NAME6_DOMAIN],
|
void \fBdns_name6_domain\fP(char \fIq\fR[DNS_NAME6_DOMAIN],
|
||||||
const char* \fIip\fR[16],int \fItype\fR);
|
const char* \fIip\fR[16],int \fItype\fR);
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
dns_name6_domain is a low-level component of dns_name6. It converts an
|
dns_name6_domain is a low-level component of dns_name6. It converts an
|
||||||
@ -15,5 +15,9 @@ and places the packet-encoded domain name into \fIq\fR.
|
|||||||
\fItype\fR can be DNS_IP6_INT or DNS_IP6_ARPA. The "ip6.int" domain for
|
\fItype\fR can be DNS_IP6_INT or DNS_IP6_ARPA. The "ip6.int" domain for
|
||||||
IPv6 reverse lookups is now deprecated and "ip6.arpa" is the standard
|
IPv6 reverse lookups is now deprecated and "ip6.arpa" is the standard
|
||||||
way.
|
way.
|
||||||
|
|
||||||
|
q is zero terminated.
|
||||||
|
|
||||||
|
q must have space for DNS_NAME4_DOMAIN bytes.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
dns_name6(3), dns_name4_domain(3)
|
dns_name6(3), dns_name4_domain(3)
|
||||||
|
@ -14,7 +14,7 @@ static char tohex(char c) {
|
|||||||
return c>=10?c-10+'a':c+'0';
|
return c>=10?c-10+'a':c+'0';
|
||||||
}
|
}
|
||||||
|
|
||||||
int dns_name6_domain(char name[DNS_NAME6_DOMAIN],const char ip[16],int t)
|
void dns_name6_domain(char name[DNS_NAME6_DOMAIN],const char ip[16],int t)
|
||||||
{
|
{
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
|
|
||||||
@ -28,7 +28,5 @@ int dns_name6_domain(char name[DNS_NAME6_DOMAIN],const char ip[16],int t)
|
|||||||
byte_copy(name + 4*16,9,"\3ip6\3int\0");
|
byte_copy(name + 4*16,9,"\3ip6\3int\0");
|
||||||
else if (t==DNS_IP6_ARPA)
|
else if (t==DNS_IP6_ARPA)
|
||||||
byte_copy(name + 4*16,10,"\3ip6\4arpa\0");
|
byte_copy(name + 4*16,10,"\3ip6\4arpa\0");
|
||||||
else return 0;
|
|
||||||
return 4*16+9+t;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user