home *** CD-ROM | disk | FTP | other *** search
- /*
- ** SECURITY.H
- **
- ** This header file contains the public HTTP interfaces used by the
- ** Sambar Server for interfacing with the Security Interfaces.
- **
- ** Confidential Property of Tod Sambar
- ** (c) Copyright Tod Sambar 1996-1997
- ** All rights reserved.
- **
- **
- ** History:
- ** Chg# Date Description Resp
- ** ---- ------- ------------------------------------------------------- ----
- ** 4FEB97 Created sambar
- */
-
- #if !defined(__SECURITY_H__)
- #define __SECURITY_H__
-
- #include <sambar.h>
-
- /*
- ** Security Structures
- */
- typedef struct __ENTRY
- {
- SA_INT valuelen;
- SA_CHAR *value;
- struct __ENTRY *next;
- } ENTRY;
-
- typedef struct __security
- {
- SA_INT namelen;
- SA_CHAR *name;
- ENTRY *entries;
- struct __security *next;
- } SECURITY;
-
- #define SECURITY_REDIRECT (SA_INT)0
- #define SECURITY_RESTRICT (SA_INT)1
- #define SECURITY_DENY (SA_INT)2
- #define SECURITY_HTTPACCEPT (SA_INT)3
- #define SECURITY_HTTPDENY (SA_INT)4
- #define SECURITY_FTPACCEPT (SA_INT)5
- #define SECURITY_FTPDENY (SA_INT)6
- #define SECURITY_PROXYACCEPT (SA_INT)7
- #define SECURITY_PROXYDENY (SA_INT)8
- #define SECURITY_HOSTFILTER (SA_INT)9
- #define SECURITY_URLFILTER (SA_INT)10
- #define SECURITY_IPRESTRICT (SA_INT)11
- #define SECURITY_HOSTRESTRICT (SA_INT)12
- #define SECURITY_URLRESTRICT (SA_INT)13
- #define SECURITY_MAILACCEPT (SA_INT)14
- #define SECURITY_MAILDENY (SA_INT)15
- #define SECURITY_DNSACCEPT (SA_INT)16
- #define SECURITY_DNSDENY (SA_INT)17
- #define SECURITY_SIPACCEPT (SA_INT)18
- #define SECURITY_SIPDENY (SA_INT)19
- #define SECURITY_HOSTREDIRECT (SA_INT)20
- #define SECURITY_TFTPACCEPT (SA_INT)21
- #define SECURITY_TFTPDENY (SA_INT)22
-
-
- /*
- ** Sambar Server/Security Function Prototypes
- */
- #if defined(__cplusplus)
- extern "C" {
- #endif /* defined(__cplusplus) */
-
- extern SA_RETCODE SA_EXPORT security_init(SA_CTX *sactx);
- extern SA_RETCODE SA_EXPORT security_exit(SA_CTX *sactx);
- extern SA_RETCODE SA_EXPORT security_request(SA_CTX *sactx, SA_CONN *saconn,
- SA_CHAR *uri, SA_INT urilen,
- SA_PARAMS *saparams, SA_INT *infop);
- extern SA_RETCODE SA_EXPORT security_connect(SA_CTX *sactx, SA_CHAR *ipaddr,
- SA_INT servertype);
- extern SA_RETCODE SA_EXPORT security_filter(SA_CTX *sactx, SA_CONN *conn,
- SA_CHAR *host, SA_INT hostlen,
- SA_CHAR *url, SA_INT urllen);
- extern SA_RETCODE SA_PUBLIC security_showsec(SA_CTX *sactx, SA_CONN *saconn,
- SA_PARAMS *saparams, SA_INT *infop);
- extern SA_RETCODE SA_PUBLIC security_reload(SA_CTX *sactx, SA_CONN *saconn,
- SA_PARAMS *saparams, SA_INT *infop);
-
- #if defined(__cplusplus)
- }
- #endif /* defined(__cplusplus) */
-
- #endif /* __SECURITY_H__ */
-