UbixOS V2 2.0

httpd_opts.h
Go to the documentation of this file.
1
6 /*
7 * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without modification,
11 * are permitted provided that the following conditions are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 * 3. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
22 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
24 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
30 * OF SUCH DAMAGE.
31 *
32 * This file is part of the lwIP TCP/IP stack.
33 *
34 * Author: Adam Dunkels <adam@sics.se>
35 *
36 * This version of the file has been modified by Texas Instruments to offer
37 * simple server-side-include (SSI) and Common Gateway Interface (CGI)
38 * capability.
39 */
40
41 #ifndef LWIP_HDR_APPS_HTTPD_OPTS_H
42 #define LWIP_HDR_APPS_HTTPD_OPTS_H
43
44 #include "lwip/opt.h"
45
53 #if !defined LWIP_HTTPD_CGI || defined __DOXYGEN__
54 #define LWIP_HTTPD_CGI 0
55 #endif
56
58 #if !defined LWIP_HTTPD_CGI_SSI || defined __DOXYGEN__
59 #define LWIP_HTTPD_CGI_SSI 0
60 #endif
61
63 #if !defined LWIP_HTTPD_SSI || defined __DOXYGEN__
64 #define LWIP_HTTPD_SSI 0
65 #endif
66
69 #if !defined LWIP_HTTPD_SSI_RAW || defined __DOXYGEN__
70 #define LWIP_HTTPD_SSI_RAW 0
71 #endif
72
74 #if !defined LWIP_HTTPD_SUPPORT_POST || defined __DOXYGEN__
75 #define LWIP_HTTPD_SUPPORT_POST 0
76 #endif
77
78 /* The maximum number of parameters that the CGI handler can be sent. */
79 #if !defined LWIP_HTTPD_MAX_CGI_PARAMETERS || defined __DOXYGEN__
80 #define LWIP_HTTPD_MAX_CGI_PARAMETERS 16
81 #endif
82
87 #if !defined LWIP_HTTPD_SSI_MULTIPART || defined __DOXYGEN__
88 #define LWIP_HTTPD_SSI_MULTIPART 0
89 #endif
90
91 /* The maximum length of the string comprising the tag name */
92 #if !defined LWIP_HTTPD_MAX_TAG_NAME_LEN || defined __DOXYGEN__
93 #define LWIP_HTTPD_MAX_TAG_NAME_LEN 8
94 #endif
95
96 /* The maximum length of string that can be returned to replace any given tag */
97 #if !defined LWIP_HTTPD_MAX_TAG_INSERT_LEN || defined __DOXYGEN__
98 #define LWIP_HTTPD_MAX_TAG_INSERT_LEN 192
99 #endif
100
101 #if !defined LWIP_HTTPD_POST_MANUAL_WND || defined __DOXYGEN__
102 #define LWIP_HTTPD_POST_MANUAL_WND 0
103 #endif
104
106 #if !defined HTTPD_SERVER_AGENT || defined __DOXYGEN__
107 #define HTTPD_SERVER_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)"
108 #endif
109
115 #if !defined LWIP_HTTPD_DYNAMIC_HEADERS || defined __DOXYGEN__
116 #define LWIP_HTTPD_DYNAMIC_HEADERS 0
117 #endif
118
119 #if !defined HTTPD_DEBUG || defined __DOXYGEN__
120 #define HTTPD_DEBUG LWIP_DBG_OFF
121 #endif
122
126 #if !defined HTTPD_USE_MEM_POOL || defined __DOXYGEN__
127 #define HTTPD_USE_MEM_POOL 0
128 #endif
129
131 #if !defined HTTPD_SERVER_PORT || defined __DOXYGEN__
132 #define HTTPD_SERVER_PORT 80
133 #endif
134
139 #if !defined HTTPD_MAX_RETRIES || defined __DOXYGEN__
140 #define HTTPD_MAX_RETRIES 4
141 #endif
142
144 #if !defined HTTPD_POLL_INTERVAL || defined __DOXYGEN__
145 #define HTTPD_POLL_INTERVAL 4
146 #endif
147
151 #if !defined HTTPD_TCP_PRIO || defined __DOXYGEN__
152 #define HTTPD_TCP_PRIO TCP_PRIO_MIN
153 #endif
154
156 #if !defined LWIP_HTTPD_TIMING || defined __DOXYGEN__
157 #define LWIP_HTTPD_TIMING 0
158 #endif
159
160 #if !defined HTTPD_DEBUG_TIMING || defined __DOXYGEN__
161 #define HTTPD_DEBUG_TIMING LWIP_DBG_OFF
162 #endif
163
166 #if !defined LWIP_HTTPD_SUPPORT_EXTSTATUS || defined __DOXYGEN__
167 #define LWIP_HTTPD_SUPPORT_EXTSTATUS 0
168 #endif
169
171 #if !defined LWIP_HTTPD_SUPPORT_V09 || defined __DOXYGEN__
172 #define LWIP_HTTPD_SUPPORT_V09 1
173 #endif
174
179 #if !defined LWIP_HTTPD_SUPPORT_11_KEEPALIVE || defined __DOXYGEN__
180 #define LWIP_HTTPD_SUPPORT_11_KEEPALIVE 0
181 #endif
182
184 #if !defined LWIP_HTTPD_SUPPORT_REQUESTLIST || defined __DOXYGEN__
185 #define LWIP_HTTPD_SUPPORT_REQUESTLIST 1
186 #endif
187
188 #if LWIP_HTTPD_SUPPORT_REQUESTLIST
189
191 #if !defined LWIP_HTTPD_REQ_QUEUELEN || defined __DOXYGEN__
192 #define LWIP_HTTPD_REQ_QUEUELEN 5
193 #endif
194
197 #if !defined LWIP_HTTPD_REQ_BUFSIZE || defined __DOXYGEN__
198 #define LWIP_HTTPD_REQ_BUFSIZE LWIP_HTTPD_MAX_REQ_LENGTH
199 #endif
200
204 #if !defined LWIP_HTTPD_MAX_REQ_LENGTH || defined __DOXYGEN__
205 #define LWIP_HTTPD_MAX_REQ_LENGTH LWIP_MIN(1023, (LWIP_HTTPD_REQ_QUEUELEN * PBUF_POOL_BUFSIZE))
206 #endif
207 #endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */
208
214 #if !defined LWIP_HTTPD_MAX_REQUEST_URI_LEN || defined __DOXYGEN__
215 #define LWIP_HTTPD_MAX_REQUEST_URI_LEN 63
216 #endif
217
221 #if !defined LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN || defined __DOXYGEN__
222 #define LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN 63
223 #endif
224
227 #if !defined LWIP_HTTPD_SSI_INCLUDE_TAG || defined __DOXYGEN__
228 #define LWIP_HTTPD_SSI_INCLUDE_TAG 1
229 #endif
230
234 #if !defined LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR || defined __DOXYGEN__
235 #define LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR 0
236 #endif
237
242 #if !defined LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED || defined __DOXYGEN__
243 #define LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED 0
244 #endif
245
248 #if !defined LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI || defined __DOXYGEN__
249 #define LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI 0
250 #endif
251
253 #if !defined HTTP_IS_TAG_VOLATILE || defined __DOXYGEN__
254 #define HTTP_IS_TAG_VOLATILE(ptr) TCP_WRITE_FLAG_COPY
255 #endif
256
257 /* By default, the httpd is limited to send 2*pcb->mss to keep resource usage low
258 when http is not an important protocol in the device. */
259 #if !defined HTTPD_LIMIT_SENDING_TO_2MSS || defined __DOXYGEN__
260 #define HTTPD_LIMIT_SENDING_TO_2MSS 1
261 #endif
262
263 /* Define this to a function that returns the maximum amount of data to enqueue.
264 The function have this signature: u16_t fn(struct tcp_pcb* pcb); */
265 #if !defined HTTPD_MAX_WRITE_LEN || defined __DOXYGEN__
266 #if HTTPD_LIMIT_SENDING_TO_2MSS
267 #define HTTPD_MAX_WRITE_LEN(pcb) (2 * tcp_mss(pcb))
268 #endif
269 #endif
270
271 /*------------------- FS OPTIONS -------------------*/
272
280 #if !defined LWIP_HTTPD_CUSTOM_FILES || defined __DOXYGEN__
281 #define LWIP_HTTPD_CUSTOM_FILES 0
282 #endif
283
288 #if !defined LWIP_HTTPD_DYNAMIC_FILE_READ || defined __DOXYGEN__
289 #define LWIP_HTTPD_DYNAMIC_FILE_READ 0
290 #endif
291
295 #if !defined LWIP_HTTPD_FILE_STATE || defined __DOXYGEN__
296 #define LWIP_HTTPD_FILE_STATE 0
297 #endif
298
302 #if !defined HTTPD_PRECALCULATED_CHECKSUM || defined __DOXYGEN__
303 #define HTTPD_PRECALCULATED_CHECKSUM 0
304 #endif
305
309 #if !defined LWIP_HTTPD_FS_ASYNC_READ || defined __DOXYGEN__
310 #define LWIP_HTTPD_FS_ASYNC_READ 0
311 #endif
312
315 #if !defined HTTPD_USE_CUSTOM_FSDATA || defined __DOXYGEN__
316 #define HTTPD_USE_CUSTOM_FSDATA 0
317 #endif
318
323 #endif /* LWIP_HDR_APPS_HTTPD_OPTS_H */