Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 #ifndef REMAPCONFIG_H_E862FB4C_EFFC_4F2A_8BF2_9AB6E1E5E9CF
00025 #define REMAPCONFIG_H_E862FB4C_EFFC_4F2A_8BF2_9AB6E1E5E9CF
00026 
00027 #include "AclFiltering.h"
00028 
00029 class UrlRewrite;
00030 
00031 #define BUILD_TABLE_MAX_ARGS 2048
00032 
00033 
00034 #define REMAP_OPTFLG_MAP_WITH_REFERER 0x01      
00035 #define REMAP_OPTFLG_PLUGIN           0x02      
00036 #define REMAP_OPTFLG_PPARAM           0x04      
00037 #define REMAP_OPTFLG_METHOD           0x08      
00038 #define REMAP_OPTFLG_SRC_IP           0x10      
00039 #define REMAP_OPTFLG_ACTION           0x20      
00040 #define REMAP_OPTFLG_MAP_ID          0x800      
00041 #define REMAP_OPTFLG_INVERT     0x80000000      
00042 #define REMAP_OPTFLG_ALL_FILTERS (REMAP_OPTFLG_METHOD|REMAP_OPTFLG_SRC_IP|REMAP_OPTFLG_ACTION)
00043 
00044 struct BUILD_TABLE_INFO
00045 {
00046   BUILD_TABLE_INFO();
00047   ~BUILD_TABLE_INFO();
00048 
00049   unsigned long remap_optflg;
00050   int paramc;
00051   int argc;
00052   char *paramv[BUILD_TABLE_MAX_ARGS];
00053   char *argv[BUILD_TABLE_MAX_ARGS];
00054 
00055   acl_filter_rule *rules_list;  
00056   UrlRewrite *  rewrite;        
00057 
00058   
00059   void reset();
00060 
00061 private:
00062   BUILD_TABLE_INFO(const BUILD_TABLE_INFO&); 
00063   BUILD_TABLE_INFO& operator=(const BUILD_TABLE_INFO&); 
00064 
00065 };
00066 
00067 const char *
00068 remap_parse_directive(BUILD_TABLE_INFO * bti, char * errbuf, size_t errbufsize);
00069 
00070 const char *
00071 remap_validate_filter_args(acl_filter_rule ** rule_pp, const char ** argv, int argc, char * errStrBuf, size_t errStrBufSize);
00072 
00073 unsigned long
00074 remap_check_option(const char ** argv, int argc, unsigned long findmode = 0, int *_ret_idx = NULL, const char ** argptr = NULL);
00075 
00076 bool
00077 remap_parse_config(const char * path, UrlRewrite * rewrite);
00078 
00079 #endif