apps/netutils/ntpclient: Add a primitive NTP client. Initial checkin is untested and probably incomplete

This commit is contained in:
Gregory Nutt
2014-04-10 18:15:06 -06:00
parent c208b25f89
commit 1712f42cf3
4 changed files with 10 additions and 8 deletions
+2 -1
View File
@@ -681,7 +681,8 @@
<td><br></td> <td><br></td>
<td> <td>
<p> <p>
<li>Networking utilities (DHCP server and client, SMTP client, TELNET client, FTP server and client, TFTP client, HTTP server and client). Inheritable TELNET sessions (as &quot;controlling terminal&quot;)</li> <li>Networking utilities (DHCP server and client, SMTP client, TELNET client, FTP server and client, TFTP client, HTTP server and client, NTP client).
Inheritable TELNET sessions (as &quot;controlling terminal&quot;)</li>
</p> </p>
</td> </td>
</tr> </tr>
+2 -1
View File
@@ -409,7 +409,8 @@ extern void uip_send(struct uip_driver_s *dev, const void *buf, int len);
#define uip_ipaddr(addr, addr0, addr1, addr2, addr3) \ #define uip_ipaddr(addr, addr0, addr1, addr2, addr3) \
do { \ do { \
addr = HTONL((addr0) << 24 | (addr1) << 16 | (addr2) << 8 | (addr3)); \ addr = HTONL((uint32_t)(addr0) << 24 | (uint32_t)(addr1) << 16 | \
(uint32_t)(addr2) << 8 | (uint32_t)(addr3)); \
} while(0) } while(0)
/* Convert an IPv4 address of the form uint16_t[2] to an in_addr_t */ /* Convert an IPv4 address of the form uint16_t[2] to an in_addr_t */
+1 -1
View File
@@ -130,7 +130,7 @@ extern "C" {
* Public Function Prototypes * Public Function Prototypes
****************************************************************************/ ****************************************************************************/
EXTERN int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout); int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+5 -5
View File
@@ -95,11 +95,11 @@ extern "C" {
#define EXTERN extern #define EXTERN extern
#endif #endif
EXTERN WDOG_ID wd_create(void); WDOG_ID wd_create(void);
EXTERN int wd_delete(WDOG_ID wdog); int wd_delete(WDOG_ID wdog);
EXTERN int wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, int argc, ...); int wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, int argc, ...);
EXTERN int wd_cancel(WDOG_ID wdog); int wd_cancel(WDOG_ID wdog);
EXTERN int wd_gettime(WDOG_ID wdog); int wd_gettime(WDOG_ID wdog);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus