mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-27 12:35:26 +00:00
Fix my messing of opt.h and the other options files - it was actually caused by a cyclic #include which I did not see
Read the comments inside opt.h if you are interested.
This commit is contained in:
parent
9fb9033815
commit
3f0dae29e9
@ -2098,7 +2098,7 @@ PREDEFINED = __DOXYGEN__=1 \
|
|||||||
LWIP_STATS=1 \
|
LWIP_STATS=1 \
|
||||||
MEM_USE_POOLS=0 \
|
MEM_USE_POOLS=0 \
|
||||||
LWIP_DNS=1 \
|
LWIP_DNS=1 \
|
||||||
LWIP_SOCKETS=1 \
|
LWIP_SOCKET=1 \
|
||||||
LWIP_NETCONN=1 \
|
LWIP_NETCONN=1 \
|
||||||
IP_SOF_BROADCAST=1 \
|
IP_SOF_BROADCAST=1 \
|
||||||
IP_SOF_BROADCAST_RECV=1 \
|
IP_SOF_BROADCAST_RECV=1 \
|
||||||
@ -2109,9 +2109,10 @@ PREDEFINED = __DOXYGEN__=1 \
|
|||||||
SO_REUSE=1 \
|
SO_REUSE=1 \
|
||||||
SO_REUSE_RXTOALL=1 \
|
SO_REUSE_RXTOALL=1 \
|
||||||
LWIP_HAVE_SLIPIF=1 \
|
LWIP_HAVE_SLIPIF=1 \
|
||||||
LWIP_6LOWPAN=1 \
|
LWIP_6LOWPAN=1
|
||||||
"LWIP_DNS && LWIP_SOCKET " \
|
|
||||||
"(LWIP_DNS && LWIP_SOCKET)=1 "
|
# DONT FORGET to #undef EVERY OPTION IN opt.h AGAIN!
|
||||||
|
# ==================================================
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||||
# tag can be used to specify a list of macro names that should be expanded. The
|
# tag can be used to specify a list of macro names that should be expanded. The
|
||||||
|
@ -50,33 +50,33 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/** Set this to 1 to support CGI (old style) */
|
/** Set this to 1 to support CGI (old style) */
|
||||||
#if !defined LWIP_HTTPD_CGI || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_CGI
|
||||||
#define LWIP_HTTPD_CGI 0
|
#define LWIP_HTTPD_CGI 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to support CGI (new style) */
|
/** Set this to 1 to support CGI (new style) */
|
||||||
#if !defined LWIP_HTTPD_CGI_SSI || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_CGI_SSI
|
||||||
#define LWIP_HTTPD_CGI_SSI 0
|
#define LWIP_HTTPD_CGI_SSI 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to support SSI (Server-Side-Includes) */
|
/** Set this to 1 to support SSI (Server-Side-Includes) */
|
||||||
#if !defined LWIP_HTTPD_SSI || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_SSI
|
||||||
#define LWIP_HTTPD_SSI 0
|
#define LWIP_HTTPD_SSI 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to implement an SSI tag handler callback that gets a const char*
|
/** Set this to 1 to implement an SSI tag handler callback that gets a const char*
|
||||||
* to the tag (instead of an index into a pre-registered array of known tags) */
|
* to the tag (instead of an index into a pre-registered array of known tags) */
|
||||||
#if !defined LWIP_HTTPD_SSI_RAW || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_SSI_RAW
|
||||||
#define LWIP_HTTPD_SSI_RAW 0
|
#define LWIP_HTTPD_SSI_RAW 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to support HTTP POST */
|
/** Set this to 1 to support HTTP POST */
|
||||||
#if !defined LWIP_HTTPD_SUPPORT_POST || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_SUPPORT_POST
|
||||||
#define LWIP_HTTPD_SUPPORT_POST 0
|
#define LWIP_HTTPD_SUPPORT_POST 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The maximum number of parameters that the CGI handler can be sent. */
|
/* The maximum number of parameters that the CGI handler can be sent. */
|
||||||
#if !defined LWIP_HTTPD_MAX_CGI_PARAMETERS || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_MAX_CGI_PARAMETERS
|
||||||
#define LWIP_HTTPD_MAX_CGI_PARAMETERS 16
|
#define LWIP_HTTPD_MAX_CGI_PARAMETERS 16
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -84,26 +84,26 @@
|
|||||||
* arguments indicating a counter for insert string that are too long to be
|
* arguments indicating a counter for insert string that are too long to be
|
||||||
* inserted at once: the SSI handler function must then set 'next_tag_part'
|
* inserted at once: the SSI handler function must then set 'next_tag_part'
|
||||||
* which will be passed back to it in the next call. */
|
* which will be passed back to it in the next call. */
|
||||||
#if !defined LWIP_HTTPD_SSI_MULTIPART || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_SSI_MULTIPART
|
||||||
#define LWIP_HTTPD_SSI_MULTIPART 0
|
#define LWIP_HTTPD_SSI_MULTIPART 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The maximum length of the string comprising the tag name */
|
/* The maximum length of the string comprising the tag name */
|
||||||
#if !defined LWIP_HTTPD_MAX_TAG_NAME_LEN || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_MAX_TAG_NAME_LEN
|
||||||
#define LWIP_HTTPD_MAX_TAG_NAME_LEN 8
|
#define LWIP_HTTPD_MAX_TAG_NAME_LEN 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The maximum length of string that can be returned to replace any given tag */
|
/* The maximum length of string that can be returned to replace any given tag */
|
||||||
#if !defined LWIP_HTTPD_MAX_TAG_INSERT_LEN || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_MAX_TAG_INSERT_LEN
|
||||||
#define LWIP_HTTPD_MAX_TAG_INSERT_LEN 192
|
#define LWIP_HTTPD_MAX_TAG_INSERT_LEN 192
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined LWIP_HTTPD_POST_MANUAL_WND || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_POST_MANUAL_WND
|
||||||
#define LWIP_HTTPD_POST_MANUAL_WND 0
|
#define LWIP_HTTPD_POST_MANUAL_WND 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** This string is passed in the HTTP header as "Server: " */
|
/** This string is passed in the HTTP header as "Server: " */
|
||||||
#if !defined HTTPD_SERVER_AGENT || defined __DOXYGEN__
|
#ifndef HTTPD_SERVER_AGENT
|
||||||
#define HTTPD_SERVER_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)"
|
#define HTTPD_SERVER_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -112,23 +112,23 @@
|
|||||||
* by the makefsdata tool. Static headers mean smaller code size, but
|
* by the makefsdata tool. Static headers mean smaller code size, but
|
||||||
* the (readonly) fsdata will grow a bit as every file includes the HTTP
|
* the (readonly) fsdata will grow a bit as every file includes the HTTP
|
||||||
* header. */
|
* header. */
|
||||||
#if !defined LWIP_HTTPD_DYNAMIC_HEADERS || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_DYNAMIC_HEADERS
|
||||||
#define LWIP_HTTPD_DYNAMIC_HEADERS 0
|
#define LWIP_HTTPD_DYNAMIC_HEADERS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined HTTPD_DEBUG || defined __DOXYGEN__
|
#ifndef HTTPD_DEBUG
|
||||||
#define HTTPD_DEBUG LWIP_DBG_OFF
|
#define HTTPD_DEBUG LWIP_DBG_OFF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to use a memp pool for allocating
|
/** Set this to 1 to use a memp pool for allocating
|
||||||
* struct http_state instead of the heap.
|
* struct http_state instead of the heap.
|
||||||
*/
|
*/
|
||||||
#if !defined HTTPD_USE_MEM_POOL || defined __DOXYGEN__
|
#ifndef HTTPD_USE_MEM_POOL
|
||||||
#define HTTPD_USE_MEM_POOL 0
|
#define HTTPD_USE_MEM_POOL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** The server port for HTTPD to use */
|
/** The server port for HTTPD to use */
|
||||||
#if !defined HTTPD_SERVER_PORT || defined __DOXYGEN__
|
#ifndef HTTPD_SERVER_PORT
|
||||||
#define HTTPD_SERVER_PORT 80
|
#define HTTPD_SERVER_PORT 80
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -136,44 +136,44 @@
|
|||||||
* - number of times pcb->poll is called -> default is 4*500ms = 2s;
|
* - number of times pcb->poll is called -> default is 4*500ms = 2s;
|
||||||
* - reset when pcb->sent is called
|
* - reset when pcb->sent is called
|
||||||
*/
|
*/
|
||||||
#if !defined HTTPD_MAX_RETRIES || defined __DOXYGEN__
|
#ifndef HTTPD_MAX_RETRIES
|
||||||
#define HTTPD_MAX_RETRIES 4
|
#define HTTPD_MAX_RETRIES 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** The poll delay is X*500ms */
|
/** The poll delay is X*500ms */
|
||||||
#if !defined HTTPD_POLL_INTERVAL || defined __DOXYGEN__
|
#ifndef HTTPD_POLL_INTERVAL
|
||||||
#define HTTPD_POLL_INTERVAL 4
|
#define HTTPD_POLL_INTERVAL 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Priority for tcp pcbs created by HTTPD (very low by default).
|
/** Priority for tcp pcbs created by HTTPD (very low by default).
|
||||||
* Lower priorities get killed first when running out of memory.
|
* Lower priorities get killed first when running out of memory.
|
||||||
*/
|
*/
|
||||||
#if !defined HTTPD_TCP_PRIO || defined __DOXYGEN__
|
#ifndef HTTPD_TCP_PRIO
|
||||||
#define HTTPD_TCP_PRIO TCP_PRIO_MIN
|
#define HTTPD_TCP_PRIO TCP_PRIO_MIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to enable timing each file sent */
|
/** Set this to 1 to enable timing each file sent */
|
||||||
#if !defined LWIP_HTTPD_TIMING || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_TIMING
|
||||||
#define LWIP_HTTPD_TIMING 0
|
#define LWIP_HTTPD_TIMING 0
|
||||||
#endif
|
#endif
|
||||||
/** Set this to 1 to enable timing each file sent */
|
/** Set this to 1 to enable timing each file sent */
|
||||||
#if !defined HTTPD_DEBUG_TIMING || defined __DOXYGEN__
|
#ifndef HTTPD_DEBUG_TIMING
|
||||||
#define HTTPD_DEBUG_TIMING LWIP_DBG_OFF
|
#define HTTPD_DEBUG_TIMING LWIP_DBG_OFF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 on platforms where strnstr is not available */
|
/** Set this to 1 on platforms where strnstr is not available */
|
||||||
#if !defined LWIP_HTTPD_STRNSTR_PRIVATE || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_STRNSTR_PRIVATE
|
||||||
#define LWIP_HTTPD_STRNSTR_PRIVATE 1
|
#define LWIP_HTTPD_STRNSTR_PRIVATE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 on platforms where stricmp is not available */
|
/** Set this to 1 on platforms where stricmp is not available */
|
||||||
#if !defined LWIP_HTTPD_STRICMP_PRIVATE || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_STRICMP_PRIVATE
|
||||||
#define LWIP_HTTPD_STRICMP_PRIVATE 0
|
#define LWIP_HTTPD_STRICMP_PRIVATE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Define this to a smaller function if you have itoa() at hand... */
|
/** Define this to a smaller function if you have itoa() at hand... */
|
||||||
#if !defined LWIP_HTTPD_ITOA || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_ITOA
|
||||||
#if !defined LWIP_HTTPD_ITOA_PRIVATE || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_ITOA_PRIVATE
|
||||||
#define LWIP_HTTPD_ITOA_PRIVATE 1
|
#define LWIP_HTTPD_ITOA_PRIVATE 1
|
||||||
#endif
|
#endif
|
||||||
#if LWIP_HTTPD_ITOA_PRIVATE
|
#if LWIP_HTTPD_ITOA_PRIVATE
|
||||||
@ -185,12 +185,12 @@
|
|||||||
|
|
||||||
/** Set this to one to show error pages when parsing a request fails instead
|
/** Set this to one to show error pages when parsing a request fails instead
|
||||||
of simply closing the connection. */
|
of simply closing the connection. */
|
||||||
#if !defined LWIP_HTTPD_SUPPORT_EXTSTATUS || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_SUPPORT_EXTSTATUS
|
||||||
#define LWIP_HTTPD_SUPPORT_EXTSTATUS 0
|
#define LWIP_HTTPD_SUPPORT_EXTSTATUS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 0 to drop support for HTTP/0.9 clients (to save some bytes) */
|
/** Set this to 0 to drop support for HTTP/0.9 clients (to save some bytes) */
|
||||||
#if !defined LWIP_HTTPD_SUPPORT_V09 || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_SUPPORT_V09
|
||||||
#define LWIP_HTTPD_SUPPORT_V09 1
|
#define LWIP_HTTPD_SUPPORT_V09 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -198,32 +198,32 @@
|
|||||||
* ATTENTION: If the generated file system includes HTTP headers, these must
|
* ATTENTION: If the generated file system includes HTTP headers, these must
|
||||||
* include the "Connection: keep-alive" header (pass argument "-11" to makefsdata).
|
* include the "Connection: keep-alive" header (pass argument "-11" to makefsdata).
|
||||||
*/
|
*/
|
||||||
#if !defined LWIP_HTTPD_SUPPORT_11_KEEPALIVE || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_SUPPORT_11_KEEPALIVE
|
||||||
#define LWIP_HTTPD_SUPPORT_11_KEEPALIVE 0
|
#define LWIP_HTTPD_SUPPORT_11_KEEPALIVE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to support HTTP request coming in in multiple packets/pbufs */
|
/** Set this to 1 to support HTTP request coming in in multiple packets/pbufs */
|
||||||
#if !defined LWIP_HTTPD_SUPPORT_REQUESTLIST || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_SUPPORT_REQUESTLIST
|
||||||
#define LWIP_HTTPD_SUPPORT_REQUESTLIST 1
|
#define LWIP_HTTPD_SUPPORT_REQUESTLIST 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LWIP_HTTPD_SUPPORT_REQUESTLIST
|
#if LWIP_HTTPD_SUPPORT_REQUESTLIST
|
||||||
/** Number of rx pbufs to enqueue to parse an incoming request (up to the first
|
/** Number of rx pbufs to enqueue to parse an incoming request (up to the first
|
||||||
newline) */
|
newline) */
|
||||||
#if !defined LWIP_HTTPD_REQ_QUEUELEN || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_REQ_QUEUELEN
|
||||||
#define LWIP_HTTPD_REQ_QUEUELEN 5
|
#define LWIP_HTTPD_REQ_QUEUELEN 5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Number of (TCP payload-) bytes (in pbufs) to enqueue to parse and incoming
|
/** Number of (TCP payload-) bytes (in pbufs) to enqueue to parse and incoming
|
||||||
request (up to the first double-newline) */
|
request (up to the first double-newline) */
|
||||||
#if !defined LWIP_HTTPD_REQ_BUFSIZE || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_REQ_BUFSIZE
|
||||||
#define LWIP_HTTPD_REQ_BUFSIZE LWIP_HTTPD_MAX_REQ_LENGTH
|
#define LWIP_HTTPD_REQ_BUFSIZE LWIP_HTTPD_MAX_REQ_LENGTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Defines the maximum length of a HTTP request line (up to the first CRLF,
|
/** Defines the maximum length of a HTTP request line (up to the first CRLF,
|
||||||
copied from pbuf into this a global buffer when pbuf- or packet-queues
|
copied from pbuf into this a global buffer when pbuf- or packet-queues
|
||||||
are received - otherwise the input pbuf is used directly) */
|
are received - otherwise the input pbuf is used directly) */
|
||||||
#if !defined LWIP_HTTPD_MAX_REQ_LENGTH || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_MAX_REQ_LENGTH
|
||||||
#define LWIP_HTTPD_MAX_REQ_LENGTH LWIP_MIN(1023, (LWIP_HTTPD_REQ_QUEUELEN * PBUF_POOL_BUFSIZE))
|
#define LWIP_HTTPD_MAX_REQ_LENGTH LWIP_MIN(1023, (LWIP_HTTPD_REQ_QUEUELEN * PBUF_POOL_BUFSIZE))
|
||||||
#endif
|
#endif
|
||||||
#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */
|
#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */
|
||||||
@ -233,27 +233,27 @@
|
|||||||
* configured default file names.
|
* configured default file names.
|
||||||
* Set to 0 to disable checking default filenames on non-root directories.
|
* Set to 0 to disable checking default filenames on non-root directories.
|
||||||
*/
|
*/
|
||||||
#if !defined LWIP_HTTPD_MAX_REQUEST_URI_LEN || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_MAX_REQUEST_URI_LEN
|
||||||
#define LWIP_HTTPD_MAX_REQUEST_URI_LEN 63
|
#define LWIP_HTTPD_MAX_REQUEST_URI_LEN 63
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Maximum length of the filename to send as response to a POST request,
|
/** Maximum length of the filename to send as response to a POST request,
|
||||||
* filled in by the application when a POST is finished.
|
* filled in by the application when a POST is finished.
|
||||||
*/
|
*/
|
||||||
#if !defined LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN
|
||||||
#define LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN 63
|
#define LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN 63
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 0 to not send the SSI tag (default is on, so the tag will
|
/** Set this to 0 to not send the SSI tag (default is on, so the tag will
|
||||||
* be sent in the HTML page */
|
* be sent in the HTML page */
|
||||||
#if !defined LWIP_HTTPD_SSI_INCLUDE_TAG || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_SSI_INCLUDE_TAG
|
||||||
#define LWIP_HTTPD_SSI_INCLUDE_TAG 1
|
#define LWIP_HTTPD_SSI_INCLUDE_TAG 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to call tcp_abort when tcp_close fails with memory error.
|
/** Set this to 1 to call tcp_abort when tcp_close fails with memory error.
|
||||||
* This can be used to prevent consuming all memory in situations where the
|
* This can be used to prevent consuming all memory in situations where the
|
||||||
* HTTP server has low priority compared to other communication. */
|
* HTTP server has low priority compared to other communication. */
|
||||||
#if !defined LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR
|
||||||
#define LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR 0
|
#define LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -261,30 +261,30 @@
|
|||||||
* memory for 'struct http_state' or 'struct http_ssi_state'.
|
* memory for 'struct http_state' or 'struct http_ssi_state'.
|
||||||
* ATTENTION: This puts all connections on a linked list, so may be kind of slow.
|
* ATTENTION: This puts all connections on a linked list, so may be kind of slow.
|
||||||
*/
|
*/
|
||||||
#if !defined LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED
|
||||||
#define LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED 0
|
#define LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to send URIs without extension without headers
|
/** Set this to 1 to send URIs without extension without headers
|
||||||
* (who uses this at all??) */
|
* (who uses this at all??) */
|
||||||
#if !defined LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI
|
||||||
#define LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI 0
|
#define LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Default: Tags are sent from struct http_state and are therefore volatile */
|
/** Default: Tags are sent from struct http_state and are therefore volatile */
|
||||||
#if !defined HTTP_IS_TAG_VOLATILE || defined __DOXYGEN__
|
#ifndef HTTP_IS_TAG_VOLATILE
|
||||||
#define HTTP_IS_TAG_VOLATILE(ptr) TCP_WRITE_FLAG_COPY
|
#define HTTP_IS_TAG_VOLATILE(ptr) TCP_WRITE_FLAG_COPY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* By default, the httpd is limited to send 2*pcb->mss to keep resource usage low
|
/* By default, the httpd is limited to send 2*pcb->mss to keep resource usage low
|
||||||
when http is not an important protocol in the device. */
|
when http is not an important protocol in the device. */
|
||||||
#if !defined HTTPD_LIMIT_SENDING_TO_2MSS || defined __DOXYGEN__
|
#ifndef HTTPD_LIMIT_SENDING_TO_2MSS
|
||||||
#define HTTPD_LIMIT_SENDING_TO_2MSS 1
|
#define HTTPD_LIMIT_SENDING_TO_2MSS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define this to a function that returns the maximum amount of data to enqueue.
|
/* Define this to a function that returns the maximum amount of data to enqueue.
|
||||||
The function have this signature: u16_t fn(struct tcp_pcb* pcb); */
|
The function have this signature: u16_t fn(struct tcp_pcb* pcb); */
|
||||||
#if !defined HTTPD_MAX_WRITE_LEN || defined __DOXYGEN__
|
#ifndef HTTPD_MAX_WRITE_LEN
|
||||||
#if HTTPD_LIMIT_SENDING_TO_2MSS
|
#if HTTPD_LIMIT_SENDING_TO_2MSS
|
||||||
#define HTTPD_MAX_WRITE_LEN(pcb) (2 * tcp_mss(pcb))
|
#define HTTPD_MAX_WRITE_LEN(pcb) (2 * tcp_mss(pcb))
|
||||||
#endif
|
#endif
|
||||||
@ -299,7 +299,7 @@
|
|||||||
* - "void fs_close_custom(struct fs_file *file)"
|
* - "void fs_close_custom(struct fs_file *file)"
|
||||||
* Called to free resources allocated by fs_open_custom().
|
* Called to free resources allocated by fs_open_custom().
|
||||||
*/
|
*/
|
||||||
#if !defined LWIP_HTTPD_CUSTOM_FILES || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_CUSTOM_FILES
|
||||||
#define LWIP_HTTPD_CUSTOM_FILES 0
|
#define LWIP_HTTPD_CUSTOM_FILES 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -307,34 +307,34 @@
|
|||||||
* Without this (default=off), only one-block files are supported,
|
* Without this (default=off), only one-block files are supported,
|
||||||
* and the contents must be ready after fs_open().
|
* and the contents must be ready after fs_open().
|
||||||
*/
|
*/
|
||||||
#if !defined LWIP_HTTPD_DYNAMIC_FILE_READ || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_DYNAMIC_FILE_READ
|
||||||
#define LWIP_HTTPD_DYNAMIC_FILE_READ 0
|
#define LWIP_HTTPD_DYNAMIC_FILE_READ 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to include an application state argument per file
|
/** Set this to 1 to include an application state argument per file
|
||||||
* that is opened. This allows to keep a state per connection/file.
|
* that is opened. This allows to keep a state per connection/file.
|
||||||
*/
|
*/
|
||||||
#if !defined LWIP_HTTPD_FILE_STATE || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_FILE_STATE
|
||||||
#define LWIP_HTTPD_FILE_STATE 0
|
#define LWIP_HTTPD_FILE_STATE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** HTTPD_PRECALCULATED_CHECKSUM==1: include precompiled checksums for
|
/** HTTPD_PRECALCULATED_CHECKSUM==1: include precompiled checksums for
|
||||||
* predefined (MSS-sized) chunks of the files to prevent having to calculate
|
* predefined (MSS-sized) chunks of the files to prevent having to calculate
|
||||||
* the checksums at runtime. */
|
* the checksums at runtime. */
|
||||||
#if !defined HTTPD_PRECALCULATED_CHECKSUM || defined __DOXYGEN__
|
#ifndef HTTPD_PRECALCULATED_CHECKSUM
|
||||||
#define HTTPD_PRECALCULATED_CHECKSUM 0
|
#define HTTPD_PRECALCULATED_CHECKSUM 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** LWIP_HTTPD_FS_ASYNC_READ==1: support asynchronous read operations
|
/** LWIP_HTTPD_FS_ASYNC_READ==1: support asynchronous read operations
|
||||||
* (fs_read_async returns FS_READ_DELAYED and calls a callback when finished).
|
* (fs_read_async returns FS_READ_DELAYED and calls a callback when finished).
|
||||||
*/
|
*/
|
||||||
#if !defined LWIP_HTTPD_FS_ASYNC_READ || defined __DOXYGEN__
|
#ifndef LWIP_HTTPD_FS_ASYNC_READ
|
||||||
#define LWIP_HTTPD_FS_ASYNC_READ 0
|
#define LWIP_HTTPD_FS_ASYNC_READ 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to include "fsdata_custom.c" instead of "fsdata.c" for the
|
/** Set this to 1 to include "fsdata_custom.c" instead of "fsdata.c" for the
|
||||||
* file system (to prevent changing the file included in CVS) */
|
* file system (to prevent changing the file included in CVS) */
|
||||||
#if !defined HTTPD_USE_CUSTOM_FSDATA || defined __DOXYGEN__
|
#ifndef HTTPD_USE_CUSTOM_FSDATA
|
||||||
#define HTTPD_USE_CUSTOM_FSDATA 0
|
#define HTTPD_USE_CUSTOM_FSDATA 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
* If not defined, comparision is case sensitive and the provided hostname must be
|
* If not defined, comparision is case sensitive and the provided hostname must be
|
||||||
* uppercase.
|
* uppercase.
|
||||||
*/
|
*/
|
||||||
#if !defined NETBIOS_STRCMP || defined __DOXYGEN__
|
#ifndef NETBIOS_STRCMP
|
||||||
#define NETBIOS_STRCMP(str1, str2) strcmp(str1, str2)
|
#define NETBIOS_STRCMP(str1, str2) strcmp(str1, str2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
* LWIP_MIB2_CALLBACKS and MIB2_STATS. This will give you the callbacks
|
* LWIP_MIB2_CALLBACKS and MIB2_STATS. This will give you the callbacks
|
||||||
* and statistics counters you need to get MIB2 working.
|
* and statistics counters you need to get MIB2 working.
|
||||||
*/
|
*/
|
||||||
#if !defined LWIP_SNMP || defined __DOXYGEN__
|
#ifndef LWIP_SNMP
|
||||||
#define LWIP_SNMP 0
|
#define LWIP_SNMP 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -62,7 +62,7 @@
|
|||||||
* Makes SNMP agent run in a worker thread, so blocking operations
|
* Makes SNMP agent run in a worker thread, so blocking operations
|
||||||
* can be done in MIB calls.
|
* can be done in MIB calls.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_USE_NETCONN || defined __DOXYGEN__
|
#ifndef SNMP_USE_NETCONN
|
||||||
#define SNMP_USE_NETCONN 0
|
#define SNMP_USE_NETCONN 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -71,7 +71,7 @@
|
|||||||
* SNMP agent does not run in a worker thread, so blocking operations
|
* SNMP agent does not run in a worker thread, so blocking operations
|
||||||
* should not be done in MIB calls.
|
* should not be done in MIB calls.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_USE_RAW || defined __DOXYGEN__
|
#ifndef SNMP_USE_RAW
|
||||||
#define SNMP_USE_RAW 1
|
#define SNMP_USE_RAW 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -87,14 +87,14 @@
|
|||||||
/**
|
/**
|
||||||
* SNMP_STACK_SIZE: Stack size of SNMP netconn worker thread
|
* SNMP_STACK_SIZE: Stack size of SNMP netconn worker thread
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_STACK_SIZE || defined __DOXYGEN__
|
#ifndef SNMP_STACK_SIZE
|
||||||
#define SNMP_STACK_SIZE DEFAULT_THREAD_STACKSIZE
|
#define SNMP_STACK_SIZE DEFAULT_THREAD_STACKSIZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SNMP_THREAD_PRIO: SNMP netconn worker thread priority
|
* SNMP_THREAD_PRIO: SNMP netconn worker thread priority
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_THREAD_PRIO || defined __DOXYGEN__
|
#ifndef SNMP_THREAD_PRIO
|
||||||
#define SNMP_THREAD_PRIO DEFAULT_THREAD_PRIO
|
#define SNMP_THREAD_PRIO DEFAULT_THREAD_PRIO
|
||||||
#endif
|
#endif
|
||||||
#endif /* SNMP_USE_NETCONN */
|
#endif /* SNMP_USE_NETCONN */
|
||||||
@ -103,7 +103,7 @@
|
|||||||
* SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap
|
* SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap
|
||||||
* destination is required
|
* destination is required
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_TRAP_DESTINATIONS || defined __DOXYGEN__
|
#ifndef SNMP_TRAP_DESTINATIONS
|
||||||
#define SNMP_TRAP_DESTINATIONS 1
|
#define SNMP_TRAP_DESTINATIONS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -112,14 +112,14 @@
|
|||||||
* a safe action and disabled when SNMP_SAFE_REQUESTS = 1).
|
* a safe action and disabled when SNMP_SAFE_REQUESTS = 1).
|
||||||
* Unsafe requests are disabled by default!
|
* Unsafe requests are disabled by default!
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_SAFE_REQUESTS || defined __DOXYGEN__
|
#ifndef SNMP_SAFE_REQUESTS
|
||||||
#define SNMP_SAFE_REQUESTS 1
|
#define SNMP_SAFE_REQUESTS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum length of strings used.
|
* The maximum length of strings used.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_MAX_OCTET_STRING_LEN || defined __DOXYGEN__
|
#ifndef SNMP_MAX_OCTET_STRING_LEN
|
||||||
#define SNMP_MAX_OCTET_STRING_LEN 127
|
#define SNMP_MAX_OCTET_STRING_LEN 127
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -127,11 +127,11 @@
|
|||||||
* The maximum number of Sub ID's inside an object identifier.
|
* The maximum number of Sub ID's inside an object identifier.
|
||||||
* Indirectly this also limits the maximum depth of SNMP tree.
|
* Indirectly this also limits the maximum depth of SNMP tree.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_MAX_OBJ_ID_LEN || defined __DOXYGEN__
|
#ifndef SNMP_MAX_OBJ_ID_LEN
|
||||||
#define SNMP_MAX_OBJ_ID_LEN 50
|
#define SNMP_MAX_OBJ_ID_LEN 50
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined SNMP_MAX_VALUE_SIZE || defined __DOXYGEN__
|
#ifndef SNMP_MAX_VALUE_SIZE
|
||||||
/**
|
/**
|
||||||
* The maximum size of a value.
|
* The maximum size of a value.
|
||||||
*/
|
*/
|
||||||
@ -146,7 +146,7 @@
|
|||||||
* The snmp read-access community. Used for write-access and traps, too
|
* The snmp read-access community. Used for write-access and traps, too
|
||||||
* unless SNMP_COMMUNITY_WRITE or SNMP_COMMUNITY_TRAP are enabled, respectively.
|
* unless SNMP_COMMUNITY_WRITE or SNMP_COMMUNITY_TRAP are enabled, respectively.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_COMMUNITY || defined __DOXYGEN__
|
#ifndef SNMP_COMMUNITY
|
||||||
#define SNMP_COMMUNITY "public"
|
#define SNMP_COMMUNITY "public"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -154,14 +154,14 @@
|
|||||||
* The snmp write-access community.
|
* The snmp write-access community.
|
||||||
* Set this community to "" in order to disallow any write access.
|
* Set this community to "" in order to disallow any write access.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_COMMUNITY_WRITE || defined __DOXYGEN__
|
#ifndef SNMP_COMMUNITY_WRITE
|
||||||
#define SNMP_COMMUNITY_WRITE "private"
|
#define SNMP_COMMUNITY_WRITE "private"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The snmp community used for sending traps.
|
* The snmp community used for sending traps.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_COMMUNITY_TRAP || defined __DOXYGEN__
|
#ifndef SNMP_COMMUNITY_TRAP
|
||||||
#define SNMP_COMMUNITY_TRAP "public"
|
#define SNMP_COMMUNITY_TRAP "public"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -170,14 +170,14 @@
|
|||||||
* If community names shall be adjusted at runtime via snmp_set_community() calls,
|
* If community names shall be adjusted at runtime via snmp_set_community() calls,
|
||||||
* enter here the possible maximum length (+1 for terminating null character).
|
* enter here the possible maximum length (+1 for terminating null character).
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_MAX_COMMUNITY_STR_LEN || defined __DOXYGEN__
|
#ifndef SNMP_MAX_COMMUNITY_STR_LEN
|
||||||
#define SNMP_MAX_COMMUNITY_STR_LEN LWIP_MAX(LWIP_MAX(sizeof(SNMP_COMMUNITY), sizeof(SNMP_COMMUNITY_WRITE)), sizeof(SNMP_COMMUNITY_TRAP))
|
#define SNMP_MAX_COMMUNITY_STR_LEN LWIP_MAX(LWIP_MAX(sizeof(SNMP_COMMUNITY), sizeof(SNMP_COMMUNITY_WRITE)), sizeof(SNMP_COMMUNITY_TRAP))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The OID identifiying the device. This may be the enterprise OID itself or any OID located below it in tree.
|
* The OID identifiying the device. This may be the enterprise OID itself or any OID located below it in tree.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_DEVICE_ENTERPRISE_OID || defined __DOXYGEN__
|
#ifndef SNMP_DEVICE_ENTERPRISE_OID
|
||||||
#define SNMP_LWIP_ENTERPRISE_OID 26381
|
#define SNMP_LWIP_ENTERPRISE_OID 26381
|
||||||
/**
|
/**
|
||||||
* IANA assigned enterprise ID for lwIP is 26381
|
* IANA assigned enterprise ID for lwIP is 26381
|
||||||
@ -202,28 +202,28 @@
|
|||||||
/**
|
/**
|
||||||
* SNMP_DEBUG: Enable debugging for SNMP messages.
|
* SNMP_DEBUG: Enable debugging for SNMP messages.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_DEBUG || defined __DOXYGEN__
|
#ifndef SNMP_DEBUG
|
||||||
#define SNMP_DEBUG LWIP_DBG_OFF
|
#define SNMP_DEBUG LWIP_DBG_OFF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
|
* SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_MIB_DEBUG || defined __DOXYGEN__
|
#ifndef SNMP_MIB_DEBUG
|
||||||
#define SNMP_MIB_DEBUG LWIP_DBG_OFF
|
#define SNMP_MIB_DEBUG LWIP_DBG_OFF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if the MIB2 implementation of LWIP SNMP stack is used.
|
* Indicates if the MIB2 implementation of LWIP SNMP stack is used.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_LWIP_MIB2 || defined __DOXYGEN__
|
#ifndef SNMP_LWIP_MIB2
|
||||||
#define SNMP_LWIP_MIB2 LWIP_SNMP
|
#define SNMP_LWIP_MIB2 LWIP_SNMP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Value return for sysDesc field of MIB2.
|
* Value return for sysDesc field of MIB2.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_LWIP_MIB2_SYSDESC || defined __DOXYGEN__
|
#ifndef SNMP_LWIP_MIB2_SYSDESC
|
||||||
#define SNMP_LWIP_MIB2_SYSDESC "lwIP"
|
#define SNMP_LWIP_MIB2_SYSDESC "lwIP"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -231,7 +231,7 @@
|
|||||||
* Value return for sysName field of MIB2.
|
* Value return for sysName field of MIB2.
|
||||||
* To make sysName field settable, call snmp_mib2_set_sysname() to provide the necessary buffers.
|
* To make sysName field settable, call snmp_mib2_set_sysname() to provide the necessary buffers.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_LWIP_MIB2_SYSNAME || defined __DOXYGEN__
|
#ifndef SNMP_LWIP_MIB2_SYSNAME
|
||||||
#define SNMP_LWIP_MIB2_SYSNAME "FQDN-unk"
|
#define SNMP_LWIP_MIB2_SYSNAME "FQDN-unk"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -239,7 +239,7 @@
|
|||||||
* Value return for sysContact field of MIB2.
|
* Value return for sysContact field of MIB2.
|
||||||
* To make sysContact field settable, call snmp_mib2_set_syscontact() to provide the necessary buffers.
|
* To make sysContact field settable, call snmp_mib2_set_syscontact() to provide the necessary buffers.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_LWIP_MIB2_SYSCONTACT || defined __DOXYGEN__
|
#ifndef SNMP_LWIP_MIB2_SYSCONTACT
|
||||||
#define SNMP_LWIP_MIB2_SYSCONTACT ""
|
#define SNMP_LWIP_MIB2_SYSCONTACT ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -247,7 +247,7 @@
|
|||||||
* Value return for sysLocation field of MIB2.
|
* Value return for sysLocation field of MIB2.
|
||||||
* To make sysLocation field settable, call snmp_mib2_set_syslocation() to provide the necessary buffers.
|
* To make sysLocation field settable, call snmp_mib2_set_syslocation() to provide the necessary buffers.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_LWIP_MIB2_SYSLOCATION || defined __DOXYGEN__
|
#ifndef SNMP_LWIP_MIB2_SYSLOCATION
|
||||||
#define SNMP_LWIP_MIB2_SYSLOCATION ""
|
#define SNMP_LWIP_MIB2_SYSLOCATION ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -259,7 +259,7 @@
|
|||||||
* For the stack this could be useful in case that SNMP processing is done in TCP/IP thread. In this situation a request with many
|
* For the stack this could be useful in case that SNMP processing is done in TCP/IP thread. In this situation a request with many
|
||||||
* repetitions could block the thread for a longer time. Setting limit here will keep the stack more responsive.
|
* repetitions could block the thread for a longer time. Setting limit here will keep the stack more responsive.
|
||||||
*/
|
*/
|
||||||
#if !defined SNMP_LWIP_GETBULK_MAX_REPETITIONS || defined __DOXYGEN__
|
#ifndef SNMP_LWIP_GETBULK_MAX_REPETITIONS
|
||||||
#define SNMP_LWIP_GETBULK_MAX_REPETITIONS 0
|
#define SNMP_LWIP_GETBULK_MAX_REPETITIONS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -49,18 +49,18 @@
|
|||||||
* Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds instead of this one
|
* Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds instead of this one
|
||||||
* if you need the additional precision.
|
* if you need the additional precision.
|
||||||
*/
|
*/
|
||||||
#if !defined SNTP_SET_SYSTEM_TIME || defined __DOXYGEN__
|
#ifndef SNTP_SET_SYSTEM_TIME
|
||||||
#define SNTP_SET_SYSTEM_TIME(sec) LWIP_UNUSED_ARG(sec)
|
#define SNTP_SET_SYSTEM_TIME(sec) LWIP_UNUSED_ARG(sec)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** The maximum number of SNTP servers that can be set */
|
/** The maximum number of SNTP servers that can be set */
|
||||||
#if !defined SNTP_MAX_SERVERS || defined __DOXYGEN__
|
#ifndef SNTP_MAX_SERVERS
|
||||||
#define SNTP_MAX_SERVERS LWIP_DHCP_MAX_NTP_SERVERS
|
#define SNTP_MAX_SERVERS LWIP_DHCP_MAX_NTP_SERVERS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to implement the callback function called by dhcp when
|
/** Set this to 1 to implement the callback function called by dhcp when
|
||||||
* NTP servers are received. */
|
* NTP servers are received. */
|
||||||
#if !defined SNTP_GET_SERVERS_FROM_DHCP || defined __DOXYGEN__
|
#ifndef SNTP_GET_SERVERS_FROM_DHCP
|
||||||
#define SNTP_GET_SERVERS_FROM_DHCP LWIP_DHCP_GET_NTP_SRV
|
#define SNTP_GET_SERVERS_FROM_DHCP LWIP_DHCP_GET_NTP_SRV
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -68,24 +68,24 @@
|
|||||||
* One server address/name can be defined as default if SNTP_SERVER_DNS == 1:
|
* One server address/name can be defined as default if SNTP_SERVER_DNS == 1:
|
||||||
* \#define SNTP_SERVER_ADDRESS "pool.ntp.org"
|
* \#define SNTP_SERVER_ADDRESS "pool.ntp.org"
|
||||||
*/
|
*/
|
||||||
#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__
|
#ifndef SNTP_SERVER_DNS
|
||||||
#define SNTP_SERVER_DNS 0
|
#define SNTP_SERVER_DNS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SNTP_DEBUG: Enable debugging for SNTP.
|
* SNTP_DEBUG: Enable debugging for SNTP.
|
||||||
*/
|
*/
|
||||||
#if !defined SNTP_DEBUG || defined __DOXYGEN__
|
#ifndef SNTP_DEBUG
|
||||||
#define SNTP_DEBUG LWIP_DBG_OFF
|
#define SNTP_DEBUG LWIP_DBG_OFF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** SNTP server port */
|
/** SNTP server port */
|
||||||
#if !defined SNTP_PORT || defined __DOXYGEN__
|
#ifndef SNTP_PORT
|
||||||
#define SNTP_PORT 123
|
#define SNTP_PORT 123
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Set this to 1 to allow config of SNTP server(s) by DNS name */
|
/** Set this to 1 to allow config of SNTP server(s) by DNS name */
|
||||||
#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__
|
#ifndef SNTP_SERVER_DNS
|
||||||
#define SNTP_SERVER_DNS 0
|
#define SNTP_SERVER_DNS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -103,7 +103,7 @@
|
|||||||
* currently a cozy number like one second. This check avoids using a
|
* currently a cozy number like one second. This check avoids using a
|
||||||
* server whose synchronization source has expired for a very long time.
|
* server whose synchronization source has expired for a very long time.
|
||||||
*/
|
*/
|
||||||
#if !defined SNTP_CHECK_RESPONSE || defined __DOXYGEN__
|
#ifndef SNTP_CHECK_RESPONSE
|
||||||
#define SNTP_CHECK_RESPONSE 0
|
#define SNTP_CHECK_RESPONSE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -113,14 +113,14 @@
|
|||||||
* which must return the delay in milliseconds as u32_t.
|
* which must return the delay in milliseconds as u32_t.
|
||||||
* Turned off by default.
|
* Turned off by default.
|
||||||
*/
|
*/
|
||||||
#if !defined SNTP_STARTUP_DELAY || defined __DOXYGEN__
|
#ifndef SNTP_STARTUP_DELAY
|
||||||
#define SNTP_STARTUP_DELAY 0
|
#define SNTP_STARTUP_DELAY 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** If you want the startup delay to be a function, define this
|
/** If you want the startup delay to be a function, define this
|
||||||
* to a function (including the brackets) and define SNTP_STARTUP_DELAY to 1.
|
* to a function (including the brackets) and define SNTP_STARTUP_DELAY to 1.
|
||||||
*/
|
*/
|
||||||
#if !defined SNTP_STARTUP_DELAY_FUNC || defined __DOXYGEN__
|
#ifndef SNTP_STARTUP_DELAY_FUNC
|
||||||
#define SNTP_STARTUP_DELAY_FUNC SNTP_STARTUP_DELAY
|
#define SNTP_STARTUP_DELAY_FUNC SNTP_STARTUP_DELAY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -128,21 +128,21 @@
|
|||||||
* Also used as retry timeout - this shouldn't be too low.
|
* Also used as retry timeout - this shouldn't be too low.
|
||||||
* Default is 3 seconds.
|
* Default is 3 seconds.
|
||||||
*/
|
*/
|
||||||
#if !defined SNTP_RECV_TIMEOUT || defined __DOXYGEN__
|
#ifndef SNTP_RECV_TIMEOUT
|
||||||
#define SNTP_RECV_TIMEOUT 3000
|
#define SNTP_RECV_TIMEOUT 3000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** SNTP update delay - in milliseconds
|
/** SNTP update delay - in milliseconds
|
||||||
* Default is 1 hour. Must not be beolw 15 seconds by specification (i.e. 15000)
|
* Default is 1 hour. Must not be beolw 15 seconds by specification (i.e. 15000)
|
||||||
*/
|
*/
|
||||||
#if !defined SNTP_UPDATE_DELAY || defined __DOXYGEN__
|
#ifndef SNTP_UPDATE_DELAY
|
||||||
#define SNTP_UPDATE_DELAY 3600000
|
#define SNTP_UPDATE_DELAY 3600000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** SNTP macro to get system time, used with SNTP_CHECK_RESPONSE >= 2
|
/** SNTP macro to get system time, used with SNTP_CHECK_RESPONSE >= 2
|
||||||
* to send in request and compare in response.
|
* to send in request and compare in response.
|
||||||
*/
|
*/
|
||||||
#if !defined SNTP_GET_SYSTEM_TIME || defined __DOXYGEN__
|
#ifndef SNTP_GET_SYSTEM_TIME
|
||||||
#define SNTP_GET_SYSTEM_TIME(sec, us) do { (sec) = 0; (us) = 0; } while(0)
|
#define SNTP_GET_SYSTEM_TIME(sec, us) do { (sec) = 0; (us) = 0; } while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -150,19 +150,19 @@
|
|||||||
* received is invalid.
|
* received is invalid.
|
||||||
* This is doubled with each retry until SNTP_RETRY_TIMEOUT_MAX is reached.
|
* This is doubled with each retry until SNTP_RETRY_TIMEOUT_MAX is reached.
|
||||||
*/
|
*/
|
||||||
#if !defined SNTP_RETRY_TIMEOUT || defined __DOXYGEN__
|
#ifndef SNTP_RETRY_TIMEOUT
|
||||||
#define SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT
|
#define SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Maximum retry timeout (in milliseconds). */
|
/** Maximum retry timeout (in milliseconds). */
|
||||||
#if !defined SNTP_RETRY_TIMEOUT_MAX || defined __DOXYGEN__
|
#ifndef SNTP_RETRY_TIMEOUT_MAX
|
||||||
#define SNTP_RETRY_TIMEOUT_MAX (SNTP_RETRY_TIMEOUT * 10)
|
#define SNTP_RETRY_TIMEOUT_MAX (SNTP_RETRY_TIMEOUT * 10)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Increase retry timeout with every retry sent
|
/** Increase retry timeout with every retry sent
|
||||||
* Default is on to conform to RFC.
|
* Default is on to conform to RFC.
|
||||||
*/
|
*/
|
||||||
#if !defined SNTP_RETRY_TIMEOUT_EXP || defined __DOXYGEN__
|
#ifndef SNTP_RETRY_TIMEOUT_EXP
|
||||||
#define SNTP_RETRY_TIMEOUT_EXP 1
|
#define SNTP_RETRY_TIMEOUT_EXP 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user