A brief file description. More...
#include "libts.h"
Go to the source code of this file.
Functions | |
char * | readIntoBuffer (const char *file_path, const char *module_name, int *read_size_ptr) |
int | unescapifyStr (char *buffer) |
char const * | ExtractIpRange (char *match_str, in_addr_t *min, in_addr_t *max) |
Convenience overload for IPv4. | |
const char * | ExtractIpRange (char *match_str, sockaddr *addr1, sockaddr *addr2) |
Extract an IP range. | |
char * | tokLine (char *buf, char **last, char cont) |
const char * | processDurationString (char *str, int *seconds) |
const char * | parseConfigLine (char *line, matcher_line *p_line, const matcher_tags *tags) |
Variables | |
const char * | matcher_type_str [] |
const matcher_tags | http_dest_tags |
const matcher_tags | ip_allow_tags |
const matcher_tags | socks_server_tags |
A brief file description.
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 MatcherUtils.cc.
char const* ExtractIpRange | ( | char * | match_str, | |
in_addr_t * | min, | |||
in_addr_t * | max | |||
) |
Convenience overload for IPv4.
[in,out] | min | Returned address in host order. |
[in,out] | max | Returned address in host order. |
Definition at line 140 of file MatcherUtils.cc.
References ats_ip4_addr_cast(), ats_is_ip4(), ExtractIpRange(), and IpEndpoint::sa.
Referenced by ExtractIpRange(), IpMatcher< Data, Result >::NewEntry(), remap_validate_filter_args(), and TSMatcherExtractIPRange().
const char* ExtractIpRange | ( | char * | match_str, | |
sockaddr * | min, | |||
sockaddr * | max | |||
) |
Extract an IP range.
min and max should be at least the size of sockaddr_in6
to hold an IP address.
Definition at line 169 of file MatcherUtils.cc.
References a, ats_ip4_addr_cast(), ats_ip4_set(), ats_ip_addr_cmp(), ats_ip_copy(), ats_ip_pton(), ats_is_ip4(), Tokenizer::Initialize(), IpEndpoint::sa, and SHARE_TOKS.
const char* parseConfigLine | ( | char * | line, | |
matcher_line * | p_line, | |||
const matcher_tags * | tags | |||
) |
Definition at line 413 of file MatcherUtils.cc.
References matcher_line::dest_entry, matcher_tags::dest_error_msg, matcher_tags::empty(), ink_assert, ParseRules::is_char(), ParseRules::is_digit(), matcher_line::line, matcher_tags::match_domain, matcher_tags::match_host, matcher_tags::match_host_regex, matcher_tags::match_ip, MATCH_NONE, matcher_tags::match_regex, matcher_tags::match_url, MATCHER_MAX_TOKENS, memcpy, matcher_line::num_el, matcher_line::type, and val.
Referenced by ControlMatcher< Data, Result >::BuildTableFromString(), CacheHostTable::BuildTableFromString(), SSLParseCertificateConfiguration(), and TSMatcherParseSrcIPConfigLine().
const char* processDurationString | ( | char * | str, | |
int * | seconds | |||
) |
Definition at line 306 of file MatcherUtils.cc.
References ink_assert, and ParseRules::is_digit().
Referenced by CacheControlRecord::Init().
char* readIntoBuffer | ( | const char * | file_path, | |
const char * | module_name, | |||
int * | read_size_ptr | |||
) |
Definition at line 44 of file MatcherUtils.cc.
References _O_ATTRIB_NORMAL, ats_free(), ats_malloc(), and Error.
Referenced by ControlMatcher< Data, Result >::BuildTable(), CacheHostTable::BuildTable(), ConfigVolumes::read_config_file(), remap_parse_config_bti(), ssl_context_enable_tickets(), SSLParseCertificateConfiguration(), and TSMatcherReadIntoBuffer().
char* tokLine | ( | char * | buf, | |
char ** | last, | |||
char | cont | |||
) |
Definition at line 241 of file MatcherUtils.cc.
References start.
Referenced by remap_parse_config_bti(), SSLParseCertificateConfiguration(), and TSMatcherTokLine().
int unescapifyStr | ( | char * | buffer | ) |
Definition at line 110 of file MatcherUtils.cc.
Referenced by HttpRequestData::get_string(), StatPagesManager::handle_http(), StatPagesManager::is_cache_inspector_page(), StatPagesManager::is_stat_page(), CommandLineArgs::parse_arguments(), and ShowCache::ShowCache().
const matcher_tags http_dest_tags |
{ "dest_host", "dest_domain", "dest_ip", "url_regex", "url", "host_regex", true }
Definition at line 391 of file MatcherUtils.cc.
Referenced by initCacheControl(), ParentConfig::reconfigure(), and reloadCacheControl().
const matcher_tags ip_allow_tags |
{ NULL, NULL, "src_ip", NULL, NULL, NULL, false }
Definition at line 395 of file MatcherUtils.cc.
Referenced by TSMatcherParseSrcIPConfigLine().
const char* matcher_type_str[] |
{ "invalid", "host", "domain", "ip", "url_regex", "url", "host_regex" }
Definition at line 279 of file MatcherUtils.cc.
{ NULL, NULL, "dest_ip", NULL, NULL, NULL, false }
Definition at line 399 of file MatcherUtils.cc.
Referenced by ControlMatcher< Data, Result >::BuildTableFromString(), and SocksServerConfig::reconfigure().