Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ngx_http_script.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) Igor Sysoev
4  * Copyright (C) Nginx, Inc.
5  */
6 
7 
8 #ifndef _NGX_HTTP_SCRIPT_H_INCLUDED_
9 #define _NGX_HTTP_SCRIPT_H_INCLUDED_
10 
11 
12 #include <ngx_config.h>
13 #include <ngx_core.h>
14 #include <ngx_http.h>
15 
16 
17 typedef struct {
18  u_char *ip;
19  u_char *pos;
21 
24 
25  /* the start of the rewritten arguments */
26  u_char *args;
27 
28  unsigned flushed:1;
29  unsigned skip:1;
30  unsigned quote:1;
31  unsigned is_args:1;
32  unsigned log:1;
33 
37 
38 
39 typedef struct {
42 
46 
51 
52  void *main;
53 
54  unsigned compile_args:1;
55  unsigned complete_lengths:1;
56  unsigned complete_values:1;
57  unsigned zero:1;
58  unsigned conf_prefix:1;
59  unsigned root_prefix:1;
60 
61  unsigned dup_capture:1;
62  unsigned args:1;
64 
65 
66 typedef struct {
69  void *lengths;
70  void *values;
72 
73 
74 typedef struct {
78 
79  unsigned zero:1;
80  unsigned conf_prefix:1;
81  unsigned root_prefix:1;
83 
84 
87 
88 
89 typedef struct {
91  uintptr_t len;
93 
94 
95 typedef struct {
97  uintptr_t index;
99 
100 
101 typedef struct {
104  uintptr_t data;
106 
107 
108 typedef struct {
110  uintptr_t n;
112 
113 
114 #if (NGX_PCRE)
115 
116 typedef struct {
118  ngx_http_regex_t *regex;
119  ngx_array_t *lengths;
120  uintptr_t size;
121  uintptr_t status;
122  uintptr_t next;
123 
124  uintptr_t test:1;
125  uintptr_t negative_test:1;
126  uintptr_t uri:1;
127  uintptr_t args:1;
128 
129  /* add the r->args to the new arguments */
130  uintptr_t add_args:1;
131 
132  uintptr_t redirect:1;
133  uintptr_t break_cycle:1;
134 
135  ngx_str_t name;
136 } ngx_http_script_regex_code_t;
137 
138 
139 typedef struct {
141 
142  uintptr_t uri:1;
143  uintptr_t args:1;
144 
145  /* add the r->args to the new arguments */
146  uintptr_t add_args:1;
147 
148  uintptr_t redirect:1;
149 } ngx_http_script_regex_end_code_t;
150 
151 #endif
152 
153 
154 typedef struct {
156  uintptr_t conf_prefix;
158 
159 
160 typedef struct {
162  uintptr_t status;
165 
166 
167 typedef enum {
177 
178 
179 typedef struct {
181  uintptr_t op;
183 
184 
185 typedef struct {
187  uintptr_t next;
188  void **loc_conf;
190 
191 
192 typedef struct {
196 
197 
198 typedef struct {
200  uintptr_t value;
201  uintptr_t text_len;
202  uintptr_t text_data;
204 
205 
209  ngx_http_complex_value_t *val, ngx_str_t *value);
212  void *conf);
213 
214 
216  ngx_array_t *predicates);
218  void *conf);
219 
223  void *code_lengths, size_t reserved, void *code_values);
225  ngx_array_t *indices);
226 
228  size_t size);
229 void *ngx_http_script_add_code(ngx_array_t *codes, size_t size, void *code);
230 
239 #if (NGX_PCRE)
240 void ngx_http_script_regex_start_code(ngx_http_script_engine_t *e);
241 void ngx_http_script_regex_end_code(ngx_http_script_engine_t *e);
242 #endif
255 
256 
257 #endif /* _NGX_HTTP_SCRIPT_H_INCLUDED_ */