2 * ngIRCd -- The Next Generation IRC Daemon
3 * Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 * Please read the file COPYING, README and AUTHORS for more information.
11 * $Id: resolve.h,v 1.9 2005/07/28 16:13:09 fw Exp $
13 * Asynchronous resolver (header)
22 #ifdef HAVE_SYS_SELECT_H
23 # include <sys/select.h>
25 #include <sys/types.h>
26 #include <netinet/in.h>
29 typedef struct _Res_Stat
31 int pid; /* PID of resolver process */
32 int pipe[2]; /* pipe for lookup result */
33 int stage; /* Hostname/IP(0) or IDENT(1)? */
34 array buffer; /* resolved hostname / ident result */
38 GLOBAL fd_set Resolver_FDs;
41 GLOBAL void Resolve_Init PARAMS(( void ));
44 GLOBAL RES_STAT *Resolve_Addr PARAMS(( struct sockaddr_in *Addr, int Sock ));
46 GLOBAL RES_STAT *Resolve_Addr PARAMS(( struct sockaddr_in *Addr ));
49 GLOBAL RES_STAT *Resolve_Name PARAMS(( char *Host ));