sntp.h

来自「AMLOGIC DPF source code」· C头文件 代码 · 共 72 行

H
72
字号
/******************************************************************* *  *  Copyright C 2005 by Amlogic, Inc. All Rights Reserved. * *  Description:  * *  Author: Eric Knudstrup *  Created: Wed Nov  1 23:18:38 2006 * *******************************************************************/#ifndef SNTP_H#define SNTP_H#define SNTP_DEFAULT_REQ_INTERVAL (60 * 60)typedef enum {    SNTP_RESULT_OK,    SNTP_RESULT_ALLOC_ERROR,    SNTP_RESULT_DNS_FAILED,    SNTP_RESULT_DNS_TIMEOUT,    SNTP_RESULT_SEND_FAILED,    SNTP_RESULT_TIMEOUT,    SNTP_RESULT_UNSYNCH,       /** Server is unsynchronized */    SNTP_RESULT_DENIED,        /** Server doesn't want us */} sntp_result_t;typedef void (*sntp_cb_t)(sntp_result_t result, unsigned secs, unsigned usecs);/*;emacs generated header for file c:\sources\avos2\trunk\net\sntp\sntp.c. Do not edit between here and end *//** * Set the SNTP server name/address and begin polling. * If the host is not a dotted decimal address the SNTP module will * attempt to resolve the name before sending requests. * Giving a NULL host will stop polling. */extern intsntp_start(char *host, int delay);/** * Stop SNTP client. */extern voidsntp_stop(void);/** * Configure SNTP timer intervals and the request * callback. The request interval must be greater than * or equal to the timeout. */extern intsntp_configure_timers(unsigned request_interval,                       unsigned request_timeout);/** * Initialize SNTP parameters. Polling will not begin until * sntp_start() is called. */extern intsntp_init(sntp_cb_t result_callback);/** * Get next SNTP server from built-in server list. */extern char *sntp_getnext_server(void);/*;end emacs generated header for file c:\sources\avos2\trunk\net\sntp\sntp.c. Do not edit between here and end */#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?