man page update

This commit is contained in:
leitner 2004-09-17 13:51:35 +00:00
parent eb4e19fc23
commit 8873a442f2
9 changed files with 12 additions and 10 deletions

View File

@ -1,4 +1,5 @@
0.21: 0.21:
errno cleanup and man page updates (Rolf Eike Beer)
0.20: 0.20:
add errmsg API add errmsg API

View File

@ -1,6 +1,6 @@
.TH dns_ip6 3 .TH dns_ip6 3
.SH NAME .SH NAME
dns_ip6 \- look up IPv4 addresses dns_ip6 \- look up IPv6 addresses
.SH SYNTAX .SH SYNTAX
.B #include <dns.h> .B #include <dns.h>

View File

@ -18,6 +18,6 @@ way.
q is zero terminated. 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" .SH "SEE ALSO"
dns_name6(3), dns_name4_domain(3) dns_name6(3), dns_name4_domain(3)

View File

@ -1,3 +1,4 @@
#include <errno.h>
#include "stralloc.h" #include "stralloc.h"
#include "uint16.h" #include "uint16.h"
#include "byte.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); uint16_unpack_big(header + 8,&datalen);
if (byte_equal(header,2,DNS_T_TXT)) if (byte_equal(header,2,DNS_T_TXT))
if (byte_equal(header + 2,2,DNS_C_IN)) { 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; txtlen = 0;
for (i = 0;i < datalen;++i) { for (i = 0;i < datalen;++i) {
ch = buf[pos + i]; ch = buf[pos + i];

View File

@ -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, int \fBdns_txt_packet\fP(stralloc* \fIout\fR,const char* \fIbuf\fR,
unsigned int \fIlen\fR); unsigned int \fIlen\fR);
.SH DESCRIPTION .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, 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 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" .SH "SEE ALSO"
dns_mx(3) dns_txt(3)

View File

@ -24,4 +24,4 @@ contain every possible fmt_ip4 output plus \\0.
char ip[4]; char ip[4];
buf[fmt_ip4(buf,ip)]=0; buf[fmt_ip4(buf,ip)]=0;
.SH "SEE ALSO" .SH "SEE ALSO"
scan_ip4(3), fmt_ip6(3) scan_ip4(3), fmt_ip6(3), inet_ntop(3)

View File

@ -29,4 +29,4 @@ contain every possible fmt_ip6 output plus \\0.
char ip[16]; char ip[16];
buf[fmt_ip6(buf,ip)]=0; buf[fmt_ip6(buf,ip)]=0;
.SH "SEE ALSO" .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)

View File

@ -23,4 +23,4 @@ Unlike many other IP parsing routines, scan_ip4 does not recognize octal
parse_error(); parse_error();
.SH "SEE ALSO" .SH "SEE ALSO"
fmt_ip4(3), scan_ip6(3) fmt_ip4(3), scan_ip6(3), inet_pton(3)

View File

@ -32,4 +32,4 @@ in the IPv4 part.
parse_error(); parse_error();
.SH "SEE ALSO" .SH "SEE ALSO"
fmt_ip6(3), scan_ip4(3) fmt_ip6(3), scan_ip4(3), inet_pton(3)