Commit 2892d43c authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(enum isc_resolve_status): New enum.

(isc_resolve_done_cb): New callback.
(struct isc_scb): Added the field "remote".
(isc_gethostname): Removed.
(isc_resolve_remotem): New function.
parent 8a599f9a
......@@ -55,6 +55,19 @@ typedef void isc_stale_output_cb(struct isc_scb *cb_session);
typedef void isc_write_queue_change_cb(int delta_bytes);
enum isc_resolve_status
isc_resolve_ok, /* Name successfully looked up. */
isc_resolve_h_errno, /* Failed. h_errno value passed in errcode. */
isc_resolve_aborted, /* Session is being killed and no reply yet. */
typedef void *isc_resolve_done_cb(struct isc_scb *scb,
enum isc_resolve_status res,
long errcode /* if res==isc_resolve_h_errno */
** The different session states
......@@ -76,6 +89,7 @@ struct isc_scb
int fd;
union isc_address *raddr;
union isc_address *laddr;
String remote; /* See isc_resolve_remote(). */
ISC_UDGTYPE * udg; /* User defined garbage :-) */
......@@ -265,11 +279,16 @@ isc_getipnum(union isc_address *ia,
char *address,
int len);
extern char *
isc_gethostname(union isc_address *ia,
char *address,
int len);
/* Start to make a reverse DNS lookup on the remote host. Once the
lookup completes, store the result in scb->remote and call the
callback. If the lookup fails, a printable representation of the
IP address will be stored in scb->remote and the callback will be
called with a non-NULL error_reason (FIXME: or whatever adns
likes). */
extern void
isc_resolve_remote(struct isc_scb *scb,
isc_resolve_done_cb *callback);
extern int
isc_getportnum(union isc_address *ia);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment