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 jk_ajp_common.h jk_connect.h jk_context.h jk_endpoint.h jk_md5.h jk_msg_buff.h jk_mt.h jk_util.h jk_version.h
Date Sat, 01 Dec 2001 22:40:10 GMT
costin      01/12/01 14:40:10

  Added:       jk/native2/common jk_ajp14.h jk_ajp_common.h jk_connect.h
                        jk_context.h jk_endpoint.h jk_md5.h jk_msg_buff.h
                        jk_mt.h jk_util.h jk_version.h
  Log:
  Remaining .h files. They will be moved to include as we update them.
  
  Revision  Changes    Path
  1.1                  jakarta-tomcat-connectors/jk/native2/common/jk_ajp14.h
  
  Index: jk_ajp14.h
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *          Copyright (c) 1999-2001 The Apache Software Foundation.          *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Jk",  and  "Apache  Software     *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  /***************************************************************************
   * Description: Next generation bi-directional protocol handler.           *
   * Author:      Henri Gomez <hgomez@slib.fr>                               *
   * Version:     $Revision: 1.1 $                                           *
   ***************************************************************************/
  #ifndef JK_AJP14_H
  #define JK_AJP14_H
  
  #include "jk_ajp_common.h"
  #include "jk_context.h"
  
  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */
  
  #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)
  
  /*
   * Context Query (web server -> servlet engine), which URI are handled by servlet engine ?
   */
  #define AJP14_CONTEXT_QRY_CMD	(unsigned char)0x15
  
  /*
   * Context Info (servlet engine -> web server), URI handled response
   */
  #define AJP14_CONTEXT_INFO_CMD	(unsigned char)0x16
  
  /* 
   * Context Update (servlet engine -> web server), status of context changed
   */
  #define AJP14_CONTEXT_UPDATE_CMD (unsigned char)0x17
  
  /*
   * Servlet Engine Status (web server -> servlet engine), what's the status of the servlet engine ?
   */
  #define AJP14_STATUS_CMD	(unsigned char)0x18
  
  /*
   * Secure Shutdown command (web server -> servlet engine),
   * please servlet stop yourself.
   */
  #define AJP14_SHUTDOWN_CMD	(unsigned char)0x19
  
  /*
   * Secure Shutdown command Accepted (servlet engine -> web server)
   */
  #define AJP14_SHUTOK_CMD	(unsigned char)0x1A
  
  /*
   * Secure Shutdown Rejected (servlet engine -> web server)
   */
  #define AJP14_SHUTNOK_CMD	(unsigned char)0x1B
  
  /*
   * Context Status (web server -> servlet engine), what's
   * the status of the context ?
   */
  #define AJP14_CONTEXT_STATE_CMD		(unsigned char)0x1C
  
  /*
   * Context Status Reply (servlet engine -> web server), status of context
   */
  #define AJP14_CONTEXT_STATE_REP_CMD	(unsigned char)0x1D
  
  /*
   * 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 
  
  /*
   * Extended info on server SSL vars
   */
  #define AJP14_SSL_VSERVER_NEG       0x08000000 
  
  /*
   *Extended info on client SSL vars
   */
  #define AJP14_SSL_VCLIENT_NEG       0x04000000 
  
  /*
   * Extended info on crypto SSL vars
   */
  #define AJP14_SSL_VCRYPTO_NEG       0x02000000 
  
  /*
   * 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
  
  /* 
   * Misc defines
   */
  #define AJP14_ENTROPY_SEED_LEN		32	/* we're using MD5 => 32 chars */
  #define AJP14_COMPUTED_KEY_LEN		32  /* we're using MD5 also */
  
  /*
   * The login structure
   */
  typedef struct jk_login_service jk_login_service_t;
  
  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;
  };                                
      
  /*
   * 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);
  
  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, 
                                            char         *cname,
                                            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
  }
  #endif /* __cplusplus */
  
  #endif /* JK_AJP14_H */
  
  
  
  1.1                  jakarta-tomcat-connectors/jk/native2/common/jk_ajp_common.h
  
  Index: jk_ajp_common.h
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *          Copyright (c) 1999-2001 The Apache Software Foundation.          *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Jk",  and  "Apache  Software     *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  /***************************************************************************
   * Description: common stuff for bi-directional protocol ajp13/ajp14.      *
   * Author:      Gal Shachor <shachor@il.ibm.com>                           *
   * Author:      Henri Gomez <hgomez@slib.fr>                               *
   * Version:     $Revision: 1.1 $                                           *
   ***************************************************************************/
  
  #ifndef JK_AJP_COMMON_H
  #define JK_AJP_COMMON_H
  
  #include "jk_service.h"
  #include "jk_msg_buff.h"
  #include "jk_mt.h"
  
  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */
  
  /*
   * Conditional request attributes
   * 
   */
  #define SC_A_CONTEXT            (unsigned char)1
  #define SC_A_SERVLET_PATH       (unsigned char)2
  #define SC_A_REMOTE_USER        (unsigned char)3
  #define SC_A_AUTH_TYPE          (unsigned char)4
  #define SC_A_QUERY_STRING       (unsigned char)5
  #define SC_A_JVM_ROUTE          (unsigned char)6
  #define SC_A_SSL_CERT           (unsigned char)7
  #define SC_A_SSL_CIPHER         (unsigned char)8
  #define SC_A_SSL_SESSION        (unsigned char)9
  #define SC_A_REQ_ATTRIBUTE      (unsigned char)10
  #define SC_A_SSL_KEY_SIZE       (unsigned char)11		/* only in if JkOptions +ForwardKeySize */
  #define SC_A_ARE_DONE           (unsigned char)0xFF
  
  /*
   * Request methods, coded as numbers instead of strings.
   * The list of methods was taken from Section 5.1.1 of RFC 2616,
   * RFC 2518, the ACL IETF draft, and the DeltaV IESG Proposed Standard.
   *          Method        = "OPTIONS"
   *                        | "GET"    
   *                        | "HEAD"   
   *                        | "POST"   
   *                        | "PUT"    
   *                        | "DELETE" 
   *                        | "TRACE"  
   *                        | "PROPFIND"
   *                        | "PROPPATCH"
   *                        | "MKCOL"
   *                        | "COPY"
   *                        | "MOVE"
   *                        | "LOCK"
   *                        | "UNLOCK"
   *                        | "ACL"
   *                        | "REPORT"
   *                        | "VERSION-CONTROL"
   *                        | "CHECKIN"
   *                        | "CHECKOUT"
   *                        | "UNCHECKOUT"
   *                        | "SEARCH"
   * 
   */
  #define SC_M_OPTIONS            (unsigned char)1
  #define SC_M_GET                (unsigned char)2
  #define SC_M_HEAD               (unsigned char)3
  #define SC_M_POST               (unsigned char)4
  #define SC_M_PUT                (unsigned char)5
  #define SC_M_DELETE             (unsigned char)6
  #define SC_M_TRACE              (unsigned char)7
  #define SC_M_PROPFIND           (unsigned char)8
  #define SC_M_PROPPATCH          (unsigned char)9
  #define SC_M_MKCOL              (unsigned char)10
  #define SC_M_COPY               (unsigned char)11
  #define SC_M_MOVE               (unsigned char)12
  #define SC_M_LOCK               (unsigned char)13
  #define SC_M_UNLOCK             (unsigned char)14
  #define SC_M_ACL		(unsigned char)15
  #define SC_M_REPORT             (unsigned char)16
  #define SC_M_VERSION_CONTROL    (unsigned char)17
  #define SC_M_CHECKIN            (unsigned char)18
  #define SC_M_CHECKOUT           (unsigned char)19
  #define SC_M_UNCHECKOUT         (unsigned char)20
  #define SC_M_SEARCH             (unsigned char)21
  
  
  /*
   * Frequent request headers, these headers are coded as numbers
   * instead of strings.
   * 
   * Accept
   * Accept-Charset
   * Accept-Encoding
   * Accept-Language
   * Authorization
   * Connection
   * Content-Type
   * Content-Length
   * Cookie
   * Cookie2
   * Host
   * Pragma
   * Referer
   * User-Agent
   * 
   */
  
  #define SC_ACCEPT               (unsigned short)0xA001
  #define SC_ACCEPT_CHARSET       (unsigned short)0xA002
  #define SC_ACCEPT_ENCODING      (unsigned short)0xA003
  #define SC_ACCEPT_LANGUAGE      (unsigned short)0xA004
  #define SC_AUTHORIZATION        (unsigned short)0xA005
  #define SC_CONNECTION           (unsigned short)0xA006
  #define SC_CONTENT_TYPE         (unsigned short)0xA007
  #define SC_CONTENT_LENGTH       (unsigned short)0xA008
  #define SC_COOKIE               (unsigned short)0xA009    
  #define SC_COOKIE2              (unsigned short)0xA00A
  #define SC_HOST                 (unsigned short)0xA00B
  #define SC_PRAGMA               (unsigned short)0xA00C
  #define SC_REFERER              (unsigned short)0xA00D
  #define SC_USER_AGENT           (unsigned short)0xA00E
  
  /*
   * Frequent response headers, these headers are coded as numbers
   * instead of strings.
   * 
   * Content-Type
   * Content-Language
   * Content-Length
   * Date
   * Last-Modified
   * Location
   * Set-Cookie
   * Servlet-Engine
   * Status
   * WWW-Authenticate
   * 
   */
  
  #define SC_RESP_CONTENT_TYPE        (unsigned short)0xA001
  #define SC_RESP_CONTENT_LANGUAGE    (unsigned short)0xA002
  #define SC_RESP_CONTENT_LENGTH      (unsigned short)0xA003
  #define SC_RESP_DATE                (unsigned short)0xA004
  #define SC_RESP_LAST_MODIFIED       (unsigned short)0xA005
  #define SC_RESP_LOCATION            (unsigned short)0xA006
  #define SC_RESP_SET_COOKIE          (unsigned short)0xA007
  #define SC_RESP_SET_COOKIE2         (unsigned short)0xA008
  #define SC_RESP_SERVLET_ENGINE      (unsigned short)0xA009
  #define SC_RESP_STATUS              (unsigned short)0xA00A
  #define SC_RESP_WWW_AUTHENTICATE    (unsigned short)0xA00B
  #define SC_RES_HEADERS_NUM          11
  
  /*
   * AJP13/AJP14 use same message structure
   */
  
  #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);
  
  
  struct jk_res_data {
      int         status;
      const char *msg;
      unsigned    num_headers;
      char      **header_names;
      char      **header_values;
  };
  typedef struct jk_res_data jk_res_data_t;
  
  #include "jk_ajp14.h"
  
  struct ajp_operation;
  typedef struct ajp_operation ajp_operation_t;
  
  struct ajp_endpoint;
  typedef struct ajp_endpoint ajp_endpoint_t;
  
  struct ajp_worker;
  typedef struct ajp_worker ajp_worker_t;
  
  struct ajp_worker {
      struct sockaddr_in worker_inet_addr; /* Contains host and port */
      unsigned connect_retry_attempts;
      char *name;
   
      /* 
       * 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;
      ajp_endpoint_t **ep_cache;
  
      /* PROTOCOL USED AJP13/AJP14
         XXX "version" - the API version to use
      */
      int proto;
  
      jk_login_service_t *login;
  
      jk_worker_t worker; 
  
      /*
       * Post physical connect handler.
       * AJP14 will set here its login handler
       */ 
      int (* logon)(ajp_endpoint_t *ae,
                    jk_logger_t    *l);
  }; 
   
  
  /*
   * endpoint, the remote which will does the work
   */
  struct ajp_endpoint {
      ajp_worker_t *worker;
  
      jk_pool_t pool;
      jk_pool_atom_t buf[BIG_POOL_SIZE];
  
  	int proto;	/* PROTOCOL USED AJP13/AJP14 */
  
      int sd;
      int reuse;
      jk_endpoint_t endpoint;
  
      unsigned left_bytes_to_send;
  };
  
  /*
   * little struct to avoid multiples ptr passing
   * this struct is ready to hold upload file fd
   * to add upload persistant storage
   */
  struct ajp_operation {
      jk_msg_buf_t    *request;   /* original request storage */
      jk_msg_buf_t    *reply;     /* reply storage (chuncked by ajp13 */
      jk_msg_buf_t    *post;      /* small post data storage area */
      int     uploadfd;           /* future persistant storage id */
      int     recoverable;        /* if exchange could be conducted on another TC */
  };
  
  /*
   * Functions
   */
  
  
  int ajp_validate(jk_worker_t *pThis,
                   jk_map_t    *props,
                   jk_workerEnv_t *we,
                   jk_logger_t *l,
                   int          proto);
  
  int ajp_init(jk_worker_t *pThis,
               jk_map_t    *props,
               jk_workerEnv_t *we,
               jk_logger_t *l,
               int          proto);
  
  int ajp_destroy(jk_worker_t **pThis,
                  jk_logger_t *l,
                  int          proto);
  
  int JK_METHOD ajp_done(jk_endpoint_t **e,
                         jk_logger_t    *l);
  
  int ajp_get_endpoint(jk_worker_t    *pThis,
                       jk_endpoint_t **pend,
                       jk_logger_t    *l,
                       int             proto);
  
  int ajp_connect_to_endpoint(ajp_endpoint_t *ae,
                              jk_logger_t    *l);
  
  void ajp_close_endpoint(ajp_endpoint_t *ae,
                          jk_logger_t    *l);
  
  int ajp_connection_tcp_send_message(ajp_endpoint_t *ae,
                                      jk_msg_buf_t   *msg,
                                      jk_logger_t    *l);
  
  int ajp_connection_tcp_get_message(ajp_endpoint_t *ae,
                                     jk_msg_buf_t   *msg,
                                     jk_logger_t    *l);
  
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
  
  #endif /* JK_AJP_COMMON_H */
  
  
  
  1.1                  jakarta-tomcat-connectors/jk/native2/common/jk_connect.h
  
  Index: jk_connect.h
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *          Copyright (c) 1999-2001 The Apache Software Foundation.          *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Jk",  and  "Apache  Software     *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  /***************************************************************************
   * Description: Socket connections header file                             *
   * Author:      Gal Shachor <shachor@il.ibm.com>                           *
   * Version:     $Revision: 1.1 $                                               *
   ***************************************************************************/
  
  #ifndef JK_CONNECT_H
  #define JK_CONNECT_H
  
  #include "jk_logger.h"
  #include "jk_global.h"
  
  #ifndef WIN32
  	#define closesocket			close
  #endif
  
  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */
  
  int jk_resolve(char *host,
                 short port,
                 struct sockaddr_in *rc);
  
  int jk_open_socket(struct sockaddr_in *addr, 
                     int ndelay,
                     jk_logger_t *l);
  
  int jk_close_socket(int s);
  
  int jk_tcp_socket_sendfull(int sd, 
                             const unsigned char *b,
                             int len);
  
  int jk_tcp_socket_recvfull(int sd, 
                             unsigned char *b, 
                             int len);
  
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
  
  #endif /* JK_CONNECT_H */
  
  
  
  1.1                  jakarta-tomcat-connectors/jk/native2/common/jk_context.h
  
  Index: jk_context.h
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *          Copyright (c) 1999-2001 The Apache Software Foundation.          *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Jk",  and  "Apache  Software     *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  /***************************************************************************
   * Description: Context Stuff (Autoconf)                                   *
   * Author:      Henri Gomez <hgomez@slib.fr>                               *
   * Version:     $Revision: 1.1 $                                           *
   ***************************************************************************/
  #ifndef JK_CONTEXT_H
  #define JK_CONTEXT_H
  
  #include "jk_pool.h"
  
  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */
  
  #define CBASE_INC_SIZE   (8)    /* Allocate memory by step of 8 URIs : ie 8 URI by context */
  #define URI_INC_SIZE (8)        /* Allocate memory by step of 8 CONTEXTs : ie 8 contexts by worker */
  
  typedef struct {
  
      /*
       * Context base (ie examples) 
       */
   
      char *      cbase;
   
      /*
       * Status (Up/Down)
       */
   
      int         status;
  
      /*
       * Num of URI handled 
       */
      
      int         size;
  
      /*
       * Capacity
       */
     
      int         capacity;
  
      /*
       * URL/URIs (autoconf)
       */
  
      char **     uris;
  }
  jk_context_item_t;
  
  
  typedef struct {
  
      /*
       * Memory Pool
       */
  
      jk_pool_t       p;
      jk_pool_atom_t  buf[SMALL_POOL_SIZE];
  
  	/*
  	 * Virtual Server (if use)
  	 */
  
  	char *		            virtual;
  
      /*
       * Num of context handled (ie: examples, admin...)
       */
  
      int                     size;
  
      /*
       * Capacity
       */
  
      int                     capacity; 
  
      /*
       * Context list, context / URIs
       */
  
      jk_context_item_t **    contexts;
  } 
  jk_context_t;
  
  
  /*
   * functions defined here 
   */
  
  int context_set_virtual(jk_context_t *c, char *virtual);
  
  int context_open(jk_context_t *c, char *virtual);
  
  int context_close(jk_context_t *c);
  
  int context_alloc(jk_context_t **c, char *virtual);
  
  int context_free(jk_context_t **c);
  
  jk_context_item_t *context_find_base(jk_context_t *c, char *cbase);
  
  char *context_item_find_uri(jk_context_item_t *ci, char *uri);
  
  void context_dump_uris(jk_context_t *c, char *cbase, FILE *f);
  
  jk_context_item_t *context_add_base(jk_context_t *c, char *cbase);
  
  int context_add_uri(jk_context_t *c, char *cbase, char *uri);
  
  
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
  
  #endif /* JK_CONTEXT_H */
  
  
  
  1.1                  jakarta-tomcat-connectors/jk/native2/common/jk_endpoint.h
  
  Index: jk_endpoint.h
  ===================================================================
  /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil-*- */
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *          Copyright (c) 1999-2001 The Apache Software Foundation.          *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Jk",  and  "Apache  Software     *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  /***************************************************************************
   * Description: Definitions of the endpoint.
   *
   * Author:      Gal Shachor <shachor@il.ibm.com>                           
   * Author:      Dan Milstein <danmil@shore.net>                            
   * Author:      Henri Gomez <hgomez@slib.fr>                               
   * Version:     $Revision: 1.1 $                                          
   ***************************************************************************/
  
  #ifndef JK_ENDPOINT_H
  #define JK_ENDPOINT_H
  
  #include "jk_map.h"
  #include "jk_service.h"
  #include "jk_logger.h"
  #include "jk_pool.h"
  #include "jk_uriMap.h"
  
  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */
      
  struct jk_endpoint;
  struct jk_ws_service;
  typedef struct jk_endpoint   jk_endpoint_t;
  
  /*
   * The endpoint 'class', which represents one end of a connection to the
   * servlet engine.  Basically, supports nothing other than forwarding the
   * request to the servlet engine.  Endpoints can be persistent (as with
   * ajp13/ajp14, where a single connection is reused many times), or can last for a
   * single request (as with ajp12, where a new connection is created for
   * every request).
   *
   * An endpoint for a given protocol is obtained by the web server plugin
   * from a worker object for that protocol.  See below for details.
   *
   * As with all the core jk classes, this is essentially an abstract base
   * class which is implemented/extended by classes which are specific to a
   * particular protocol.  By using an abstract base class in this manner,
   * plugins can be written for different servers (e.g. IIS, Apache) without
   * the plugins having to worry about which protocol they are talking.
   *
   * This particular OO-in-C system uses a 'endpoint_private' pointer to
   * point to the protocol-specific data/functions.  So in the subclasses, the
   * methods do most of their work by getting their hands on the
   * endpoint_private pointer and then using that to get at the functions for
   * their protocol.
   *
   * Try imagining this as a 'public abstract class', and the
   * endpoint_private pointer as a sort of extra 'this' reference.  Or
   * imagine that you are seeing the internal vtables of your favorite OO
   * language.  Whatever works for you.
   *
   * See jk_ajp13_worker.c/jk_ajp14_worker.c and jk_ajp12_worker.c for examples.  
   */
  struct jk_endpoint {
    
      /* 
       * A 'this' pointer which is used by the subclasses of this class to
       * point to data/functions which are specific to a given protocol 
       * (e.g. ajp12 or ajp13 or ajp14).  
       */
      void *endpoint_private;
  
      /** Data specific to a channel connection
       */
      void *channelData;
  
      /*
       * Forward a request to the servlet engine.  The request is described
       * by the jk_ws_service_t object.  I'm not sure exactly how
       * is_recoverable_error is being used.  
       */
      int (JK_METHOD *service)(jk_endpoint_t *e, 
                               struct jk_ws_service *s,
                               jk_logger_t *l,
                               int *is_recoverable_error);
  
      /*
       * Called when this particular endpoint has finished processing a
       * request.  For some protocols (e.g. ajp12), this frees the memory
       * associated with the endpoint.  For others (e.g. ajp13/ajp14), this can
        * return the endpoint to a cache of already opened endpoints.  
       *
       * Note that the first argument is *not* a 'this' pointer, but is
       * rather a pointer to a 'this' pointer.  This is necessary, because
       * we may need to free this object.
       */
      int (JK_METHOD *done)(jk_endpoint_t **p,
                            jk_logger_t *l);
  };
  
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
  
  #endif /* JK_ENDPOINT_H */
  
  
  
  1.1                  jakarta-tomcat-connectors/jk/native2/common/jk_md5.h
  
  Index: jk_md5.h
  ===================================================================
  /*
   * This is work is derived from material Copyright RSA Data Security, Inc.
   *
   * The RSA copyright statement and Licence for that original material is
   * included below. This is followed by the Apache copyright statement and
   * licence for the modifications made to that material.
   */
  
  /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
     rights reserved.
  
     License to copy and use this software is granted provided that it
     is identified as the "RSA Data Security, Inc. MD5 Message-Digest
     Algorithm" in all material mentioning or referencing this software
     or this function.
  
     License is also granted to make and use derivative works provided
     that such works are identified as "derived from the RSA Data
     Security, Inc. MD5 Message-Digest Algorithm" in all material
     mentioning or referencing the derived work.
  
     RSA Data Security, Inc. makes no representations concerning either
     the merchantability of this software or the suitability of this
     software for any particular purpose. It is provided "as is"
     without express or implied warranty of any kind.
  
     These notices must be retained in any copies of any part of this
     documentation and/or software.
   */
  
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * Portions of this software are based upon public domain software
   * originally written at the National Center for Supercomputing Applications,
   * University of Illinois, Urbana-Champaign.
   */
  
  #ifndef JK_APACHE_MD5_H
  #define JK_APACHE_MD5_H
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  /* MD5.H - header file for MD5.C */
  
  #define JK_MD5_DIGESTSIZE 16
  
  /* JK_UINT4 defines a four byte word */
  typedef unsigned int JK_UINT4;
  
  /* MD5 context. */
  typedef struct {
      JK_UINT4 state[4];		/* state (ABCD) */
      JK_UINT4 count[2];		/* number of bits, modulo 2^64 (lsb first) */
      unsigned char buffer[64];	/* input buffer */
  } JK_MD5_CTX;
  
  /*
   * Define the Magic String prefix that identifies a password as being
   * hashed using our algorithm.
   */
  #define JK_MD5PW_ID "$apr1$"
  #define JK_MD5PW_IDLEN 6
  
  char * JK_METHOD jk_hextocstr(unsigned char *org, char * dst, int n);
  char * JK_METHOD jk_md5(const unsigned char *org, const unsigned char *org2, char *dst);
  
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif	/* !JK_APACHE_MD5_H */
  
  
  
  1.1                  jakarta-tomcat-connectors/jk/native2/common/jk_msg_buff.h
  
  Index: jk_msg_buff.h
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *          Copyright (c) 1999-2001 The Apache Software Foundation.          *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Jk",  and  "Apache  Software     *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  /***************************************************************************
   * Description: Data marshaling. XDR like                                  *
   * Author:      Costin <costin@costin.dnt.ro>                              *
   * Author:      Gal Shachor <shachor@il.ibm.com>                           *
   * Version:     $Revision: 1.1 $                                           *
   ***************************************************************************/
  
  #ifndef JK_MSG_BUF_H
  #define JK_MSG_BUF_H
  
  
  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */
  
  #define DEF_BUFFER_SZ (8 * 1024)
  
  /* XXX replace all return values with error codes */
  #define ERR_BAD_PACKET -5
  
  /*
  RPC details:
  
    - one parameter  - use a structure for more. The method
      is encoded as part of the request
    - one or no result
    - 
  
  
  
   */
  
  struct jk_msg_buf;
  typedef struct jk_msg_buf jk_msg_buf_t;
  
  /* -------------------- Setup routines -------------------- */
  
  /** Allocate a buffer.
   */
  jk_msg_buf_t *jk_b_new(jk_pool_t *p); 
  
  /** Set up a buffer with an existing buffer
   */
  int jk_b_set_buffer(jk_msg_buf_t *msg, 
                      char *data, 
                      int buffSize );
  
  /*
   * Set up a buffer with a new buffer of buffSize
   */
  int jk_b_set_buffer_size(jk_msg_buf_t *msg, 
                           int buffSize);
  
  /*
   * Finalize the buffer before sending - set length fields, etc
   */
  void jk_b_end(jk_msg_buf_t *msg,
  			  int protoh);
  
  /*
   * Recycle the buffer - z for a new invocation 
   */
  void jk_b_reset(jk_msg_buf_t *msg );
  
  /*
   * Return the buffer body 
   */ 
  unsigned char *jk_b_get_buff(jk_msg_buf_t *msg);
  
  /* 
   * Return the current reading position
   */
  unsigned int jk_b_get_pos(jk_msg_buf_t *msg);
  
  /*
   * Buffer size 
   */
  int jk_b_get_size(jk_msg_buf_t *msg);
  
  void jk_b_set_len(jk_msg_buf_t *msg, 
                    int len);
  
  void jk_b_set_pos(jk_msg_buf_t *msg, 
                    int pos);
  
  /*
   * Get the  message length for incomming buffers
   *   or the current length for outgoing
   */
  unsigned int jk_b_get_len(jk_msg_buf_t *msg);
  
  /*
   * Dump the buffer header
   *   @param err Message text
   */
  void jk_b_dump(jk_msg_buf_t *msg, 
                 char *err); 
  
  /* -------------------- Real encoding -------------------- */
  
  int jk_b_append_byte(jk_msg_buf_t *msg, 
                       unsigned char val);
  
  int jk_b_append_bytes(jk_msg_buf_t *        msg, 
                        const unsigned char * param,
                        int                   len);
  
  int jk_b_append_int(jk_msg_buf_t *msg, 
                      unsigned short val);
  
  int jk_b_append_long(jk_msg_buf_t *msg,
                       unsigned long val);
  
  int jk_b_append_string(jk_msg_buf_t *msg, 
                         const char *param);
  
  
  /* -------------------- Decoding -------------------- */
  
  /** Get a byte from the current position 
   */
  unsigned char jk_b_get_byte(jk_msg_buf_t *msg);
  
  /** Get an int from the current position
   */
  unsigned short jk_b_get_int(jk_msg_buf_t *msg);
  
  /** Get a long from the current position
   */
  unsigned long jk_b_get_long(jk_msg_buf_t *msg);
  
  /** Get a String from the current position
   */
  unsigned char *jk_b_get_string(jk_msg_buf_t *msg);
  
  /** Get Bytes from the current position
   */
  int jk_b_get_bytes(jk_msg_buf_t *msg, 
                     unsigned char * buf, 
                     int len);
  
  /** Get a byte from an arbitrary position
   */
  unsigned char jk_b_pget_byte(jk_msg_buf_t *msg,
                               int pos);
  
  /** Get an int from an arbitrary position 
   */
  unsigned short jk_b_pget_int(jk_msg_buf_t *msg, 
                               int pos);
  
  /** Get a long from an arbitrary position 
   */
  unsigned long jk_b_pget_long(jk_msg_buf_t *msg, 
                               int pos);
  
  /* --------------------- Help ------------------------ */
  void jk_dump_buff(jk_logger_t *l, 
                        const char *file,
                        int line,
                        int level,
                        char * what,
                        jk_msg_buf_t * msg);
  
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
  
  #endif /* JK_MSG_BUF_H */
  
  
  
  1.1                  jakarta-tomcat-connectors/jk/native2/common/jk_mt.h
  
  Index: jk_mt.h
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *          Copyright (c) 1999-2001 The Apache Software Foundation.          *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Jk",  and  "Apache  Software     *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  /***************************************************************************
   * Description: Multi thread portability code for JK                       *
   * Author:      Gal Shachor <shachor@il.ibm.com>                           *
   * Version:     $Revision: 1.1 $                                           *
   ***************************************************************************/
  
  #ifndef _JK_MT_H
  #define _JK_MT_H
  
  #include "jk_global.h"
  
  /*
   * All WIN32 code is MT, UNIX code that uses pthreads is marked by the POSIX 
   * _REENTRANT define.
   */
  #if defined (WIN32) || defined(_REENTRANT)
  
      /*
       * Marks execution under MT compilation
       */
      #define _MT_CODE
  
      #ifdef WIN32
  
          #include <windows.h>
  
          typedef CRITICAL_SECTION JK_CRIT_SEC;
  
          #define JK_INIT_CS(x, rc) InitializeCriticalSection(x); rc = JK_TRUE;
          #define JK_DELETE_CS(x, rc) DeleteCriticalSection(x); rc = JK_TRUE;
          #define JK_ENTER_CS(x, rc) EnterCriticalSection(x); rc = JK_TRUE;
          #define JK_LEAVE_CS(x, rc) LeaveCriticalSection(x); rc = JK_TRUE;
  
      #else /* Unix pthreads */
  
          #include <pthread.h>
  
          typedef pthread_mutex_t	JK_CRIT_SEC;
  
          #define JK_INIT_CS(x, rc)\
              if(pthread_mutex_init(x, NULL)) rc = JK_FALSE; else rc = JK_TRUE; 
  
          #define JK_DELETE_CS(x, rc)\
              if(pthread_mutex_lock(x)) rc = JK_FALSE; else rc = JK_TRUE; 
  
          #define JK_ENTER_CS(x, rc)\
              if(pthread_mutex_unlock(x)) rc = JK_FALSE; else rc = JK_TRUE; 
  
          #define JK_LEAVE_CS(x, rc)\
              if(pthread_mutex_destroy(x)) rc = JK_FALSE; else rc = JK_TRUE; 
      #endif /* Unix pthreads */
  
  #else /* Not an MT code */
  
      typedef void *JK_CRIT_SEC;
  
      #define JK_INIT_CS(x, rc) rc = JK_TRUE;
      #define JK_DELETE_CS(x, rc) rc = JK_TRUE;
      #define JK_ENTER_CS(x, rc) rc = JK_TRUE;
      #define JK_LEAVE_CS(x, rc) rc = JK_TRUE;
  
  #endif /* Not an MT code */
  
  #endif /* _JK_MT_H */
  
  
  
  1.1                  jakarta-tomcat-connectors/jk/native2/common/jk_util.h
  
  Index: jk_util.h
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *          Copyright (c) 1999-2001 The Apache Software Foundation.          *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Jk",  and  "Apache  Software     *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  /***************************************************************************
   * Description: Various utility functions                                  *
   * Author:      Gal Shachor <shachor@il.ibm.com>                           *
   * Author:      Henri Gomez <hgomez@slib.fr>                               *
   * Version:     $Revision: 1.1 $                                           *
   ***************************************************************************/
  #ifndef _JK_UTIL_H
  #define _JK_UTIL_H
  
  #include "jk_global.h"
  #include "jk_map.h"
  #include "jk_pool.h"
  #include "jk_logger.h"
  #include "jk_service.h"
  
  int jk_parse_log_level(const char *level);
  
  int jk_open_file_logger(jk_logger_t **l,
                          const char *file,
                          int level);
  
  int jk_close_file_logger(jk_logger_t **l);
  
  int jk_log(jk_logger_t *l,
             const char *file,
             int line,
             int level,
             const char *fmt, ...);
  
  /* [V] Two general purpose functions. Should ease the function bloat. */
  int jk_get_worker_str_prop(jk_map_t *m,
  			   const char *wname,
  			   const char *pname,
  			   char **prop);
  
  int jk_get_worker_int_prop(jk_map_t *m,
  			   const char *wname,
  			   const char *pname,
  			   int *prop);
  
  char *jk_get_worker_host(jk_map_t *m,
                           const char *wname,
                           const char *def);
  
  char *jk_get_worker_type(jk_map_t *m,
                           const char *wname);
  
  int jk_get_worker_port(jk_map_t *m,
                         const char *wname,
                         int def);
  
  int jk_get_worker_cache_size(jk_map_t *m, 
                               const char *wname,
                               int def);
  
  char * jk_get_worker_secret_key(jk_map_t *m,
                                  const char *wname);
  
  void jk_set_log_format(const char *logformat);
  
  int jk_get_worker_list(jk_map_t *m,
                         char ***list,
                         unsigned *num_of_wokers);
  
  double jk_get_lb_factor(jk_map_t *m, 
                          const char *wname);
  
  int jk_get_lb_worker_list(jk_map_t *m, 
                            const char *lb_wname,
                            char ***list, 
                            unsigned *num_of_wokers);
  
  int jk_get_worker_mx(jk_map_t *m, 
                       const char *wname,
                       unsigned *mx);
  
  int jk_get_worker_ms(jk_map_t *m, 
                       const char *wname,
                       unsigned *ms);
  
  int jk_get_worker_classpath(jk_map_t *m, 
                              const char *wname, 
                              char **cp);
  
  
  int jk_get_worker_jvm_path(jk_map_t *m, 
                             const char *wname, 
                             char **vm_path);
  
  int jk_get_worker_callback_dll(jk_map_t *m, 
                                 const char *wname, 
                                 char **cb_path);
  
  int jk_get_worker_cmd_line(jk_map_t *m, 
                             const char *wname, 
                             char **cmd_line);
  
  int jk_file_exists(const char *f);
  
  int jk_is_path_poperty(const char *prp_name);
  
  int jk_is_cmd_line_poperty(const char *prp_name);
  
  int jk_get_worker_stdout(jk_map_t *m, 
                           const char *wname, 
                           char **stdout_name);
  
  int jk_get_worker_stderr(jk_map_t *m, 
                           const char *wname, 
                           char **stderr_name);
  
  int jk_get_worker_sysprops(jk_map_t *m, 
                             const char *wname, 
                             char **sysprops);
  
  int jk_get_worker_libpath(jk_map_t *m, 
                            const char *wname, 
                            char **libpath);
  
  char **jk_parse_sysprops(jk_pool_t *p, 
                           const char *sysprops);
          
  
  void jk_append_libpath(jk_pool_t *p, 
                         const char *libpath);
  
  void jk_init_ws_service(jk_ws_service_t *s);
  
  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */
  
  
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
  
  #endif /* _JK_UTIL_H */
  
  
  
  1.1                  jakarta-tomcat-connectors/jk/native2/common/jk_version.h
  
  Index: jk_version.h
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *          Copyright (c) 1999-2001 The Apache Software Foundation.          *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Jk",  and  "Apache  Software     *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  /***************************************************************************
   * Description: Socket buffer header file                                  *
   * Author:      Jean-Frederic Clere <jfrederic.clere@fujitsu-siemens.com>  *
   * Version:     $Revision: 1.1 $                                                 *
   ***************************************************************************/
  
  #ifndef __JK_VERSION_H
  #define __JK_VERSION_H
  
  /************** START OF AREA TO MODIFY BEFORE RELEASING *************/
  #define JK_VERMAJOR     1
  #define JK_VERMINOR     2
  #define JK_VERFIX       0
  #define JK_VERSTRING    "1.2.0"
  
  /* Beta number */
  #define JK_VERBETA      1
  #define JK_BETASTRING   "1"
  /* set JK_VERISRELEASE to 1 when release (do not forget to commit!) */
  #define JK_VERISRELEASE 1
  /************** END OF AREA TO MODIFY BEFORE RELEASING *************/
  
  #define PACKAGE "mod_jk/"
  /* Build JK_EXPOSED_VERSION and JK_VERSION */
  #define JK_EXPOSED_VERSION_INT PACKAGE JK_VERSTRING
  
  #if ( JK_VERISRELEASE == 1 )
  #define JK_EXPOSED_VERSION JK_EXPOSED_VERSION_INT
  #undef JK_VERBETA
  #define JK_VERBETA 255
  #else
  #define JK_EXPOSED_VERSION JK_EXPOSED_VERSION_INT "-beta-" JK_BETASTRING
  #endif
  
  #define JK_MAKEVERSION(major, minor, fix, beta) (((major) << 24) + ((minor) << 16) + ((fix) << 8) + (beta))
  
  #define JK_VERSION JK_MAKEVERSION(JK_VERMAJOR, JK_VERMINOR, JK_VERFIX, JK_VERBETA)
  
  #endif /* __JK_VERSION_H */
  
  
  

--
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