summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2010-06-30 22:34:05 +0000
committerStefan Fritsch <sf@apache.org>2010-06-30 22:34:05 +0000
commited451e94d1edccf3ddb4d19c4c29fd7423eb03be (patch)
tree2fab3da8a5b8cf59b6bf182608b6d23ab2c15650 /include
parent8bce96451f3da6173cc94c1804e32f1bdfa24339 (diff)
downloadhttpd-ed451e94d1edccf3ddb4d19c4c29fd7423eb03be.tar.gz
re-order many struct members for better alignment on 64bit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@959464 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h1
-rw-r--r--include/http_config.h4
-rw-r--r--include/http_core.h13
-rw-r--r--include/httpd.h170
-rw-r--r--include/scoreboard.h8
-rw-r--r--include/util_filter.h12
-rw-r--r--include/util_ldap.h11
7 files changed, 114 insertions, 105 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index eb897b5544..e17c016867 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -232,6 +232,7 @@
* 20100609.2 (2.3.7-dev) Add deferred write pool to core_output_filter_ctx
* 20100625.0 (2.3.7-dev) Add 'userctx' to socache iterator callback prototype
* 20100630.0 (2.3.7-dev) make module_levels vector of char instead of int
+ * 20100701.0 (2.3.7-dev) re-order struct members to improve alignment
*/
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
diff --git a/include/http_config.h b/include/http_config.h
index 636f728080..63dd52441b 100644
--- a/include/http_config.h
+++ b/include/http_config.h
@@ -276,6 +276,8 @@ struct cmd_parms_struct {
void *info;
/** Which allow-override bits are set */
int override;
+ /** Which allow-override-opts bits are set */
+ int override_opts;
/** Which methods are &lt;Limit&gt;ed */
apr_int64_t limited;
/** methods which are limited */
@@ -310,8 +312,6 @@ struct cmd_parms_struct {
/** directive with syntax error */
const ap_directive_t *err_directive;
- /** Which allow-override-opts bits are set */
- int override_opts;
};
/**
diff --git a/include/http_core.h b/include/http_core.h
index 0127fe6d11..ed334ba503 100644
--- a/include/http_core.h
+++ b/include/http_core.h
@@ -333,6 +333,13 @@ typedef struct {
*/
void **notes;
+ /** Custom response strings registered via ap_custom_response(),
+ * or NULL; check per-dir config if nothing found here
+ */
+ char **response_code_strings; /* from ap_custom_response(), not from
+ * ErrorDocument
+ */
+
/** There is a script processor installed on the output filter chain,
* so it needs the default_handler to deliver a (script) file into
* the chain so it can process it. Normally, default_handler only
@@ -343,12 +350,6 @@ typedef struct {
*/
int deliver_script;
- /** Custom response strings registered via ap_custom_response(),
- * or NULL; check per-dir config if nothing found here
- */
- char **response_code_strings; /* from ap_custom_response(), not from
- * ErrorDocument
- */
/** Should addition of charset= be suppressed for this request?
*/
int suppress_charset;
diff --git a/include/httpd.h b/include/httpd.h
index 8dc7af8ef4..492755c28f 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -743,12 +743,12 @@ struct process_rec {
apr_pool_t *pool;
/** Configuration pool. Cleared upon restart */
apr_pool_t *pconf;
- /** Number of command line arguments passed to the program */
- int argc;
- /** The command line arguments */
- const char * const *argv;
/** The program name used to execute the program */
const char *short_name;
+ /** The command line arguments */
+ const char * const *argv;
+ /** Number of command line arguments passed to the program */
+ int argc;
};
/**
@@ -785,10 +785,10 @@ struct request_rec {
int proxyreq;
/** HEAD request, as opposed to GET */
int header_only;
- /** Protocol string, as given to us, or HTTP/0.9 */
- char *protocol;
/** Protocol version number of protocol; 1.1 = 1001 */
int proto_num;
+ /** Protocol string, as given to us, or HTTP/0.9 */
+ char *protocol;
/** Host, as set by full URI or Host: */
const char *hostname;
@@ -804,10 +804,10 @@ struct request_rec {
* look, but don't touch.
*/
- /** Request method (eg. GET, HEAD, POST, etc.) */
- const char *method;
/** M_GET, M_POST, etc. */
int method_number;
+ /** Request method (eg. GET, HEAD, POST, etc.) */
+ const char *method;
/**
* 'allowed' is a bitvector of the allowed methods.
@@ -844,17 +844,13 @@ struct request_rec {
/* HTTP/1.1 connection-level features */
- /** sending chunked transfer-coding */
- int chunked;
/** The Range: header */
const char *range;
/** The "real" content length */
apr_off_t clength;
+ /** sending chunked transfer-coding */
+ int chunked;
- /** Remaining bytes left to read from the request body */
- apr_off_t remaining;
- /** Number of bytes that have been read from the request body */
- apr_off_t read_length;
/** Method for reading the request body
* (eg. REQUEST_CHUNKED_ERROR, REQUEST_NO_BODY,
* REQUEST_CHUNKED_DECHUNK, etc...) */
@@ -863,6 +859,16 @@ struct request_rec {
int read_chunked;
/** is client waiting for a 100 response? */
unsigned expecting_100;
+ /** The optional kept body of the request. */
+ apr_bucket_brigade *kept_body;
+ /** For ap_body_to_table(): parsed body */
+ /* XXX: ap_body_to_table has been removed. Remove body_table too or
+ * XXX: keep it to reintroduce ap_body_to_table without major bump? */
+ apr_table_t *body_table;
+ /** Remaining bytes left to read from the request body */
+ apr_off_t remaining;
+ /** Number of bytes that have been read from the request body */
+ apr_off_t read_length;
/* MIME header environments, in and out. Also, an array containing
* environment variables to be passed to subprocesses, so people can
@@ -910,11 +916,6 @@ struct request_rec {
/** If an authentication check was made, this gets set to the auth type. */
char *ap_auth_type;
- /** This response can not be cached */
- int no_cache;
- /** There is no local copy of this response */
- int no_local_copy;
-
/* What object is being requested (either directly, or via include
* or content-negotiation mapping).
*/
@@ -932,10 +933,6 @@ struct request_rec {
char *path_info;
/** The QUERY_ARGS extracted from this request */
char *args;
- /** finfo.protection (st_mode) set to zero if no such file */
- apr_finfo_t finfo;
- /** A struct containing the components of URI */
- apr_uri_t parsed_uri;
/**
* Flag for the handler to accept or reject path_info on
@@ -947,6 +944,9 @@ struct request_rec {
*/
int used_path_info;
+ /** A flag to determine if the eos bucket has been sent yet */
+ int eos_sent;
+
/* Various other config info which may change with .htaccess files
* These are config vectors, with one void* pointer for each module
* (the thing pointed to being the module's business).
@@ -957,6 +957,11 @@ struct request_rec {
/** Notes on *this* request */
struct ap_conf_vector_t *request_config;
+ /** Optional request log level configuration. Will usually point
+ * to a server or per_dir config, i.e. must be copied before
+ * modifying */
+ const struct ap_logconf *log;
+
/**
* A linked list of the .htaccess configuration directives
* accessed by this request.
@@ -977,26 +982,20 @@ struct request_rec {
* request */
struct ap_filter_t *proto_input_filters;
- /** Optional request log level configuration. Will usually point
- * to a server or per_dir config, i.e. must be copied before
- * modifying */
- const struct ap_logconf *log;
-
- /** A flag to determine if the eos bucket has been sent yet */
- int eos_sent;
-
- /** The optional kept body of the request. */
- apr_bucket_brigade *kept_body;
+ /** This response can not be cached */
+ int no_cache;
+ /** There is no local copy of this response */
+ int no_local_copy;
+ /** Mutex protect callbacks registered with ap_mpm_register_timed_callback
+ * from being run before the original handler finishes running
+ */
apr_thread_mutex_t *invoke_mtx;
- apr_table_t *body_table;
-
-/* Things placed at the end of the record to avoid breaking binary
- * compatibility. It would be nice to remember to reorder the entire
- * record to improve 64bit alignment the next time we need to break
- * binary compatibility for some other reason.
- */
+ /** A struct containing the components of URI */
+ apr_uri_t parsed_uri;
+ /** finfo.protection (st_mode) set to zero if no such file */
+ apr_finfo_t finfo;
};
/**
@@ -1052,19 +1051,6 @@ struct conn_rec {
* get_remote_logname() */
char *remote_logname;
- /** Are we still talking? */
- unsigned aborted:1;
-
- /** Are we going to keep the connection alive for another request?
- * @see ap_conn_keepalive_e */
- ap_conn_keepalive_e keepalive;
-
- /** have we done double-reverse DNS? -1 yes/failure, 0 not yet,
- * 1 yes/success */
- signed int double_reverse:2;
-
- /** How many times have we used it? */
- int keepalives;
/** server IP address */
char *local_ip;
/** used for ap_get_server_name when UseCanonicalName is set to DNS
@@ -1097,8 +1083,22 @@ struct conn_rec {
/** Are there any filters that clogg/buffer the input stream, breaking
* the event mpm.
*/
- int clogging_input_filters;
+ unsigned int clogging_input_filters:1;
+ /** have we done double-reverse DNS? -1 yes/failure, 0 not yet,
+ * 1 yes/success */
+ signed int double_reverse:2;
+
+ /** Are we still talking? */
+ unsigned aborted;
+
+ /** Are we going to keep the connection alive for another request?
+ * @see ap_conn_keepalive_e */
+ ap_conn_keepalive_e keepalive;
+
+ /** How many times have we used it? */
+ int keepalives;
+
/** Optional connection log level configuration. May point to a server or
* per_dir config, i.e. must be copied before modifying */
const struct ap_logconf *log;
@@ -1133,8 +1133,6 @@ struct conn_state_t {
APR_RING_ENTRY(conn_state_t) timeout_list;
/** the expiration time of the next keepalive timeout */
apr_time_t expiration_time;
- /** Current state of the connection */
- conn_state_e state;
/** connection record this struct refers to */
conn_rec *c;
/** memory pool to allocate from */
@@ -1143,6 +1141,8 @@ struct conn_state_t {
apr_bucket_alloc_t *bucket_alloc;
/** poll file decriptor information */
apr_pollfd_t pfd;
+ /** Current state of the connection */
+ conn_state_e state;
};
/* Per-vhost config... */
@@ -1162,12 +1162,12 @@ typedef struct server_addr_rec server_addr_rec;
struct server_addr_rec {
/** The next server in the list */
server_addr_rec *next;
+ /** The name given in "<VirtualHost>" */
+ char *virthost;
/** The bound address, for this server */
apr_sockaddr_t *host_addr;
/** The bound port, for this server */
apr_port_t host_port;
- /** The name given in "<VirtualHost>" */
- char *virthost;
};
struct ap_logconf {
@@ -1186,20 +1186,6 @@ struct server_rec {
/** The next server in the list */
server_rec *next;
- /** The name of the server */
- const char *defn_name;
- /** The line of the config file that the server was defined on */
- unsigned defn_line_number;
-
- /* Contact information */
-
- /** The admin's contact information */
- char *server_admin;
- /** The server hostname */
- char *server_hostname;
- /** for redirects, etc. */
- apr_port_t port;
-
/* Log files --- note that transfer log is now in the modules... */
/** The name of the error log */
@@ -1211,14 +1197,34 @@ struct server_rec {
/* Module-specific configuration for server, and defaults... */
- /** true if this is the virtual server */
- int is_virtual;
/** Config vector containing pointers to modules' per-server config
* structures. */
struct ap_conf_vector_t *module_config;
/** MIME type info, etc., before we start checking per-directory info */
struct ap_conf_vector_t *lookup_defaults;
+ /** The name of the server */
+ const char *defn_name;
+ /** The line of the config file that the server was defined on */
+ unsigned defn_line_number;
+ /** true if this is the virtual server */
+ char is_virtual;
+
+
+ /* Information for redirects */
+
+ /** for redirects, etc. */
+ apr_port_t port;
+ /** The server request scheme for redirect responses */
+ const char *server_scheme;
+
+ /* Contact information */
+
+ /** The admin's contact information */
+ char *server_admin;
+ /** The server hostname */
+ char *server_hostname;
+
/* Transaction handling */
/** I haven't got a clue */
@@ -1232,16 +1238,16 @@ struct server_rec {
/** Use persistent connections? */
int keep_alive;
- /** Pathname for ServerPath */
- const char *path;
- /** Length of path */
- int pathlen;
-
/** Normal names for ServerAlias servers */
apr_array_header_t *names;
/** Wildcarded names for ServerAlias servers */
apr_array_header_t *wild_names;
+ /** Pathname for ServerPath */
+ const char *path;
+ /** Length of path */
+ int pathlen;
+
/** limit on size of the HTTP request line */
int limit_req_line;
/** limit on size of any request header field */
@@ -1249,8 +1255,6 @@ struct server_rec {
/** limit on number of request header fields */
int limit_req_fields;
- /** The server request scheme for redirect responses */
- const char *server_scheme;
/** Opaque storage location */
void *context;
@@ -1258,10 +1262,10 @@ struct server_rec {
typedef struct core_output_filter_ctx {
apr_bucket_brigade *buffered_bb;
- apr_size_t bytes_in;
- apr_size_t bytes_written;
apr_bucket_brigade *tmp_flush_bb;
apr_pool_t *deferred_write_pool;
+ apr_size_t bytes_in;
+ apr_size_t bytes_written;
} core_output_filter_ctx_t;
typedef struct core_filter_ctx {
diff --git a/include/scoreboard.h b/include/scoreboard.h
index 989027e37d..62108a683f 100644
--- a/include/scoreboard.h
+++ b/include/scoreboard.h
@@ -89,10 +89,10 @@ typedef enum {
/* stuff which is worker specific */
typedef struct worker_score worker_score;
struct worker_score {
- int thread_num;
#if APR_HAS_THREADS
apr_os_thread_t tid;
#endif
+ int thread_num;
/* With some MPMs (e.g., worker), a worker_score can represent
* a thread in a terminating process which is no longer
* represented by the corresponding process_score. These MPMs
@@ -101,18 +101,18 @@ struct worker_score {
pid_t pid;
ap_generation_t generation;
unsigned char status;
+ unsigned short conn_count;
+ apr_off_t conn_bytes;
unsigned long access_count;
apr_off_t bytes_served;
unsigned long my_access_count;
apr_off_t my_bytes_served;
- apr_off_t conn_bytes;
- unsigned short conn_count;
apr_time_t start_time;
apr_time_t stop_time;
+ apr_time_t last_used;
#ifdef HAVE_TIMES
struct tms times;
#endif
- apr_time_t last_used;
char client[32]; /* Keep 'em small... */
char request[64]; /* We just want an idea... */
char vhost[32]; /* What virtual host is being accessed? */
diff --git a/include/util_filter.h b/include/util_filter.h
index 4467436a15..89bbcd25e8 100644
--- a/include/util_filter.h
+++ b/include/util_filter.h
@@ -227,6 +227,12 @@ struct ap_filter_rec_t {
*/
ap_init_filter_func filter_init_func;
+ /** The next filter_rec in the list */
+ struct ap_filter_rec_t *next;
+
+ /** Providers for this filter */
+ ap_filter_provider_t *providers;
+
/** The type of filter, either AP_FTYPE_CONTENT or AP_FTYPE_CONNECTION.
* An AP_FTYPE_CONTENT filter modifies the data based on information
* found in the content. An AP_FTYPE_CONNECTION filter modifies the
@@ -234,12 +240,6 @@ struct ap_filter_rec_t {
*/
ap_filter_type ftype;
- /** The next filter_rec in the list */
- struct ap_filter_rec_t *next;
-
- /** Providers for this filter */
- ap_filter_provider_t *providers;
-
/** Trace level for this filter */
int debug;
diff --git a/include/util_ldap.h b/include/util_ldap.h
index 0a90ff650d..e6ff6a911c 100644
--- a/include/util_ldap.h
+++ b/include/util_ldap.h
@@ -100,7 +100,6 @@ typedef struct util_ldap_connection_t {
#if APR_HAS_THREADS
apr_thread_mutex_t *lock; /* Lock to indicate this connection is in use */
#endif
- int bound; /* Flag to indicate whether this connection is bound yet */
const char *host; /* Name of the LDAP server (or space separated list) */
int port; /* Port of the LDAP server */
@@ -109,6 +108,8 @@ typedef struct util_ldap_connection_t {
const char *binddn; /* DN to bind to server (can be NULL) */
const char *bindpw; /* Password to bind to server (can be NULL) */
+ int bound; /* Flag to indicate whether this connection is bound yet */
+
int secure; /* SSL/TLS mode of the connection */
apr_array_header_t *client_certs; /* Client certificates on this connection */
@@ -144,10 +145,11 @@ typedef struct util_ldap_state_t {
long compare_cache_size; /* Size (in entries) of compare cache */
struct util_ldap_connection_t *connections;
- int ssl_supported;
apr_array_header_t *global_certs; /* Global CA certificates */
+ int ssl_supported;
int secure;
int secure_set;
+ int verify_svr_cert;
#if APR_HAS_SHARED_MEMORY
apr_shm_t *cache_shm;
@@ -156,11 +158,12 @@ typedef struct util_ldap_state_t {
/* cache ald */
void *util_ldap_cache;
+
long connectionTimeout;
- int verify_svr_cert;
- int debug_level; /* SDK debug level */
struct timeval *opTimeout;
+ int debug_level; /* SDK debug level */
+
} util_ldap_state_t;
/* Used to store arrays of attribute labels/values. */