archie.h
上传用户:sddyfurun
上传日期:2007-01-04
资源大小:525k
文件大小:2k
源码类别:

代理服务器

开发平台:

Unix_Linux

  1. /*
  2.  * archie.h : Definitions for the programmatic Prospero interface to Archie
  3.  *
  4.  *     Written by Brendan Kehoe (brendan@cygnus.com),
  5.  *                George Ferguson (ferguson@cs.rochester.edu), and
  6.  *                Clifford Neuman (bcn@isi.edu).
  7.  */
  8. /* You can't touch this.  */
  9. #ifndef XARCHIE
  10. # define ARCHIES "archie.ans.net (USA [NY])","archie.rutgers.edu (USA [NJ])","archie.sura.net (USA [MD])","archie.unl.edu (USA [NE])","archie.mcgill.ca (Canada)","archie.funet.fi (Finland/Mainland Europe)","archie.au (Australia)","archie.doc.ic.ac.uk (Great Britain/Ireland)","archie.wide.ad.jp (Japan)","archie.ncu.edu.tw (Taiwan)"
  11. # define NARCHIES 10
  12. #endif
  13. /*
  14.  * Default value for max hits.  Note that this is normally different
  15.  * for different client implementations.  Doing so makes it easier to
  16.  * collect statistics on the use of the various clients.
  17.  */
  18. #ifdef XARCHIE
  19. # define MAX_HITS 99 /* X Client */
  20. #else
  21. # define MAX_HITS 95 /* Normal client */
  22. #endif
  23. /*
  24.  * CLIENT_VERSION may be used to identify the version of the client if 
  25.  * distributed separately from the Prospero distribution.  The version
  26.  * command should then identify both the client version and the Prospero
  27.  * version identifiers.   
  28.  */
  29. #ifdef XARCHIE
  30. # define CLIENT_VERSION "1.3-X"
  31. #else
  32. # define CLIENT_VERSION "1.4.1"
  33. #endif
  34. /* The different kinds of queries we can make.  */
  35. typedef enum query_type
  36. {
  37.   NONE = '', EXACT = '=', REGEXP = 'R',
  38.   SUBSTRING = 'S', SUBSTRING_CASE = 'C'
  39. } Query;
  40. /* Procedures from user/aquery.c */
  41. extern VLINK archie_query (); 
  42. /* defcmplink(p,q) and invdatecmplink(p,q)                             */
  43. extern int defcmplink(); /* Compare by host then by filename    */
  44. extern int invdatecmplink(); /* Compare links inverted by date      */
  45. /* Definitions for the comparison procedures                           */
  46. #define AQ_DEFCMP defcmplink
  47. #define AQ_INVDATECMP invdatecmplink
  48. /* Flags                                                               */
  49. #define AQ_NOSORT 0x01 /* Don't sort                          */
  50. #define AQ_NOTRANS 0x02 /* Don't translate Archie responses    */
  51. /* To keep the code clean (hah!). */
  52. #define ERROR_EXIT 1