Remap configuration file parsing. More...
#include "AclFiltering.h"
Go to the source code of this file.
Data Structures | |
struct | BUILD_TABLE_INFO |
Defines | |
#define | BUILD_TABLE_MAX_ARGS 2048 |
#define | REMAP_OPTFLG_MAP_WITH_REFERER 0x01 |
#define | REMAP_OPTFLG_PLUGIN 0x02 |
#define | REMAP_OPTFLG_PPARAM 0x04 |
#define | REMAP_OPTFLG_METHOD 0x08 |
#define | REMAP_OPTFLG_SRC_IP 0x10 |
#define | REMAP_OPTFLG_ACTION 0x20 |
#define | REMAP_OPTFLG_MAP_ID 0x800 |
#define | REMAP_OPTFLG_INVERT 0x80000000 |
#define | REMAP_OPTFLG_ALL_FILTERS (REMAP_OPTFLG_METHOD|REMAP_OPTFLG_SRC_IP|REMAP_OPTFLG_ACTION) |
Functions | |
const char * | remap_parse_directive (BUILD_TABLE_INFO *bti, char *errbuf, size_t errbufsize) |
const char * | remap_validate_filter_args (acl_filter_rule **rule_pp, const char **argv, int argc, char *errStrBuf, size_t errStrBufSize) |
unsigned long | remap_check_option (const char **argv, int argc, unsigned long findmode=0, int *_ret_idx=NULL, const char **argptr=NULL) |
bool | remap_parse_config (const char *path, UrlRewrite *rewrite) |
Remap configuration file parsing.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file RemapConfig.h.
#define BUILD_TABLE_MAX_ARGS 2048 |
Definition at line 31 of file RemapConfig.h.
Referenced by remap_parse_config_bti().
#define REMAP_OPTFLG_ACTION 0x20 |
Definition at line 39 of file RemapConfig.h.
Referenced by remap_check_option(), and remap_validate_filter_args().
#define REMAP_OPTFLG_ALL_FILTERS (REMAP_OPTFLG_METHOD|REMAP_OPTFLG_SRC_IP|REMAP_OPTFLG_ACTION) |
Definition at line 42 of file RemapConfig.h.
Referenced by process_filter_opt().
#define REMAP_OPTFLG_INVERT 0x80000000 |
Definition at line 41 of file RemapConfig.h.
Referenced by remap_validate_filter_args().
#define REMAP_OPTFLG_MAP_ID 0x800 |
Definition at line 40 of file RemapConfig.h.
Referenced by remap_check_option(), and remap_parse_config_bti().
#define REMAP_OPTFLG_MAP_WITH_REFERER 0x01 |
Definition at line 34 of file RemapConfig.h.
Referenced by remap_check_option(), and remap_parse_config_bti().
#define REMAP_OPTFLG_METHOD 0x08 |
Definition at line 37 of file RemapConfig.h.
Referenced by remap_check_option(), and remap_validate_filter_args().
#define REMAP_OPTFLG_PLUGIN 0x02 |
Definition at line 35 of file RemapConfig.h.
Referenced by remap_check_option(), remap_load_plugin(), and remap_parse_config_bti().
#define REMAP_OPTFLG_PPARAM 0x04 |
Definition at line 36 of file RemapConfig.h.
Referenced by remap_check_option().
#define REMAP_OPTFLG_SRC_IP 0x10 |
Definition at line 38 of file RemapConfig.h.
Referenced by remap_check_option(), and remap_validate_filter_args().
unsigned long remap_check_option | ( | const char ** | argv, | |
int | argc, | |||
unsigned long | findmode = 0 , |
|||
int * | _ret_idx = NULL , |
|||
const char ** | argptr = NULL | |||
) |
Definition at line 488 of file RemapConfig.cc.
References REMAP_OPTFLG_ACTION, REMAP_OPTFLG_MAP_ID, REMAP_OPTFLG_MAP_WITH_REFERER, REMAP_OPTFLG_METHOD, REMAP_OPTFLG_PLUGIN, REMAP_OPTFLG_PPARAM, and REMAP_OPTFLG_SRC_IP.
Referenced by remap_load_plugin(), remap_parse_config_bti(), and remap_validate_filter_args().
bool remap_parse_config | ( | const char * | path, | |
UrlRewrite * | rewrite | |||
) |
Definition at line 1260 of file RemapConfig.cc.
References remap_parse_config_bti(), and BUILD_TABLE_INFO::rewrite.
Referenced by UrlRewrite::BuildTable().
const char* remap_parse_directive | ( | BUILD_TABLE_INFO * | bti, | |
char * | errbuf, | |||
size_t | errbufsize | |||
) |
Definition at line 316 of file RemapConfig.cc.
References countof, Debug, BUILD_TABLE_INFO::paramv, remap_directive::parser, and unlikely.
Referenced by remap_parse_config_bti().
const char* remap_validate_filter_args | ( | acl_filter_rule ** | rule_pp, | |
const char ** | argv, | |||
int | argc, | |||
char * | errStrBuf, | |||
size_t | errStrBufSize | |||
) |
Definition at line 338 of file RemapConfig.cc.
References ACL_FILTER_MAX_SRC_IP, acl_filter_rule::allow_flag, Debug, src_ip_info_t::end, ExtractIpRange(), HTTP_WKSIDX_CONNECT, HTTP_WKSIDX_DELETE, HTTP_WKSIDX_GET, HTTP_WKSIDX_HEAD, HTTP_WKSIDX_ICP_QUERY, HTTP_WKSIDX_OPTIONS, HTTP_WKSIDX_POST, HTTP_WKSIDX_PURGE, HTTP_WKSIDX_PUSH, HTTP_WKSIDX_PUT, HTTP_WKSIDX_TRACE, ink_strlcpy(), src_ip_info_t::invert, is_debug_tag_set, is_inkeylist(), acl_filter_rule::method_restriction_enabled, acl_filter_rule::nonstandard_methods, acl_filter_rule::print(), remap_check_option(), REMAP_OPTFLG_ACTION, REMAP_OPTFLG_INVERT, REMAP_OPTFLG_METHOD, REMAP_OPTFLG_SRC_IP, src_ip_info_t::reset(), IpEndpoint::sa, acl_filter_rule::src_ip_array, acl_filter_rule::src_ip_cnt, acl_filter_rule::src_ip_valid, acl_filter_rule::standard_method_lookup, src_ip_info_t::start, and unlikely.
Referenced by parse_define_directive(), and process_filter_opt().