tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_ajp14.h
Date Wed, 12 Dec 2001 21:40:53 GMT
costin      01/12/12 13:40:53

  Modified:    jk/native2/common jk_ajp14.h
  Log:
  Removed most of the stuff from ajp14, moved to individual handlers.
  
  We must start making the distinction between 'protocol' and 'api'.
  
  jk supports 'ajp13' protocol, 'jni' protocol, etc. It could also support warp
  protocol or even a (minimal) IIOP.
  
  The API is the set of messages we use - confusingly called 'ajp13', 'ajp14', etc.
  All the details about message is implemented in message handlers, which are
  independent ( or should be ) of the protocol.
  
  Revision  Changes    Path
  1.3       +14 -171   jakarta-tomcat-connectors/jk/native2/common/jk_ajp14.h
  
  Index: jk_ajp14.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_ajp14.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_ajp14.h	2001/12/04 18:40:42	1.2
  +++ jk_ajp14.h	2001/12/12 21:40:53	1.3
  @@ -58,14 +58,14 @@
   /***************************************************************************
    * Description: Next generation bi-directional protocol handler.           *
    * Author:      Henri Gomez <hgomez@slib.fr>                               *
  - * Version:     $Revision: 1.2 $                                           *
  + * Version:     $Revision: 1.3 $                                           *
    ***************************************************************************/
   #ifndef JK_AJP14_H
   #define JK_AJP14_H
   
   #include "jk_global.h"
   #include "jk_mt.h"
  -#include "jk_msg_buff.h"
  +#include "jk_msg.h"
   #include "jk_pool.h"
   #include "jk_logger.h"
   #include "jk_service.h"
  @@ -76,186 +76,29 @@
   extern "C" {
   #endif /* __cplusplus */
   
  -    
  -#define AJP_DEF_RETRY_ATTEMPTS    (1)
  -
  -#define AJP_HEADER_LEN            (4)
  -#define AJP_HEADER_SZ_LEN         (2)
  -#define CHUNK_BUFFER_PAD          (12)
  -
  -#define AJP13_PROTO					13
  -#define AJP13_WS_HEADER				0x1234
  -#define AJP13_SW_HEADER				0x4142	/* 'AB' */
  -
  -#define AJP13_DEF_HOST            	("localhost")
  -#define AJP13_DEF_PORT            	(8009)
  -#define AJP13_READ_BUF_SIZE         (8*1024)
  -#define AJP13_DEF_CACHE_SZ          (1)
  -#define JK_INTERNAL_ERROR       	(-2)
  -#define JK_FATAL_ERROR              (-3)
  -#define JK_CLIENT_ERROR             (-4)
  -#define AJP13_MAX_SEND_BODY_SZ      (DEF_BUFFER_SZ - 6)
  -
  -/*
  - * Message does not have a response (for example, JK_AJP13_END_RESPONSE)
  - */
  -#define JK_AJP13_ERROR              -1
  -/*
  - * Message does not have a response (for example, JK_AJP13_END_RESPONSE)
  - */
  -#define JK_AJP13_NO_RESPONSE        0
  -/*
  - * Message have a response.
  - */
  -#define JK_AJP13_HAS_RESPONSE       1
  -
  -/*
  - * Forward a request from the web server to the servlet container.
  - */
  -#define JK_AJP13_FORWARD_REQUEST    (unsigned char)2
  -
  -/*
  - * Write a body chunk from the servlet container to the web server
  - */
  -#define JK_AJP13_SEND_BODY_CHUNK    (unsigned char)3
  -
  -/*
  - * Send response headers from the servlet container to the web server.
  - */
  -#define JK_AJP13_SEND_HEADERS       (unsigned char)4
  -
  -/*
  - * Marks the end of response.
  - */
  -#define JK_AJP13_END_RESPONSE       (unsigned char)5
  -
  -/*
  - * Marks the end of response.
  - */
  -#define JK_AJP13_GET_BODY_CHUNK     (unsigned char)6
  -
  -/*
  - * Asks the container to shutdown
  - */
  -#define JK_AJP13_SHUTDOWN           (unsigned char)7
  -
  -/*
  - * Functions
  - */
  -int ajp13_marshal_shutdown_into_msgb(jk_msg_buf_t *msg,
  -                                     jk_pool_t *p,
  -                                     jk_logger_t *l);
  -
  -#define AJP14_PROTO					14
  -
  -#define AJP14_DEF_HOST         	("localhost")
  -#define AJP14_DEF_PORT         	(8011)
  -#define AJP14_READ_BUF_SIZEd    (8*1024)
  -#define AJP14_DEF_RETRY_ATTEMPTS  (1)
  -#define AJP14_DEF_CACHE_SZ      (1)
  -#define AJP14_MAX_SEND_BODY_SZ  (DEF_BUFFER_SZ - 6)
  -#define AJP14_HEADER_LEN    	(4)
  -#define AJP14_HEADER_SZ_LEN 	(2)
  -
  -/*
  - * Servlet Engine Status (web server -> servlet engine), what's the status of the servlet
engine ?
  - */
  -#define AJP14_STATUS_CMD	(unsigned char)0x18
  +/* Common ajp13 methods */
   
  -/*
  - * Unknown Packet Reply (web server <-> servlet engine),
  - * when a packet couldn't be decoded
  - */
  -#define AJP14_UNKNOW_PACKET_CMD		(unsigned char)0x1E
  -
  -
  -/*
  - * Negociation flags 
  - */
  -
  -/*
  - * web-server want context info after login
  - */
  -#define AJP14_CONTEXT_INFO_NEG      0x80000000 
  -
  -/*
  - * web-server want context updates
  - */
  -#define AJP14_CONTEXT_UPDATE_NEG    0x40000000 
  -
  -/*
  - * web-server want compressed stream 
  - */
  -#define AJP14_GZIP_STREAM_NEG       0x20000000 
  -
  -/*
  - * web-server want crypted DES56 stream with secret key
  - */
  -#define AJP14_DES56_STREAM_NEG      0x10000000 
  +int jk_serialize_request13(jk_msg_t    *msg,
  +                           jk_ws_service_t *s );
   
  -/*
  - * Extended info on server SSL vars
  - */
  -#define AJP14_SSL_VSERVER_NEG       0x08000000 
  +int jk_serialize_postHead(jk_msg_t   *msg,
  +                          jk_ws_service_t  *s,
  +                          jk_endpoint_t *e);
   
  -/*
  - *Extended info on client SSL vars
  - */
  -#define AJP14_SSL_VCLIENT_NEG       0x04000000 
  +int jk_serialize_shutdown(jk_msg_t *msg,
  +                          jk_ws_service_t  *r);
   
  -/*
  - * Extended info on crypto SSL vars
  +/* Send a ping message to tomcat and pass control.
    */
  -#define AJP14_SSL_VCRYPTO_NEG       0x02000000 
  +int jk_serialize_ping(jk_msg_t *msg,
  +                      jk_endpoint_t *ae );
   
  -/*
  - * Extended info on misc SSL vars
  - */
  -#define AJP14_SSL_VMISC_NEG         0x01000000 
   
  -/*
  - * mask of protocol supported 
  - */
  -#define AJP14_PROTO_SUPPORT_AJPXX_NEG   0x00FF0000 
   
  -/* 
  - * communication could use AJP14 
  - */
  -#define AJP14_PROTO_SUPPORT_AJP14_NEG   0x00010000 
   
  -/*
  - * Some failure codes
  - */
  -#define AJP14_BAD_KEY_ERR		0xFFFFFFFF
  -#define AJP14_ENGINE_DOWN_ERR		0xFFFFFFFE
  -#define AJP14_RETRY_LATER_ERR		0xFFFFFFFD
  -#define AJP14_SHUT_AUTHOR_FAILED_ERR    0xFFFFFFFC
   
  -/*
  - * Some status codes
  - */
  -#define AJP14_CONTEXT_DOWN       0x01
  -#define AJP14_CONTEXT_UP         0x02
  -#define AJP14_CONTEXT_OK         0x03
       
  -/*
  - * functions defined here 
  - */
  -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);
  -
  +    
   #ifdef __cplusplus
   }
   #endif /* __cplusplus */
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message