A brief file description. More...
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | _info_t |
struct | _state_t |
struct | _transition_t |
Defines | |
#define | SIZEOF(t) (sizeof (t) / (sizeof ((t)[0]))) |
Typedefs | |
typedef struct _info_t | info_t |
typedef struct _state_t | state_t |
typedef struct _transition_t | transition_t |
Functions | |
state_t * | mkstate () |
transition_t * | mktransition () |
void | prstate (state_t *state) |
void | add_states (state_t *state, info_t *info, int pos) |
void | prtable (const char *type, const char *name, int *table, int size) |
int | mkmap (state_t *state) |
void | mkaccept (state_t *state, const char *defvalue) |
void | mkprefix (state_t *state, char *prefix, int length) |
int | checkbase (state_t *state, int base) |
void | mktranstables (state_t *state) |
void | mktables (state_t *state, const char *defvalue, int useprefix) |
const char * | rundfa (const char *buf, int length) |
void | mkdfa (info_t *infos, int ninfos, int useprefix, int debug) |
int | main (int argc, char *argv[]) |
Variables | |
info_t | fields [] |
info_t | schemes [] |
info_t | methods [] |
info_t | statuses [] |
info_t | days [] |
info_t | months [] |
info_t | connections [] |
info_t | cache_controls [] |
state_t * | start = NULL |
int | state_count = 0 |
int * | map = NULL |
int * | basetbl = NULL |
int * | nexttbl = NULL |
int * | checktbl = NULL |
const char ** | accepttbl = NULL |
char ** | prefixtbl = NULL |
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 mkdfa.c.
#define SIZEOF | ( | t | ) | (sizeof (t) / (sizeof ((t)[0]))) |
Definition at line 30 of file mkdfa.c.
Referenced by hdrtoken_hash_init(), hdrtoken_init(), http_init(), main(), and mime_init().
typedef struct _transition_t transition_t |
Definition at line 318 of file mkdfa.c.
References mkstate(), mktransition(), _info_t::name, _info_t::namelen, _transition_t::next, _transition_t::state, _state_t::transitions, _transition_t::value, _info_t::value, and _state_t::value.
Referenced by mkdfa().
int checkbase | ( | state_t * | state, | |
int | base | |||
) |
Definition at line 438 of file mkdfa.c.
References checktbl, map, _transition_t::next, _state_t::transitions, and _transition_t::value.
Referenced by mktranstables().
int main | ( | int | argc, | |
char * | argv[] | |||
) |
void mkaccept | ( | state_t * | state, | |
const char * | defvalue | |||
) |
Definition at line 404 of file mkdfa.c.
References accepttbl, _transition_t::next, _state_t::num, _transition_t::state, _state_t::transitions, and _state_t::value.
Referenced by mktables().
void mkdfa | ( | info_t * | infos, | |
int | ninfos, | |||
int | useprefix, | |||
int | debug | |||
) |
Definition at line 583 of file mkdfa.c.
References add_states(), mkstate(), mktables(), and prstate().
Referenced by main().
int mkmap | ( | state_t * | state | ) |
Definition at line 381 of file mkdfa.c.
References map, _transition_t::next, _transition_t::state, _state_t::transitions, and _transition_t::value.
Referenced by mktables().
void mkprefix | ( | state_t * | state, | |
char * | prefix, | |||
int | length | |||
) |
Definition at line 421 of file mkdfa.c.
References _transition_t::next, _state_t::num, prefixtbl, _transition_t::state, _state_t::transitions, and _transition_t::value.
Referenced by mktables().
state_t* mkstate | ( | ) |
Definition at line 268 of file mkdfa.c.
References _state_t::num, state_count, _state_t::transitions, and _state_t::value.
Referenced by add_states(), and mkdfa().
void mktables | ( | state_t * | state, | |
const char * | defvalue, | |||
int | useprefix | |||
) |
Definition at line 486 of file mkdfa.c.
References accepttbl, basetbl, checktbl, map, mkaccept(), mkmap(), mkprefix(), mktranstables(), nexttbl, prefixtbl, prtable(), and state_count.
Referenced by mkdfa().
transition_t* mktransition | ( | ) |
Definition at line 281 of file mkdfa.c.
References _transition_t::next, _transition_t::state, and _transition_t::value.
Referenced by add_states().
void mktranstables | ( | state_t * | state | ) |
Definition at line 453 of file mkdfa.c.
References assert, basetbl, checkbase(), checktbl, map, _transition_t::next, nexttbl, _state_t::num, _transition_t::state, state_count, _state_t::transitions, and _transition_t::value.
Referenced by mktables().
void prstate | ( | state_t * | state | ) |
Definition at line 294 of file mkdfa.c.
References _transition_t::next, _state_t::num, _transition_t::state, _state_t::transitions, _transition_t::value, and _state_t::value.
Referenced by mkdfa().
void prtable | ( | const char * | type, | |
const char * | name, | |||
int * | table, | |||
int | size | |||
) |
Definition at line 358 of file mkdfa.c.
Referenced by mktables().
const char* rundfa | ( | const char * | buf, | |
int | length | |||
) |
const char** accepttbl = NULL |
Definition at line 263 of file mkdfa.c.
Referenced by mkaccept(), mktables(), and rundfa().
int* basetbl = NULL |
Definition at line 260 of file mkdfa.c.
Referenced by mktables(), mktranstables(), and rundfa().
{ {"max-age", "HTTP_CACHE_DIRECTIVE_MAX_AGE", -1}, {"max-stale", "HTTP_CACHE_DIRECTIVE_MAX_STALE", -1}, {"min-fresh", "HTTP_CACHE_DIRECTIVE_MIN_FRESH", -1}, {"must-revalidate", "HTTP_CACHE_DIRECTIVE_MUST_REVALIDATE", -1}, {"no-cache", "HTTP_CACHE_DIRECTIVE_NO_CACHE", -1}, {"no-store", "HTTP_CACHE_DIRECTIVE_NO_STORE", -1}, {"no-transform", "HTTP_CACHE_DIRECTIVE_NO_TRANSFORM", -1}, {"only-if-cached", "HTTP_CACHE_DIRECTIVE_ONLY_IF_CACHED", -1}, {"private", "HTTP_CACHE_DIRECTIVE_PRIVATE", -1}, {"proxy-revalidate", "HTTP_CACHE_DIRECTIVE_PROXY_REVALIDATE", -1}, {"public", "HTTP_CACHE_DIRECTIVE_PUBLIC", -1}, {"s-maxage", "HTTP_CACHE_DIRECTIVE_S_MAX_AGE", -1}, {NULL, "HTTP_CACHE_DIRECTIVE_CACHE_EXTENSION", -1}, }
int* checktbl = NULL |
Definition at line 262 of file mkdfa.c.
Referenced by checkbase(), mktables(), mktranstables(), and rundfa().
{ {"CLOSE", "HTTP_CONNECTION_CLOSE", -1}, {"KEEP-ALIVE", "HTTP_CONNECTION_KEEP_ALIVE", -1}, {NULL, "HTTP_CONNECTION_NONE", -1}, }
Definition at line 233 of file mkdfa.c.
Referenced by check_net_throttle(), HttpSM::do_http_server_open(), and ShowNet::showSingleThread().
{ {"Fri", "FRIDAY", -1}, {"Friday", "FRIDAY", -1}, {"Mon", "MONDAY", -1}, {"Monday", "MONDAY", -1}, {"Sat", "SATURDAY", -1}, {"Saturday", "SATURDAY", -1}, {"Sun", "SUNDAY", -1}, {"Sunday", "SUNDAY", -1}, {"Thu", "THURSDAY", -1}, {"Thursday", "THURSDAY", -1}, {"Tue", "TUESDAY", -1}, {"Tuesday", "TUESDAY", -1}, {"Wed", "WEDNESDAY", -1}, {"Wednesday", "WEDNESDAY", -1}, {NULL, "UNKNOWN_DAY", -1}, }
Definition at line 199 of file mkdfa.c.
Referenced by convert_tm(), mime_days_since_epoch_to_mdy_slowcase(), and mime_parse_date().
Definition at line 59 of file mkdfa.c.
Referenced by resolve_logfield_string().
int* map = NULL |
Definition at line 259 of file mkdfa.c.
Referenced by build_vol_hash_table(), checkbase(), RemapProcessor::finish_remap(), IpMap_Basic(), IpMap_Fill(), IpMap_Unmark(), mkmap(), mktables(), mktranstables(), RemapProcessor::perform_remap(), RemapPlugins::run_plugin(), RemapPlugins::run_single_remap(), and rundfa().
{ {"CONNECT", "HTTP_METHOD_CONNECT", -1}, {"DELETE", "HTTP_METHOD_DELETE", -1}, {"GET", "HTTP_METHOD_GET", -1}, {"HEAD", "HTTP_METHOD_HEAD", -1}, {"HTTP/", "HTTP_METHOD_HTTP", -1}, {"OPTIONS", "HTTP_METHOD_OPTIONS", -1}, {"POST", "HTTP_METHOD_POST", -1}, {"PURGE", "HTTP_METHOD_PURGE", -1}, {"PUT", "HTTP_METHOD_PUT", -1}, {"TRACE", "HTTP_METHOD_TRACE", -1}, {NULL, "HTTP_METHOD_NONE", 0}, }
Definition at line 144 of file mkdfa.c.
Referenced by HttpTransactHeaders::insert_supported_methods_in_response().
{ {"Apr", "APRIL", -1}, {"Aug", "AUGUST", -1}, {"Dec", "DECEMBER", -1}, {"Feb", "FEBRUARY", -1}, {"Jan", "JANUARY", -1}, {"Jul", "JULY", -1}, {"Jun", "JUNE", -1}, {"Mar", "MARCH", -1}, {"May", "MAY", -1}, {"Nov", "NOVEMBER", -1}, {"Oct", "OCTOBER", -1}, {"Sep", "SEPTEMBER", -1}, {NULL, "UNKNOWN_MONTH", -1}, }
Definition at line 217 of file mkdfa.c.
Referenced by mime_days_since_epoch_to_mdy_slowcase(), and AppVersionInfo::setup().
int* nexttbl = NULL |
Definition at line 261 of file mkdfa.c.
Referenced by mktables(), mktranstables(), and rundfa().
char** prefixtbl = NULL |
Definition at line 264 of file mkdfa.c.
Referenced by mkprefix(), and mktables().
{ {"file", "URL_SCHEME_FILE", 0}, {"ftp", "URL_SCHEME_FTP", 0}, {"gopher", "URL_SCHEME_GOPHER", 0}, {"http", "URL_SCHEME_HTTP", 0}, {"https", "URL_SCHEME_HTTPS", 0}, {"mailto", "URL_SCHEME_MAILTO", 0}, {"news", "URL_SCHEME_NEWS", 0}, {"nntp", "URL_SCHEME_NNTP", 0}, {"prospero", "URL_SCHEME_PROSPERO", 0}, {"telnet", "URL_SCHEME_TELNET", 0}, {"wais", "URL_SCHEME_WAIS", 0}, {NULL, "URL_SCHEME_NONE", 0}, }
Definition at line 256 of file mkdfa.c.
Referenced by StrListOverflow::alloc(), UpdateEntry::BuildHttpRequest(), CB_After_Cache_Init(), FetchSM::ext_read_data(), iobufferblock_clone(), iobufferblock_memcpy(), CoreUtils::load_http_hdr(), main(), HdrHeap::marshal(), ts::config::Path::Parser::parse(), LogFormat::parse_escape_string(), LogFormat::parse_format_string(), HttpConfig::parse_ports_list(), HttpSM::parse_range_and_compare(), HTTPHdr::parse_req(), HTTPHdr::parse_resp(), HttpConfig::parse_url_expansions(), acl_filter_rule::print(), LogFile::roll(), SDK_API_TSHttpHdrParse(), SDK_API_TSMimeHdrParse(), SDK_API_TSUrlParse(), spdy_recv_callback(), HttpSM::state_read_push_response_header(), tokLine(), and RangeTransform::transform_to_range().
int state_count = 0 |
Definition at line 257 of file mkdfa.c.
Referenced by mkstate(), mktables(), and mktranstables().