/usr/src/redhat/BUILD/httpd-2.2.3/modules/proxy/ajp.h

説明を見る。
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00026 #ifndef AJP_H
00027 #define AJP_H
00028 
00029 #include "apr_version.h"
00030 #include "apr.h"
00031 
00032 #include "apr_hooks.h"
00033 #include "apr_lib.h"
00034 #include "apr_strings.h"
00035 #include "apr_buckets.h"
00036 #include "apr_md5.h"
00037 #include "apr_network_io.h"
00038 #include "apr_poll.h"
00039 #include "apr_pools.h"
00040 #include "apr_strings.h"
00041 #include "apr_uri.h"
00042 #include "apr_date.h"
00043 #include "apr_fnmatch.h"
00044 #define APR_WANT_STRFUNC
00045 #include "apr_want.h"
00046 
00047 #if APR_HAVE_NETINET_IN_H
00048 #include <netinet/in.h>
00049 #endif
00050 #if APR_HAVE_ARPA_INET_H
00051 #include <arpa/inet.h>
00052 #endif
00053 
00054 #define AJP13_DEF_HOST "127.0.0.1"
00055 #ifdef NETWARE
00056 #define AJP13_DEF_PORT 9009     /* default to 9009 since 8009 is used by OS */
00057 #else
00058 #define AJP13_DEF_PORT 8009
00059 #endif
00060 
00061 /* The following environment variables match mod_ssl! */
00062 #define AJP13_HTTPS_INDICATOR           "HTTPS"
00063 #define AJP13_SSL_CLIENT_CERT_INDICATOR "SSL_CLIENT_CERT"
00064 #define AJP13_SSL_CIPHER_INDICATOR      "SSL_CIPHER"
00065 #define AJP13_SSL_SESSION_INDICATOR     "SSL_SESSION_ID"
00066 #define AJP13_SSL_KEY_SIZE_INDICATOR    "SSL_CIPHER_USEKEYSIZE"
00067 
00068 #if APR_CHARSET_EBCDIC
00069 
00070 #define USE_CHARSET_EBCDIC
00071 #define ajp_xlate_to_ascii(b, l) ap_xlate_proto_to_ascii(b, l)
00072 #define ajp_xlate_from_ascii(b, l) ap_xlate_proto_from_ascii(b, l)
00073 
00074 #else                           /* APR_CHARSET_EBCDIC */
00075 
00076 #define ajp_xlate_to_ascii(b, l) 
00077 #define ajp_xlate_from_ascii(b, l) 
00078 
00079 #endif
00080 
00081 #ifdef AJP_USE_HTTPD_WRAP
00082 #include "httpd_wrap.h"
00083 #else
00084 #include "httpd.h"
00085 #include "http_config.h"
00086 #include "http_request.h"
00087 #include "http_core.h"
00088 #include "http_protocol.h"
00089 #include "http_main.h"
00090 #include "http_log.h"
00091 #endif
00092 
00093 #include "mod_proxy.h"
00094 
00095 
00099 #define AJP_EOVERFLOW           (APR_OS_START_USERERR + 1) 
00100 
00101 #define AJP_ETOSMALL            (APR_OS_START_USERERR + 2) 
00102 
00103 #define AJP_EINVAL              (APR_OS_START_USERERR + 3) 
00104 
00105 #define AJP_EBAD_SIGNATURE      (APR_OS_START_USERERR + 4) 
00106 
00107 #define AJP_ETOBIG              (APR_OS_START_USERERR + 5) 
00108 
00109 #define AJP_ENO_HEADER          (APR_OS_START_USERERR + 6) 
00110 
00111 #define AJP_EBAD_HEADER         (APR_OS_START_USERERR + 7) 
00112 
00113 #define AJP_EBAD_MESSAGE        (APR_OS_START_USERERR + 8) 
00114 
00115 #define AJP_ELOGFAIL            (APR_OS_START_USERERR + 9) 
00116 
00117 #define AJP_EBAD_METHOD         (APR_OS_START_USERERR + 10) 
00118 
00119 
00121 typedef struct ajp_msg ajp_msg_t;
00122 
00124 struct ajp_msg
00125 {
00127     apr_byte_t  *buf;
00129     apr_size_t  header_len;
00131     apr_size_t  len;
00133     apr_size_t  pos;
00135     apr_size_t max_size;
00137     int         server_side;
00138 };
00139 
00143 #define AJP13_WS_HEADER             0x1234
00144 #define AJP_HEADER_LEN              4
00145 #define AJP_HEADER_SZ_LEN           2
00146 #define AJP_HEADER_SZ               6
00147 #define AJP_MSG_BUFFER_SZ           8192
00148 #define AJP_MAX_BUFFER_SZ           65536
00149 #define AJP13_MAX_SEND_BODY_SZ      (AJP_MAX_BUFFER_SZ - AJP_HEADER_SZ)
00150 #define AJP_PING_PONG_SZ            128
00151 
00153 #define CMD_AJP13_FORWARD_REQUEST   (unsigned char)2
00154 
00155 #define CMD_AJP13_SEND_BODY_CHUNK   (unsigned char)3
00156 
00157 #define CMD_AJP13_SEND_HEADERS      (unsigned char)4
00158 
00159 #define CMD_AJP13_END_RESPONSE      (unsigned char)5
00160 
00161 #define CMD_AJP13_GET_BODY_CHUNK    (unsigned char)6
00162 
00163 #define CMD_AJP13_SHUTDOWN          (unsigned char)7
00164 
00165 #define CMD_AJP13_PING              (unsigned char)8
00166 
00167 #define CMD_AJP13_CPONG             (unsigned char)9
00168 
00169 #define CMD_AJP13_CPING             (unsigned char)10
00170 
00185 apr_status_t ajp_msg_check_header(ajp_msg_t *msg, apr_size_t *len);
00186 
00193 apr_status_t ajp_msg_reset(ajp_msg_t *msg);
00194 
00201 apr_status_t ajp_msg_reuse(ajp_msg_t *msg);
00202 
00209 apr_status_t ajp_msg_end(ajp_msg_t *msg);
00210 
00218 apr_status_t ajp_msg_append_uint32(ajp_msg_t *msg, apr_uint32_t value);
00219 
00227 apr_status_t ajp_msg_append_uint16(ajp_msg_t *msg, apr_uint16_t value);
00228 
00236 apr_status_t ajp_msg_append_uint8(ajp_msg_t *msg, apr_byte_t value);
00237 
00247 apr_status_t ajp_msg_append_string_ex(ajp_msg_t *msg, const char *value,
00248                                       int convert);
00253 #define ajp_msg_append_string(m, v) ajp_msg_append_string_ex(m, v, 1)
00254 
00258 #define ajp_msg_append_string_ascii(m, v) ajp_msg_append_string_ex(m, v, 0)
00259 
00268 apr_status_t ajp_msg_append_bytes(ajp_msg_t *msg, const apr_byte_t *value,
00269                                   apr_size_t valuelen);
00270 
00278 apr_status_t ajp_msg_get_uint32(ajp_msg_t *msg, apr_uint32_t *rvalue);
00279 
00287 apr_status_t ajp_msg_get_uint16(ajp_msg_t *msg, apr_uint16_t *rvalue);
00288 
00297 apr_status_t ajp_msg_peek_uint16(ajp_msg_t *msg, apr_uint16_t *rvalue);
00298 
00306 apr_status_t ajp_msg_get_uint8(ajp_msg_t *msg, apr_byte_t *rvalue);
00307 
00316 apr_status_t ajp_msg_peek_uint8(ajp_msg_t *msg, apr_byte_t *rvalue);
00317 
00325 apr_status_t ajp_msg_get_string(ajp_msg_t *msg, const char **rvalue);
00326 
00327 
00336 apr_status_t ajp_msg_get_bytes(ajp_msg_t *msg, apr_byte_t **rvalue,
00337                                apr_size_t *rvalue_len);
00338 
00347 apr_status_t ajp_msg_create(apr_pool_t *pool, apr_size_t size, ajp_msg_t **rmsg);
00348 
00356 apr_status_t ajp_msg_copy(ajp_msg_t *smsg, ajp_msg_t *dmsg);
00357 
00368 apr_status_t ajp_msg_serialize_ping(ajp_msg_t *msg);
00369 
00380 apr_status_t ajp_msg_serialize_cping(ajp_msg_t *msg);
00381 
00390 char * ajp_msg_dump(apr_pool_t *pool, ajp_msg_t *msg, char *err);
00391 
00399 apr_status_t ajp_ilink_send(apr_socket_t *sock, ajp_msg_t *msg);
00400 
00408 apr_status_t ajp_ilink_receive(apr_socket_t *sock, ajp_msg_t *msg);
00409 
00418 apr_status_t ajp_send_header(apr_socket_t *sock, request_rec *r,
00419                              apr_size_t buffsize,
00420                              apr_uri_t *uri);
00421 
00430 apr_status_t ajp_read_header(apr_socket_t *sock,
00431                              request_rec  *r,
00432                              apr_size_t buffsize,
00433                              ajp_msg_t **msg);
00434 
00443 apr_status_t  ajp_alloc_data_msg(apr_pool_t *pool, char **ptr,
00444                                  apr_size_t *len, ajp_msg_t **msg);
00445 
00453 apr_status_t  ajp_send_data_msg(apr_socket_t *sock,
00454                                 ajp_msg_t *msg, apr_size_t len);
00455 
00462 int ajp_parse_type(request_rec  *r, ajp_msg_t *msg);
00463 
00470 apr_status_t ajp_parse_header(request_rec *r, proxy_dir_conf *conf,
00471                               ajp_msg_t *msg);
00472 
00481 apr_status_t  ajp_parse_data(request_rec  *r, ajp_msg_t *msg,
00482                              apr_uint16_t *len, char **ptr);
00483 
00484 
00492 apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock,
00493                                     request_rec *r,
00494                                     apr_interval_time_t timeout);
00497 #endif /* AJP_H */
00498 

Apacheに対してSun Jul 19 22:05:23 2009に生成されました。  doxygen 1.4.7