home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / WEBSERVE / SAMBAR / DATA.1 / security.h < prev    next >
C/C++ Source or Header  |  1997-07-10  |  2KB  |  81 lines

  1. /*
  2. ** SECURITY.H
  3. **
  4. **      This header file contains the public HTTP interfaces used by the
  5. **        Sambar Server for interfacing with the Security Interfaces.
  6. **
  7. **        Confidential Property of Tod Sambar
  8. **        (c) Copyright Tod Sambar 1996-1997
  9. **        All rights reserved.
  10. **
  11. **
  12. ** History:
  13. ** Chg#    Date    Description                                                Resp
  14. ** ----    -------    -------------------------------------------------------    ----
  15. **        4FEB97    Created                                                    sambar
  16. */
  17.  
  18. #if     !defined(__SECURITY_H__)
  19. #define __SECURITY_H__
  20.  
  21. #include    <sambar.h>
  22.  
  23. /*
  24. ** Security Structures
  25. */
  26. typedef struct __ENTRY
  27. {
  28.     SA_INT                valuelen;
  29.     SA_CHAR                *value;
  30.     struct __ENTRY        *next;
  31. } ENTRY;
  32.  
  33. typedef struct __security
  34. {
  35.     SA_INT                namelen;
  36.     SA_CHAR                *name;
  37.     ENTRY                *entries;
  38.     struct __security    *next;
  39. } SECURITY;
  40.  
  41. #define SECURITY_REDIRECT        (SA_INT)0
  42. #define SECURITY_RESTRICT        (SA_INT)1
  43. #define SECURITY_DENY            (SA_INT)2
  44. #define SECURITY_HTTPACCEPT        (SA_INT)3
  45. #define SECURITY_HTTPDENY        (SA_INT)4
  46. #define SECURITY_FTPACCEPT        (SA_INT)5
  47. #define SECURITY_FTPDENY        (SA_INT)6
  48. #define SECURITY_NNTPACCEPT        (SA_INT)7
  49. #define SECURITY_NNTPDENY        (SA_INT)8
  50. #define SECURITY_PROXYACCEPT    (SA_INT)9
  51. #define SECURITY_PROXYDENY        (SA_INT)10
  52. #define SECURITY_HOSTFILTER        (SA_INT)11
  53. #define SECURITY_URLFILTER        (SA_INT)12
  54.  
  55.  
  56. /*
  57. ** Sambar Server/Security Function Prototypes
  58. */
  59. #if defined(__cplusplus)
  60. extern "C" {
  61. #endif /* defined(__cplusplus) */
  62.  
  63. extern SA_RETCODE SA_EXPORT     security_init(SA_CTX *sactx);
  64. extern SA_RETCODE SA_EXPORT     security_exit(SA_CTX *sactx);
  65. extern SA_RETCODE SA_EXPORT        security_request(SA_CTX *sactx, SA_CONN *saconn,
  66.                                     SA_CHAR *uri, SA_INT urilen, 
  67.                                     SA_PARAMS *saparams, SA_INT *infop);
  68. extern SA_RETCODE SA_EXPORT        security_connect(SA_CTX *sactx, SA_CHAR *ipaddr,
  69.                                     SA_INT servertype);
  70. extern SA_RETCODE SA_EXPORT        security_filter(SA_CTX *sactx, SA_CONN *conn,
  71.                                     SA_CHAR *host, SA_INT hostlen,
  72.                                     SA_CHAR *url, SA_INT urllen);
  73. extern SA_RETCODE SA_PUBLIC        security_showsec(SA_CTX *sactx, SA_CONN *saconn,
  74.                                     SA_PARAMS *saparams, SA_INT *infop);
  75.  
  76. #if defined(__cplusplus)
  77. }
  78. #endif /* defined(__cplusplus) */
  79.  
  80. #endif /* __SECURITY_H__ */
  81.