home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 September / CHIPCD_9_99.iso / software / serwery_www / sambar / _setup.1 / security.h < prev    next >
C/C++ Source or Header  |  1998-02-03  |  2KB  |  82 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_PROXYACCEPT    (SA_INT)7
  49. #define SECURITY_PROXYDENY        (SA_INT)8
  50. #define SECURITY_HOSTFILTER        (SA_INT)9
  51. #define SECURITY_URLFILTER        (SA_INT)10
  52. #define SECURITY_IPRESTRICT        (SA_INT)11
  53. #define SECURITY_HOSTRESTRICT    (SA_INT)12
  54. #define SECURITY_URLRESTRICT    (SA_INT)13
  55.  
  56.  
  57. /*
  58. ** Sambar Server/Security Function Prototypes
  59. */
  60. #if defined(__cplusplus)
  61. extern "C" {
  62. #endif /* defined(__cplusplus) */
  63.  
  64. extern SA_RETCODE SA_EXPORT     security_init(SA_CTX *sactx);
  65. extern SA_RETCODE SA_EXPORT     security_exit(SA_CTX *sactx);
  66. extern SA_RETCODE SA_EXPORT        security_request(SA_CTX *sactx, SA_CONN *saconn,
  67.                                     SA_CHAR *uri, SA_INT urilen, 
  68.                                     SA_PARAMS *saparams, SA_INT *infop);
  69. extern SA_RETCODE SA_EXPORT        security_connect(SA_CTX *sactx, SA_CHAR *ipaddr,
  70.                                     SA_INT servertype);
  71. extern SA_RETCODE SA_EXPORT        security_filter(SA_CTX *sactx, SA_CONN *conn,
  72.                                     SA_CHAR *host, SA_INT hostlen,
  73.                                     SA_CHAR *url, SA_INT urllen);
  74. extern SA_RETCODE SA_PUBLIC        security_showsec(SA_CTX *sactx, SA_CONN *saconn,
  75.                                     SA_PARAMS *saparams, SA_INT *infop);
  76.  
  77. #if defined(__cplusplus)
  78. }
  79. #endif /* defined(__cplusplus) */
  80.  
  81. #endif /* __SECURITY_H__ */
  82.