resolve.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * ngIRCd -- The Next Generation IRC Daemon
  3. * Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
  4. *
  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.
  10. *
  11. * $Id: resolve.h,v 1.8 2005/03/19 18:43:49 fw Exp $
  12. *
  13. * Asynchronous resolver (header)
  14. */
  15. #ifndef __resolve_h__
  16. #define __resolve_h__
  17. #ifdef HAVE_SYS_SELECT_H
  18. # include <sys/select.h>
  19. #endif
  20. #include <sys/types.h>
  21. #include <netinet/in.h>
  22. typedef struct _Res_Stat
  23. {
  24. int pid; /* PID des Child-Prozess */
  25. int pipe[2]; /* Pipe fuer IPC */
  26. int stage; /* Hostname/IP(0) or IDENT(1)? */
  27. int bufpos; /* Position in buffer */
  28. char buffer[HOST_LEN]; /* Buffer */
  29. } RES_STAT;
  30. GLOBAL fd_set Resolver_FDs;
  31. GLOBAL void Resolve_Init PARAMS(( void ));
  32. #ifdef IDENTAUTH
  33. GLOBAL RES_STAT *Resolve_Addr PARAMS(( struct sockaddr_in *Addr, int Sock ));
  34. #else
  35. GLOBAL RES_STAT *Resolve_Addr PARAMS(( struct sockaddr_in *Addr ));
  36. #endif
  37. GLOBAL RES_STAT *Resolve_Name PARAMS(( char *Host ));
  38. #endif
  39. /* -eof- */