A brief file description. More...
#include "HdrHeap.h"
#include "MIME.h"
#include "HTTP.h"
#include "Tokenizer.h"
#include "Diags.h"
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
Go to the source code of this file.
Enumerations | |
enum | hdr_type { UNKNOWN_HDR, REQUEST_HDR, RESPONSE_HDR, HTTP_INFO_HDR, RAW_MBUFFER, UNKNOWN_HDR, REQUEST_HDR, RESPONSE_HDR, HTTP_INFO_HDR, RAW_MBUFFER } |
Functions | |
char * | load_string (const char *s, int len, int offset) |
void | process_http_hdr_impl (HdrHeapObjImpl *obj, int offset) |
void | process_mime_block_impl (MIMEFieldBlockImpl *mblock, int offset) |
void | process_mime_hdr_impl (HdrHeapObjImpl *obj, int offset) |
void | loop_over_heap_objs (HdrHeap *hdr_heap, int offset) |
void | load_buffer (int fd, hdr_type h_type) |
int | main (int argc, const char *argv[]) |
Variables | |
void * | low_load_addr = NULL |
void * | high_load_addr = NULL |
int | heap_load_size = 0 |
int | marshalled = 0 |
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 proxy/hdrs/load_http_hdr.cc.
enum hdr_type |
UNKNOWN_HDR | |
REQUEST_HDR | |
RESPONSE_HDR | |
HTTP_INFO_HDR | |
RAW_MBUFFER | |
UNKNOWN_HDR | |
REQUEST_HDR | |
RESPONSE_HDR | |
HTTP_INFO_HDR | |
RAW_MBUFFER |
Definition at line 65 of file proxy/hdrs/load_http_hdr.cc.
void load_buffer | ( | int | fd, | |
hdr_type | h_type | |||
) |
Definition at line 204 of file proxy/hdrs/load_http_hdr.cc.
References ats_malloc(), HDR_BUF_MAGIC_MARSHALED, heap_load_size, high_load_addr, Tokenizer::Initialize(), loop_over_heap_objs(), low_load_addr, HdrHeap::m_data_start, HdrHeap::m_free_start, StrHeapDesc::m_heap_start, HdrHeap::m_magic, HdrHeap::m_ronly_heap, and marshalled.
char* load_string | ( | const char * | s, | |
int | len, | |||
int | offset | |||
) |
Definition at line 75 of file proxy/hdrs/load_http_hdr.cc.
References ats_malloc(), heap_load_size, high_load_addr, low_load_addr, marshalled, and memcpy.
Referenced by process_http_hdr_impl(), and process_mime_block_impl().
void loop_over_heap_objs | ( | HdrHeap * | hdr_heap, | |
int | offset | |||
) |
Definition at line 151 of file proxy/hdrs/load_http_hdr.cc.
References HDR_BUF_MAGIC_MARSHALED, HDR_HEAP_OBJ_EMPTY, HDR_HEAP_OBJ_FIELD_BLOCK, HDR_HEAP_OBJ_HTTP_HEADER, HDR_HEAP_OBJ_MIME_HEADER, HDR_HEAP_OBJ_URL, HDR_PTR_SIZE, HdrHeap::m_data_start, HdrHeap::m_free_start, HdrHeapObjImpl::m_length, HdrHeap::m_magic, HdrHeap::m_size, HdrHeapObjImpl::m_type, process_http_hdr_impl(), process_mime_hdr_impl(), and ROUND.
Referenced by load_buffer().
int main | ( | int | argc, | |
const char * | argv[] | |||
) |
Definition at line 307 of file proxy/hdrs/load_http_hdr.cc.
References diags, http_init(), and load_buffer().
void process_http_hdr_impl | ( | HdrHeapObjImpl * | obj, | |
int | offset | |||
) |
Definition at line 95 of file proxy/hdrs/load_http_hdr.cc.
References ats_free(), HTTP_TYPE_REQUEST, HTTP_TYPE_RESPONSE, load_string(), HTTPHdrImpl::m_polarity, HTTPHdrImpl::req, HTTPHdrImpl::resp, and HTTPHdrImpl::u.
Referenced by loop_over_heap_objs().
void process_mime_block_impl | ( | MIMEFieldBlockImpl * | mblock, | |
int | offset | |||
) |
Definition at line 115 of file proxy/hdrs/load_http_hdr.cc.
References ats_free(), ats_strdup, hdrtoken_index_to_wks(), hdrtoken_is_valid_wks_idx(), load_string(), MIMEFieldBlockImpl::m_field_slots, MIMEFieldBlockImpl::m_freetop, MIMEField::m_len_name, MIMEField::m_len_value, MIMEField::m_ptr_name, MIMEField::m_ptr_value, MIMEField::m_wks_idx, and MIME_FIELD_BLOCK_SLOTS.
Referenced by process_mime_hdr_impl().
void process_mime_hdr_impl | ( | HdrHeapObjImpl * | obj, | |
int | offset | |||
) |
Definition at line 142 of file proxy/hdrs/load_http_hdr.cc.
References MIMEHdrImpl::m_first_fblock, and process_mime_block_impl().
Referenced by loop_over_heap_objs().
int heap_load_size = 0 |
Definition at line 60 of file proxy/hdrs/load_http_hdr.cc.
Referenced by load_buffer(), and load_string().
void* high_load_addr = NULL |
Definition at line 59 of file proxy/hdrs/load_http_hdr.cc.
Referenced by load_buffer(), and load_string().
void* low_load_addr = NULL |
Definition at line 58 of file proxy/hdrs/load_http_hdr.cc.
Referenced by load_buffer(), and load_string().
int marshalled = 0 |
Definition at line 61 of file proxy/hdrs/load_http_hdr.cc.
Referenced by load_buffer(), and load_string().