Tue Apr 28 07:52:00 2009 UTC ()
Use Xr for strtok_r reference. Remove trailing whitespace.


(wiz)
diff -r1.4 -r1.5 src/lib/libevent/evdns.3

cvs diff -r1.4 -r1.5 src/lib/libevent/Attic/evdns.3 (expand / switch to unified diff)

--- src/lib/libevent/Attic/evdns.3 2009/04/28 03:11:45 1.4
+++ src/lib/libevent/Attic/evdns.3 2009/04/28 07:51:59 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: evdns.3,v 1.4 2009/04/28 03:11:45 reed Exp $ 1.\" $NetBSD: evdns.3,v 1.5 2009/04/28 07:51:59 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 2006 Niels Provos <provos@citi.umich.edu> 3.\" Copyright (c) 2006 Niels Provos <provos@citi.umich.edu>
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 9.\"
10.\" 1. Redistributions of source code must retain the above copyright 10.\" 1. Redistributions of source code must retain the above copyright
11.\" notice, this list of conditions and the following disclaimer. 11.\" notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\" notice, this list of conditions and the following disclaimer in the 13.\" notice, this list of conditions and the following disclaimer in the
14.\" documentation and/or other materials provided with the distribution. 14.\" documentation and/or other materials provided with the distribution.
@@ -92,27 +92,27 @@ can do the job for you with the modern a @@ -92,27 +92,27 @@ can do the job for you with the modern a
92Otherwise, please continue. 92Otherwise, please continue.
93.Pp 93.Pp
94This code is based on libevent and you must call 94This code is based on libevent and you must call
95.Fn event_init 95.Fn event_init
96before 96before
97any of the APIs in this file. 97any of the APIs in this file.
98You must also seed the OpenSSL random 98You must also seed the OpenSSL random
99source if you are using OpenSSL for ids (see below). 99source if you are using OpenSSL for ids (see below).
100.Pp 100.Pp
101This library is designed to be included and shipped with your source 101This library is designed to be included and shipped with your source
102code. 102code.
103You statically link with it. 103You statically link with it.
104You should also test for the existence of 104You should also test for the existence of
105.Dv strtok_r 105.Xr strtok_r 3
106and define 106and define
107.Dv HAVE_STRTOK_R 107.Dv HAVE_STRTOK_R
108if you have it. 108if you have it.
109.Pp 109.Pp
110The DNS protocol requires a good source of id numbers and these 110The DNS protocol requires a good source of id numbers and these
111numbers should be unpredictable for spoofing reasons. 111numbers should be unpredictable for spoofing reasons.
112There are three methods for generating them here and you must define 112There are three methods for generating them here and you must define
113exactly one of them. 113exactly one of them.
114In increasing order of preference: 114In increasing order of preference:
115.Pp 115.Pp
116.Bl -tag -width "DNS_USE_GETTIMEOFDAY_FOR_ID" -compact -offset indent 116.Bl -tag -width "DNS_USE_GETTIMEOFDAY_FOR_ID" -compact -offset indent
117.It Dv DNS_USE_GETTIMEOFDAY_FOR_ID 117.It Dv DNS_USE_GETTIMEOFDAY_FOR_ID
118Using the bottom 16 bits of the usec result from gettimeofday. 118Using the bottom 16 bits of the usec result from gettimeofday.
@@ -136,27 +136,27 @@ Otherwise it will round robin between th @@ -136,27 +136,27 @@ Otherwise it will round robin between th
136.Pp 136.Pp
137Quick start guide: 137Quick start guide:
138.Bd -literal 138.Bd -literal
139#include \*[Lt]evdns.h\*[Gt] 139#include \*[Lt]evdns.h\*[Gt]
140void callback(int result, char type, int count, int ttl, 140void callback(int result, char type, int count, int ttl,
141 void *addresses, void *arg); 141 void *addresses, void *arg);
142 142
143evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf"); 143evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf");
144evdns_resolve("www.hostname.com", 0, callback, NULL); 144evdns_resolve("www.hostname.com", 0, callback, NULL);
145.Ed 145.Ed
146.Pp 146.Pp
147When the lookup is complete the callback function is called. 147When the lookup is complete the callback function is called.
148The first argument will be one of the DNS_ERR_* defines in evdns.h. 148The first argument will be one of the DNS_ERR_* defines in evdns.h.
149Hopefully it will be  149Hopefully it will be
150.Dv DNS_ERR_NONE , 150.Dv DNS_ERR_NONE ,
151in which case type will be 151in which case type will be
152.Dv DNS_IPv4_A , 152.Dv DNS_IPv4_A ,
153count will be the number of IP addresses, ttl is the time 153count will be the number of IP addresses, ttl is the time
154which the data can be cached for (in seconds), addresses will point 154which the data can be cached for (in seconds), addresses will point
155to an array of uint32_t's and arg will be whatever you passed to 155to an array of uint32_t's and arg will be whatever you passed to
156.Fn evdns_resolve . 156.Fn evdns_resolve .
157.Pp 157.Pp
158Searching: 158Searching:
159.Pp 159.Pp
160In order for this library to be a good replacement for glibc's resolver it 160In order for this library to be a good replacement for glibc's resolver it
161supports searching. 161supports searching.
162This involves setting a list of default domains, in which names 162This involves setting a list of default domains, in which names