You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/12/04 19:33:06 UTC
cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_service.h jk_uriEnv.h jk_worker.h
costin 01/12/04 10:33:06
Modified: jk/native2/include jk_service.h jk_uriEnv.h jk_worker.h
Log:
Consolidate data structures.
A lot of 'ajp private' information is very usefull for other workers as well.
Having it exposed in the main structure will make things simpler, and eliminates
a lot of duplication.
We do lose so 'data hiding' and private fields, but I think it's worth it.
( for example we want the jni worker to be able to use the same
discovery as the ajp14 worker )
Revision Changes Path
1.2 +12 -1 jakarta-tomcat-connectors/jk/native2/include/jk_service.h
Index: jk_service.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_service.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jk_service.h 2001/12/01 22:30:57 1.1
+++ jk_service.h 2001/12/04 18:33:05 1.2
@@ -63,7 +63,7 @@
* Author: Gal Shachor <sh...@il.ibm.com> *
* Author: Dan Milstein <da...@shore.net> *
* Author: Henri Gomez <hg...@slib.fr> *
- * Version: $Revision: 1.1 $ *
+ * Version: $Revision: 1.2 $ *
***************************************************************************/
#ifndef JK_SERVICE_H
@@ -214,6 +214,17 @@
*/
char *jvm_route;
+ /* Response informations. As in apache, we don't use a separate
+ structure for response.
+ */
+ int status;
+ const char *msg;
+ unsigned out_headers;
+ char **out_header_names;
+ char **out_header_values;
+
+
+
/*
* Callbacks into the web server. For each, the first argument is
* essentially a 'this' pointer. All return JK_TRUE on success
1.2 +3 -0 jakarta-tomcat-connectors/jk/native2/include/jk_uriEnv.h
Index: jk_uriEnv.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_uriEnv.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jk_uriEnv.h 2001/12/01 22:03:20 1.1
+++ jk_uriEnv.h 2001/12/04 18:33:05 1.2
@@ -120,6 +120,9 @@
char *context;
int contextId;
+ char *docbase;
+ int status;
+
/** Servlet. No need to compute it again in tomcat
*/
char *servlet;
1.2 +71 -1 jakarta-tomcat-connectors/jk/native2/include/jk_worker.h
Index: jk_worker.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_worker.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jk_worker.h 2001/12/01 22:30:57 1.1
+++ jk_worker.h 2001/12/04 18:33:05 1.2
@@ -58,7 +58,7 @@
/***************************************************************************
* Description: Workers controller header file *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.1 $ *
+ * Version: $Revision: 1.2 $ *
***************************************************************************/
#ifndef JK_WORKER_H
@@ -68,6 +68,7 @@
#include "jk_service.h"
#include "jk_endpoint.h"
#include "jk_map.h"
+#include "jk_mt.h"
#include "jk_uriMap.h"
#ifdef __cplusplus
@@ -79,7 +80,53 @@
struct jk_env;
typedef struct jk_worker jk_worker_t;
+
/*
+ * The login structure
+ */
+typedef struct jk_login_service jk_login_service_t;
+#define AJP14_ENTROPY_SEED_LEN 32 /* we're using MD5 => 32 chars */
+#define AJP14_COMPUTED_KEY_LEN 32 /* we're using MD5 also */
+
+struct jk_login_service {
+
+ /*
+ * Pointer to web-server name
+ */
+ char * web_server_name;
+
+ /*
+ * Pointer to servlet-engine name
+ */
+ char * servlet_engine_name;
+
+ /*
+ * Pointer to secret key
+ */
+ char * secret_key;
+
+ /*
+ * Received entropy seed
+ */
+ char entropy[AJP14_ENTROPY_SEED_LEN + 1];
+
+ /*
+ * Computed key
+ */
+ char computed_key[AJP14_COMPUTED_KEY_LEN + 1];
+
+ /*
+ * What we want to negociate
+ */
+ unsigned long negociation;
+
+ /*
+ * What we received from servlet engine
+ */
+ unsigned long negociated;
+};
+
+/*
* The worker 'class', which represents something to which the web server
* can delegate requests.
*
@@ -136,6 +183,29 @@
/** Communication channle used by the worker
*/
struct jk_channel *channel;
+
+ /* XXX Stuff from ajp, some is generic, some not - need to
+ sort out after */
+ struct sockaddr_in worker_inet_addr; /* Contains host and port */
+ unsigned connect_retry_attempts;
+
+ /*
+ * Open connections cache...
+ *
+ * 1. Critical section object to protect the cache.
+ * 2. Cache size.
+ * 3. An array of "open" endpoints.
+ */
+ JK_CRIT_SEC cs;
+ unsigned ep_cache_sz;
+ struct jk_endpoint **ep_cache;
+
+ int proto;
+ struct jk_login_service *login;
+
+ int (* logon)(struct jk_endpoint *ae,
+ jk_logger_t *l);
+
/*
* For all of the below (except destroy), the first argument is
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>