2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 /***************************************************************************
19 * Description: Experimental bi-directionl protocol handler. *
20 * Author: Gal Shachor <shachor@il.ibm.com> *
21 * Version: $Revision: 751213 $ *
22 ***************************************************************************/
26 #include "jk_ajp_common.h"
31 #endif /* __cplusplus */
33 #define AJP13_PROTO 13
34 #define AJP13_WS_HEADER 0x1234
35 #define AJP13_SW_HEADER 0x4142 /* 'AB' */
37 #define AJP13_DEF_HOST ("localhost")
38 #define AJP13_DEF_PORT (8009)
39 #define AJP13_READ_BUF_SIZE (8*1024)
40 #define AJP13_DEF_CACHE_SZ (1)
41 #define JK_INTERNAL_ERROR (-2)
42 #define JK_FATAL_ERROR (-3)
43 #define JK_CLIENT_ERROR (-4)
44 #define JK_SERVER_ERROR (-5)
45 #define JK_CLIENT_RD_ERROR (-6)
46 #define JK_CLIENT_WR_ERROR (-7)
47 #define JK_STATUS_ERROR (-8)
48 #define JK_STATUS_FATAL_ERROR (-9)
49 #define JK_REPLY_TIMEOUT (-10)
50 #define JK_AJP_PROTOCOL_ERROR (-11)
52 #define AJP13_MAX_SEND_BODY_SZ (DEF_BUFFER_SZ - 6)
53 #define AJP13_DEF_TIMEOUT (0) /* Idle timout for pooled connections */
56 * Message does not have a response (for example, JK_AJP13_END_RESPONSE)
58 #define JK_AJP13_ERROR -1
60 * Message does not have a response (for example, JK_AJP13_END_RESPONSE)
62 #define JK_AJP13_NO_RESPONSE 0
64 * Message have a response.
66 #define JK_AJP13_HAS_RESPONSE 1
69 * Forward a request from the web server to the servlet container.
71 #define JK_AJP13_FORWARD_REQUEST (unsigned char)2
74 * Write a body chunk from the servlet container to the web server
76 #define JK_AJP13_SEND_BODY_CHUNK (unsigned char)3
79 * Send response headers from the servlet container to the web server.
81 #define JK_AJP13_SEND_HEADERS (unsigned char)4
84 * Marks the end of response.
86 #define JK_AJP13_END_RESPONSE (unsigned char)5
89 * Marks the end of response.
91 #define JK_AJP13_GET_BODY_CHUNK (unsigned char)6
94 * Asks the container to shutdown
96 #define JK_AJP13_SHUTDOWN (unsigned char)7
99 * Told container to take control (secure login phase)
101 #define AJP13_PING_REQUEST (unsigned char)8
104 * Check if the container is alive
106 #define AJP13_CPING_REQUEST (unsigned char)10
109 * Reply from the container to alive request
111 #define AJP13_CPONG_REPLY (unsigned char)9
119 int ajp13_marshal_shutdown_into_msgb(jk_msg_buf_t *msg,
120 jk_pool_t *p, jk_logger_t *l);
124 #endif /* __cplusplus */
126 #endif /* JK_AJP13_H */