From d3afa18c42821c63478145ed35349b237859d5ab Mon Sep 17 00:00:00 2001 From: leitner Date: Tue, 13 Jul 2004 10:09:17 +0000 Subject: [PATCH] dns_name6_domain -> void man page clarifications --- dns/dns_name4_domain.3 | 6 +++++- dns/dns_name6_domain.3 | 6 +++++- dns/dns_nd6.c | 4 +--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dns/dns_name4_domain.3 b/dns/dns_name4_domain.3 index 88b0909..dabc5c5 100644 --- a/dns/dns_name4_domain.3 +++ b/dns/dns_name4_domain.3 @@ -4,11 +4,15 @@ dns_name4_domain \- construct host name for reverse lookup .SH SYNTAX .B #include -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]); .SH DESCRIPTION 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 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" dns_name4(3), dns_name6_domain(3) diff --git a/dns/dns_name6_domain.3 b/dns/dns_name6_domain.3 index 455b867..458f44e 100644 --- a/dns/dns_name6_domain.3 +++ b/dns/dns_name6_domain.3 @@ -4,7 +4,7 @@ dns_name6_domain \- construct host name for reverse lookup .SH SYNTAX .B #include -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); .SH DESCRIPTION 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 IPv6 reverse lookups is now deprecated and "ip6.arpa" is the standard way. + +q is zero terminated. + +q must have space for DNS_NAME4_DOMAIN bytes. .SH "SEE ALSO" dns_name6(3), dns_name4_domain(3) diff --git a/dns/dns_nd6.c b/dns/dns_nd6.c index 0376a22..222f9ea 100644 --- a/dns/dns_nd6.c +++ b/dns/dns_nd6.c @@ -14,7 +14,7 @@ static char tohex(char c) { 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; @@ -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"); else if (t==DNS_IP6_ARPA) byte_copy(name + 4*16,10,"\3ip6\4arpa\0"); - else return 0; - return 4*16+9+t; }