hgomez 01/06/07 07:35:50
Modified: jk/src/native/common jk_ajp14.c jk_ajp14.h
Log:
ajp14 handle now all marshall/unmarshalling.
Also use the 'AC' and 0x1235 protocol headers to
avoid conflict with ajp13.
Just to avoid having ajp13 packets on an ajp14 connection...
Revision Changes Path
1.4 +3 -2 jakarta-tomcat-connectors/jk/src/native/common/jk_ajp14.c
Index: jk_ajp14.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_ajp14.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- jk_ajp14.c 2001/06/01 10:02:02 1.3
+++ jk_ajp14.c 2001/06/07 14:35:44 1.4
@@ -56,14 +56,14 @@
/***************************************************************************
* Description: Next generation bi-directional protocol handler. *
* Author: Henri Gomez <[EMAIL PROTECTED]> *
- * Version: $Revision: 1.3 $ *
+ * Version: $Revision: 1.4 $ *
***************************************************************************/
#include "jk_global.h"
#include "jk_util.h"
#include "jk_map.h"
-#include "jk_context.h"
+#include "jk_ajp_common.h"
#include "jk_ajp14.h"
/*
@@ -581,3 +581,4 @@
{
return (ajp14_unmarshal_context_state_reply(msg, context, l));
}
+
1.3 +61 -16 jakarta-tomcat-connectors/jk/src/native/common/jk_ajp14.h
Index: jk_ajp14.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_ajp14.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jk_ajp14.h 2001/06/01 10:02:03 1.2
+++ jk_ajp14.h 2001/06/07 14:35:46 1.3
@@ -56,21 +56,25 @@
/***************************************************************************
* Description: Next generation bi-directional protocol handler. *
* Author: Henri Gomez <[EMAIL PROTECTED]> *
- * Version: $Revision: 1.2 $ *
+ * Version: $Revision: 1.3 $ *
***************************************************************************/
#ifndef JK_AJP14_H
#define JK_AJP14_H
+#include "jk_ajp_common.h"
+#include "jk_context.h"
-#include "jk_service.h"
-#include "jk_msg_buff.h"
-
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
+#define AJP14_PROTO 14
+
+#define AJP14_WS_HEADER 0x1235
+#define AJP14_SW_HEADER 0x4143 /* 'AC' */
+
#define AJP14_DEF_HOST ("localhost")
-#define AJP14_DEF_PORT (8010)
+#define AJP14_DEF_PORT (8011)
#define AJP14_READ_BUF_SIZE (8*1024)
#define AJP14_DEF_RETRY_ATTEMPTS (1)
#define AJP14_DEF_CACHE_SZ (1)
@@ -286,18 +290,59 @@
* functions defined here
*/
-int ajp14_marshal_login_init_into_msgb(jk_msg_buf_t *msg,
- jk_login_service_t *s,
- jk_logger_t *l);
-
-int ajp14_marshal_login_comp_into_msgb(jk_msg_buf_t *msg,
- jk_login_service_t *s,
- jk_logger_t *l);
-
-int ajp14_marshal_unknown_packet_into_msgb(jk_msg_buf_t *msg,
- jk_msg_buf_t *unk,
- jk_logger_t *l);
+void ajp14_compute_md5(jk_login_service_t *s,
+ jk_logger_t *l);
+int ajp14_marshal_login_init_into_msgb(jk_msg_buf_t *msg,
+
jk_login_service_t *s,
+
jk_logger_t *l);
+
+int ajp14_unmarshal_login_seed(jk_msg_buf_t *msg,
+ jk_login_service_t
*s,
+ jk_pool_t *p,
+ jk_logger_t *l);
+
+int ajp14_marshal_login_comp_into_msgb(jk_msg_buf_t *msg,
+
jk_login_service_t *s,
+
jk_logger_t *l);
+
+int ajp14_unmarshal_log_ok(jk_msg_buf_t *msg,
+ jk_login_service_t *s,
+ jk_logger_t *l);
+
+int ajp14_unmarshal_log_nok(jk_msg_buf_t *msg,
+ jk_logger_t *l);
+
+int ajp14_marshal_shutdown_into_msgb(jk_msg_buf_t *msg,
+
jk_login_service_t *s,
+
jk_logger_t *l);
+
+int ajp14_unmarshal_shutdown_nok(jk_msg_buf_t *msg,
+ jk_logger_t
*l);
+
+int ajp14_marshal_unknown_packet_into_msgb(jk_msg_buf_t *msg,
+
jk_msg_buf_t *unk,
+
jk_logger_t *l);
+
+int ajp14_marshal_context_query_into_msgb(jk_msg_buf_t *msg,
+
char *virtual,
+
jk_logger_t *l);
+
+int ajp14_unmarshal_context_info(jk_msg_buf_t *msg,
+ jk_context_t
*context,
+ jk_logger_t
*l);
+
+int ajp14_marshal_context_state_into_msgb(jk_msg_buf_t *msg,
+
jk_context_t *context,
+
jk_logger_t *l);
+
+int ajp14_unmarshal_context_state_reply(jk_msg_buf_t *msg,
+
jk_context_t *context,
+
jk_logger_t *l);
+
+int ajp14_unmarshal_context_update_cmd(jk_msg_buf_t *msg,
+
jk_context_t *context,
+
jk_logger_t *l);
#ifdef __cplusplus
}