mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-14 03:10:47 +00:00
b36a9e43ed
requires that your main application is built on top of libevent. Libdnsres' API essentially mirrors the traditional gethostbyname and getaddrinfo interfaces. All return values have been replaced by callbacks instead. The code borrows heavily from the BSD resolver library. In fact, it is an extremely ugly hack to make the BSD resolver library non-blocking and thread-safe without changing the API too much. WWW: http://www.monkey.org/~provos/libdnsres/ PR: ports/93365 Submitted by: Phil Oleson <oz@nixil.net>
39 lines
1.8 KiB
Groff
39 lines
1.8 KiB
Groff
--- dnsres.3.orig Tue Feb 14 15:17:58 2006
|
|
+++ dnsres.3 Tue Feb 14 16:15:58 2006
|
|
@@ -38,17 +38,20 @@
|
|
.Nm dnsres_getaddrinfo
|
|
.Nd non blocking DNS resolving library
|
|
.Sh SYNOPSIS
|
|
+.Fd #include <sys/types.h>
|
|
+.Fd #include <sys/socket.h>
|
|
+.Fd #include <netdb.h>
|
|
.Fd #include <dnsres.h>
|
|
.Ft int
|
|
.Fn dnsres_init "struct dnsres *_resp"
|
|
.Ft void
|
|
-.Fn dnsres_gethostbyname "struct dnsres* res" "const char *name" "void (*cb)(struct hostent *hp, int error, void *arg" "void *arg"
|
|
+.Fn dnsres_gethostbyname "struct dnsres *res" "const char *name" "void (*cb)(struct hostent *hp, int error, void *arg)" "void *arg"
|
|
.Ft void
|
|
-.Fn dnsres_gethostbyname2 "const char *name" "int af" "void (*cb)(struct hostent *hp, int error, void *arg" "void *arg"
|
|
+.Fn dnsres_gethostbyname2 "struct dnsres *res" "const char *name" "int af" "void (*cb)(struct hostent *hp, int error, void *arg)" "void *arg"
|
|
.Ft void
|
|
-.Fn dnsres_gethostbyaddr "const char *addr" "int len" "int af" "void (*cb)(struct hostent *hp, int error, void *arg" "void *arg"
|
|
+.Fn dnsres_gethostbyaddr "struct dnsres *res" "const char *addr" "int len" "int af" "void (*cb)(struct hostent *hp, int error, void *arg)" "void *arg"
|
|
.Ft void
|
|
-.Fn dnsres_getaddrinfo "struct dnsres *" "const char *" "const char *" "const struct addrinfo *" "void (*)(struct addrinfo *, int, void *)" "void *";
|
|
+.Fn dnsres_getaddrinfo "struct dnsres *res" "const char *hostname" "const char *servname" "const struct addrinfo *hints" "void (*cb)(struct addrinfo *ai, int res, void *arg)" "void *arg"
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Fn dnsres_init
|
|
@@ -134,6 +137,10 @@
|
|
The only address family currently supported is
|
|
.Dv AF_INET .
|
|
.Pp
|
|
+The
|
|
+.Fn dnsres_getaddrinfo
|
|
+function is used to get a list of IP addresses and port
|
|
+numbers for host hostname and service servname.
|
|
.Sh ENVIRONMENT
|
|
.Bl -tag -width HOSTALIASES
|
|
.It HOSTALIASES
|