1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Nginx, Inc.
5 */
6
7
8#ifndef _NGX_CORE_H_INCLUDED_
9#define _NGX_CORE_H_INCLUDED_
10
11
12#include <ngx_config.h>
13
14
15typedef struct ngx_module_s          ngx_module_t;
16typedef struct ngx_conf_s            ngx_conf_t;
17typedef struct ngx_cycle_s           ngx_cycle_t;
18typedef struct ngx_pool_s            ngx_pool_t;
19typedef struct ngx_chain_s           ngx_chain_t;
20typedef struct ngx_log_s             ngx_log_t;
21typedef struct ngx_open_file_s       ngx_open_file_t;
22typedef struct ngx_command_s         ngx_command_t;
23typedef struct ngx_file_s            ngx_file_t;
24typedef struct ngx_event_s           ngx_event_t;
25typedef struct ngx_event_aio_s       ngx_event_aio_t;
26typedef struct ngx_connection_s      ngx_connection_t;
27typedef struct ngx_thread_task_s     ngx_thread_task_t;
28typedef struct ngx_ssl_s             ngx_ssl_t;
29typedef struct ngx_ssl_connection_s  ngx_ssl_connection_t;
30
31typedef void (*ngx_event_handler_pt)(ngx_event_t *ev);
32typedef void (*ngx_connection_handler_pt)(ngx_connection_t *c);
33
34
35#define  NGX_OK          0
36#define  NGX_ERROR      -1
37#define  NGX_AGAIN      -2
38#define  NGX_BUSY       -3
39#define  NGX_DONE       -4
40#define  NGX_DECLINED   -5
41#define  NGX_ABORT      -6
42
43
44#include <ngx_errno.h>
45#include <ngx_atomic.h>
46#include <ngx_thread.h>
47#include <ngx_rbtree.h>
48#include <ngx_time.h>
49#include <ngx_socket.h>
50#include <ngx_string.h>
51#include <ngx_files.h>
52#include <ngx_shmem.h>
53#include <ngx_process.h>
54#include <ngx_user.h>
55#include <ngx_dlopen.h>
56#include <ngx_parse.h>
57#include <ngx_parse_time.h>
58#include <ngx_log.h>
59#include <ngx_alloc.h>
60#include <ngx_palloc.h>
61#include <ngx_buf.h>
62#include <ngx_queue.h>
63#include <ngx_array.h>
64#include <ngx_list.h>
65#include <ngx_hash.h>
66#include <ngx_file.h>
67#include <ngx_crc.h>
68#include <ngx_crc32.h>
69#include <ngx_murmurhash.h>
70#if (NGX_PCRE)
71#include <ngx_regex.h>
72#endif
73#include <ngx_radix_tree.h>
74#include <ngx_times.h>
75#include <ngx_rwlock.h>
76#include <ngx_shmtx.h>
77#include <ngx_slab.h>
78#include <ngx_inet.h>
79#include <ngx_cycle.h>
80#include <ngx_resolver.h>
81#if (NGX_OPENSSL)
82#include <ngx_event_openssl.h>
83#endif
84#include <ngx_process_cycle.h>
85#include <ngx_conf_file.h>
86#include <ngx_module.h>
87#include <ngx_open_file_cache.h>
88#include <ngx_os.h>
89#include <ngx_connection.h>
90#include <ngx_syslog.h>
91#include <ngx_proxy_protocol.h>
92
93
94#define LF     (u_char) '\n'
95#define CR     (u_char) '\r'
96#define CRLF   "\r\n"
97
98
99#define ngx_abs(value)       (((value) >= 0) ? (value) : - (value))
100#define ngx_max(val1, val2)  ((val1 < val2) ? (val2) : (val1))
101#define ngx_min(val1, val2)  ((val1 > val2) ? (val2) : (val1))
102
103void ngx_cpuinfo(void);
104
105#if (NGX_HAVE_OPENAT)
106#define NGX_DISABLE_SYMLINKS_OFF        0
107#define NGX_DISABLE_SYMLINKS_ON         1
108#define NGX_DISABLE_SYMLINKS_NOTOWNER   2
109#endif
110
111#endif /* _NGX_CORE_H_INCLUDED_ */
112