From 8873a442f28276884805eaefd2e197165ab664ea Mon Sep 17 00:00:00 2001 From: leitner Date: Fri, 17 Sep 2004 13:51:35 +0000 Subject: [PATCH] man page update --- CHANGES | 1 + dns/dns_ip6.3 | 2 +- dns/dns_name6_domain.3 | 2 +- dns/dns_txt.c | 3 ++- dns/dns_txt_packet.3 | 6 +++--- socket/fmt_ip4.3 | 2 +- socket/fmt_ip6.3 | 2 +- socket/scan_ip4.3 | 2 +- socket/scan_ip6.3 | 2 +- 9 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index 2ed3dc5..648b914 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,5 @@ 0.21: + errno cleanup and man page updates (Rolf Eike Beer) 0.20: add errmsg API diff --git a/dns/dns_ip6.3 b/dns/dns_ip6.3 index b370396..ae0ca3d 100644 --- a/dns/dns_ip6.3 +++ b/dns/dns_ip6.3 @@ -1,6 +1,6 @@ .TH dns_ip6 3 .SH NAME -dns_ip6 \- look up IPv4 addresses +dns_ip6 \- look up IPv6 addresses .SH SYNTAX .B #include diff --git a/dns/dns_name6_domain.3 b/dns/dns_name6_domain.3 index 458f44e..b31092b 100644 --- a/dns/dns_name6_domain.3 +++ b/dns/dns_name6_domain.3 @@ -18,6 +18,6 @@ way. q is zero terminated. -q must have space for DNS_NAME4_DOMAIN bytes. +q must have space for DNS_NAME6_DOMAIN bytes. .SH "SEE ALSO" dns_name6(3), dns_name4_domain(3) diff --git a/dns/dns_txt.c b/dns/dns_txt.c index 44deafe..fa6c1b3 100644 --- a/dns/dns_txt.c +++ b/dns/dns_txt.c @@ -1,3 +1,4 @@ +#include #include "stralloc.h" #include "uint16.h" #include "byte.h" @@ -26,7 +27,7 @@ int dns_txt_packet(stralloc *out,const char *buf,unsigned int len) uint16_unpack_big(header + 8,&datalen); if (byte_equal(header,2,DNS_T_TXT)) if (byte_equal(header + 2,2,DNS_C_IN)) { - if (pos + datalen > len) return -1; + if (pos + datalen > len) { errno = EINVAL; return -1; } txtlen = 0; for (i = 0;i < datalen;++i) { ch = buf[pos + i]; diff --git a/dns/dns_txt_packet.3 b/dns/dns_txt_packet.3 index 5e23bc0..a8c5cda 100644 --- a/dns/dns_txt_packet.3 +++ b/dns/dns_txt_packet.3 @@ -7,9 +7,9 @@ dns_txt_packet \- extract TXT records from DNS answer packet int \fBdns_txt_packet\fP(stralloc* \fIout\fR,const char* \fIbuf\fR, unsigned int \fIlen\fR); .SH DESCRIPTION -dns_txt_packet is a low-level component of dns_mx, designed to support +dns_txt_packet is a low-level component of dns_txt, designed to support asynchronous DNS lookups. It reads a DNS packet of length \fIlen\fR from \fIbuf\fR, extracts the TXT records from the answer section of the packet, puts the -result into \fIout\fR, and returns 0 or -1 the same way as dns_mx. +result into \fIout\fR, and returns 0 or -1 the same way as dns_txt. .SH "SEE ALSO" -dns_mx(3) +dns_txt(3) diff --git a/socket/fmt_ip4.3 b/socket/fmt_ip4.3 index 993ac53..6dccb0a 100644 --- a/socket/fmt_ip4.3 +++ b/socket/fmt_ip4.3 @@ -24,4 +24,4 @@ contain every possible fmt_ip4 output plus \\0. char ip[4]; buf[fmt_ip4(buf,ip)]=0; .SH "SEE ALSO" -scan_ip4(3), fmt_ip6(3) +scan_ip4(3), fmt_ip6(3), inet_ntop(3) diff --git a/socket/fmt_ip6.3 b/socket/fmt_ip6.3 index 7a1e840..061f796 100644 --- a/socket/fmt_ip6.3 +++ b/socket/fmt_ip6.3 @@ -29,4 +29,4 @@ contain every possible fmt_ip6 output plus \\0. char ip[16]; buf[fmt_ip6(buf,ip)]=0; .SH "SEE ALSO" -fmt_ip6c(3), fmt_ip6if(3), scan_ip6(3), fmt_ip4(3) +fmt_ip6c(3), fmt_ip6if(3), scan_ip6(3), fmt_ip4(3), inet_ntop(3) diff --git a/socket/scan_ip4.3 b/socket/scan_ip4.3 index fd914f9..d935282 100644 --- a/socket/scan_ip4.3 +++ b/socket/scan_ip4.3 @@ -23,4 +23,4 @@ Unlike many other IP parsing routines, scan_ip4 does not recognize octal parse_error(); .SH "SEE ALSO" -fmt_ip4(3), scan_ip6(3) +fmt_ip4(3), scan_ip6(3), inet_pton(3) diff --git a/socket/scan_ip6.3 b/socket/scan_ip6.3 index 6694fd0..00e43f9 100644 --- a/socket/scan_ip6.3 +++ b/socket/scan_ip6.3 @@ -32,4 +32,4 @@ in the IPv4 part. parse_error(); .SH "SEE ALSO" -fmt_ip6(3), scan_ip4(3) +fmt_ip6(3), scan_ip4(3), inet_pton(3)