OSDN Git Service

Deleted additional tool
[ultramonkey-l7/ultramonkey-l7-v2.git] / module / protocol / module_http.h
1 /**********************************************************************
2  * module_http.h                                               May 2007 
3  *
4  * L7VSD: Linux Virtual Server for Layer7 Load Balancing
5  * Copyright (C) 2005  NTT COMWARE Corporation.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA
21  *
22  **********************************************************************/
23 #ifndef MODULE_HTTP_H
24 #define MODULE_HTTP_H
25
26 #define EXPIRE_MAXSIZE    (64)
27
28 //
29 // functions
30 //
31
32 extern void  http_cookie_expire(time_t expire_t, char* expire_c);
33 extern int   http_check_response_status(char *res);
34 extern char* http_check_request_method(char *req, size_t *length);
35 extern void  http_encode_address(char *encoded, const u_long s_addr, const u_short sin_port);
36 extern void  http_decode_address(char *encoded, u_long *s_addr, u_short *sin_port);
37 extern char* http_search_header_cookie_value(char *http_header, char *cookie_name);
38 extern char* http_search_header_set_cookie_value(char *http_header, char *cookie_name);
39 extern char* http_search_header_field(char *http_header, char *search_name);
40 extern int   http_insert_field(char *header, int offset_length, char *insert_field, int header_length);
41 extern char* http_skip_header_line(char *top_ptr);
42
43 #endif  //MODULE_HTTP_H