2004-09-28 16:34:51 +08:00
|
|
|
|
|
|
|
/*
|
2004-09-30 00:00:49 +08:00
|
|
|
* Copyright (C) Igor Sysoev
|
2004-09-28 16:34:51 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2002-08-22 23:24:03 +08:00
|
|
|
#ifndef _NGX_CORE_H_INCLUDED_
|
|
|
|
#define _NGX_CORE_H_INCLUDED_
|
|
|
|
|
|
|
|
|
2003-06-03 23:42:58 +08:00
|
|
|
typedef struct ngx_module_s ngx_module_t;
|
|
|
|
typedef struct ngx_conf_s ngx_conf_t;
|
2003-07-02 22:41:17 +08:00
|
|
|
typedef struct ngx_cycle_s ngx_cycle_t;
|
2004-06-15 15:55:11 +08:00
|
|
|
typedef struct ngx_pool_s ngx_pool_t;
|
2005-11-15 21:30:52 +08:00
|
|
|
typedef struct ngx_chain_s ngx_chain_t;
|
2003-11-20 00:26:41 +08:00
|
|
|
typedef struct ngx_log_s ngx_log_t;
|
2003-12-09 04:48:12 +08:00
|
|
|
typedef struct ngx_array_s ngx_array_t;
|
2003-07-02 22:41:17 +08:00
|
|
|
typedef struct ngx_open_file_s ngx_open_file_t;
|
2003-06-03 23:42:58 +08:00
|
|
|
typedef struct ngx_command_s ngx_command_t;
|
|
|
|
typedef struct ngx_file_s ngx_file_t;
|
2003-05-20 23:37:55 +08:00
|
|
|
typedef struct ngx_event_s ngx_event_t;
|
2009-08-28 16:12:35 +08:00
|
|
|
typedef struct ngx_event_aio_s ngx_event_aio_t;
|
2003-06-03 23:42:58 +08:00
|
|
|
typedef struct ngx_connection_s ngx_connection_t;
|
2003-05-20 00:39:14 +08:00
|
|
|
|
2004-07-17 01:11:43 +08:00
|
|
|
typedef void (*ngx_event_handler_pt)(ngx_event_t *ev);
|
2005-09-30 22:41:25 +08:00
|
|
|
typedef void (*ngx_connection_handler_pt)(ngx_connection_t *c);
|
2004-07-17 01:11:43 +08:00
|
|
|
|
2003-11-17 05:49:42 +08:00
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
#define NGX_OK 0
|
|
|
|
#define NGX_ERROR -1
|
|
|
|
#define NGX_AGAIN -2
|
|
|
|
#define NGX_BUSY -3
|
|
|
|
#define NGX_DONE -4
|
|
|
|
#define NGX_DECLINED -5
|
|
|
|
#define NGX_ABORT -6
|
|
|
|
|
|
|
|
|
2005-10-10 20:59:41 +08:00
|
|
|
#include <ngx_errno.h>
|
2003-12-19 16:15:11 +08:00
|
|
|
#include <ngx_atomic.h>
|
2005-10-10 20:59:41 +08:00
|
|
|
#include <ngx_thread.h>
|
2005-10-07 21:30:52 +08:00
|
|
|
#include <ngx_rbtree.h>
|
2003-11-17 05:49:42 +08:00
|
|
|
#include <ngx_time.h>
|
|
|
|
#include <ngx_socket.h>
|
2008-09-05 23:43:34 +08:00
|
|
|
#include <ngx_string.h>
|
|
|
|
#include <ngx_files.h>
|
2006-02-02 02:22:15 +08:00
|
|
|
#include <ngx_shmem.h>
|
2003-11-17 05:49:42 +08:00
|
|
|
#include <ngx_process.h>
|
2004-03-04 15:04:55 +08:00
|
|
|
#include <ngx_user.h>
|
2003-10-23 23:54:19 +08:00
|
|
|
#include <ngx_parse.h>
|
2003-05-20 00:39:14 +08:00
|
|
|
#include <ngx_log.h>
|
|
|
|
#include <ngx_alloc.h>
|
2004-06-07 03:49:18 +08:00
|
|
|
#include <ngx_palloc.h>
|
2004-05-28 23:49:23 +08:00
|
|
|
#include <ngx_buf.h>
|
2007-11-24 00:32:50 +08:00
|
|
|
#include <ngx_queue.h>
|
2003-05-20 00:39:14 +08:00
|
|
|
#include <ngx_array.h>
|
2004-09-03 23:50:30 +08:00
|
|
|
#include <ngx_list.h>
|
2005-04-08 23:18:55 +08:00
|
|
|
#include <ngx_hash.h>
|
2003-05-20 00:39:14 +08:00
|
|
|
#include <ngx_file.h>
|
2003-12-01 04:03:18 +08:00
|
|
|
#include <ngx_crc.h>
|
2006-10-19 03:00:21 +08:00
|
|
|
#include <ngx_crc32.h>
|
2011-04-15 18:59:24 +08:00
|
|
|
#include <ngx_murmurhash.h>
|
2004-10-21 23:34:38 +08:00
|
|
|
#if (NGX_PCRE)
|
2003-11-26 04:44:56 +08:00
|
|
|
#include <ngx_regex.h>
|
2003-12-19 16:15:11 +08:00
|
|
|
#endif
|
2005-02-04 03:33:37 +08:00
|
|
|
#include <ngx_radix_tree.h>
|
2003-11-11 05:09:22 +08:00
|
|
|
#include <ngx_times.h>
|
2006-02-08 23:33:12 +08:00
|
|
|
#include <ngx_shmtx.h>
|
2006-11-20 16:51:45 +08:00
|
|
|
#include <ngx_slab.h>
|
2007-01-03 23:25:40 +08:00
|
|
|
#include <ngx_inet.h>
|
|
|
|
#include <ngx_cycle.h>
|
2006-05-23 22:54:58 +08:00
|
|
|
#if (NGX_OPENSSL)
|
|
|
|
#include <ngx_event_openssl.h>
|
|
|
|
#endif
|
2004-03-04 15:04:55 +08:00
|
|
|
#include <ngx_process_cycle.h>
|
2003-05-20 00:39:14 +08:00
|
|
|
#include <ngx_conf_file.h>
|
2007-11-24 01:27:01 +08:00
|
|
|
#include <ngx_resolver.h>
|
2007-09-01 20:11:21 +08:00
|
|
|
#include <ngx_open_file_cache.h>
|
2003-11-14 00:16:33 +08:00
|
|
|
#include <ngx_os.h>
|
2003-05-20 23:37:55 +08:00
|
|
|
#include <ngx_connection.h>
|
2003-05-20 00:39:14 +08:00
|
|
|
|
|
|
|
|
2004-03-16 15:10:12 +08:00
|
|
|
#define LF (u_char) 10
|
|
|
|
#define CR (u_char) 13
|
2003-05-21 21:28:21 +08:00
|
|
|
#define CRLF "\x0d\x0a"
|
|
|
|
|
|
|
|
|
2009-11-16 20:19:02 +08:00
|
|
|
#define ngx_abs(value) (((value) >= 0) ? (value) : - (value))
|
|
|
|
#define ngx_max(val1, val2) ((val1 < val2) ? (val2) : (val1))
|
2009-11-16 20:48:41 +08:00
|
|
|
#define ngx_min(val1, val2) ((val1 > val2) ? (val2) : (val1))
|
2005-10-07 21:30:52 +08:00
|
|
|
|
2006-02-08 23:33:12 +08:00
|
|
|
void ngx_cpuinfo(void);
|
|
|
|
|
2005-10-07 21:30:52 +08:00
|
|
|
|
2002-08-22 23:24:03 +08:00
|
|
|
#endif /* _NGX_CORE_H_INCLUDED_ */
|