UbixOS  2.0
sntp_opts.h
Go to the documentation of this file.
1 
6 /*
7  * Copyright (c) 2007-2009 Frédéric Bernon, Simon Goldschmidt
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: Frédéric Bernon, Simon Goldschmidt
35  *
36  */
37 #ifndef LWIP_HDR_APPS_SNTP_OPTS_H
38 #define LWIP_HDR_APPS_SNTP_OPTS_H
39 
40 #include "lwip/opt.h"
41 
52 #if !defined SNTP_SET_SYSTEM_TIME || defined __DOXYGEN__
53 #define SNTP_SET_SYSTEM_TIME(sec) LWIP_UNUSED_ARG(sec)
54 #endif
55 
57 #if !defined SNTP_MAX_SERVERS || defined __DOXYGEN__
58 #define SNTP_MAX_SERVERS LWIP_DHCP_MAX_NTP_SERVERS
59 #endif
60 
63 #if !defined SNTP_GET_SERVERS_FROM_DHCP || defined __DOXYGEN__
64 #define SNTP_GET_SERVERS_FROM_DHCP LWIP_DHCP_GET_NTP_SRV
65 #endif
66 
71 #if !defined SNTP_SERVER_DNS || defined __DOXYGEN__
72 #define SNTP_SERVER_DNS 0
73 #endif
74 
78 #if !defined SNTP_DEBUG || defined __DOXYGEN__
79 #define SNTP_DEBUG LWIP_DBG_OFF
80 #endif
81 
83 #if !defined SNTP_PORT || defined __DOXYGEN__
84 #define SNTP_PORT 123
85 #endif
86 
88 #if !defined SNTP_SERVER_DNS || defined __DOXYGEN__
89 #define SNTP_SERVER_DNS 0
90 #endif
91 
106 #if !defined SNTP_CHECK_RESPONSE || defined __DOXYGEN__
107 #define SNTP_CHECK_RESPONSE 0
108 #endif
109 
116 #if !defined SNTP_STARTUP_DELAY || defined __DOXYGEN__
117 #define SNTP_STARTUP_DELAY 0
118 #endif
119 
123 #if !defined SNTP_STARTUP_DELAY_FUNC || defined __DOXYGEN__
124 #define SNTP_STARTUP_DELAY_FUNC SNTP_STARTUP_DELAY
125 #endif
126 
131 #if !defined SNTP_RECV_TIMEOUT || defined __DOXYGEN__
132 #define SNTP_RECV_TIMEOUT 3000
133 #endif
134 
138 #if !defined SNTP_UPDATE_DELAY || defined __DOXYGEN__
139 #define SNTP_UPDATE_DELAY 3600000
140 #endif
141 
145 #if !defined SNTP_GET_SYSTEM_TIME || defined __DOXYGEN__
146 #define SNTP_GET_SYSTEM_TIME(sec, us) do { (sec) = 0; (us) = 0; } while(0)
147 #endif
148 
153 #if !defined SNTP_RETRY_TIMEOUT || defined __DOXYGEN__
154 #define SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT
155 #endif
156 
158 #if !defined SNTP_RETRY_TIMEOUT_MAX || defined __DOXYGEN__
159 #define SNTP_RETRY_TIMEOUT_MAX (SNTP_RETRY_TIMEOUT * 10)
160 #endif
161 
165 #if !defined SNTP_RETRY_TIMEOUT_EXP || defined __DOXYGEN__
166 #define SNTP_RETRY_TIMEOUT_EXP 1
167 #endif
168 
173 #endif /* LWIP_HDR_APPS_SNTP_OPTS_H */