sntpsLib.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* sntpsLib.h - Simple Network Time Protocol (SNTP) server include file */
  2. /* Copyright 1984-2001 Wind River Systems, Inc. */
  3. /*
  4. Modification history 
  5. --------------------
  6. 01c,30aug01,vvv  added extern "C" definition (SPR #21825)
  7. 01b,15jul97,spm  code cleanup, documentation, and integration; entered in
  8.                  source code control
  9. 01a,20apr97,kyc  written
  10. */
  11. #ifndef __INCsntpsh
  12. #define __INCsntpsh
  13. /* includes */
  14. #include "sntp.h"
  15. /* defines */
  16. #define S_sntpsLib_INVALID_PARAMETER         (M_sntpsLib | 1)
  17. #define S_sntpsLib_INVALID_ADDRESS           (M_sntpsLib | 2)
  18. /* Valid settings for SNTPS_MODE in configAll.h */
  19. #define  SNTP_ACTIVE  1
  20. #define  SNTP_PASSIVE  2
  21. /* Values for "request" parameter to clock hook routine. */
  22. #define SNTPS_ID  1
  23. #define SNTPS_RESOLUTION  2
  24. #define SNTPS_TIME  3
  25. /* Values for "setting" parameter to sntpsConfigSet() routine. */
  26. #define SNTPS_ADDRESS  1
  27. #define SNTPS_DELAY  2
  28. #if CPU_FAMILY==I960
  29. #pragma align 1                 /* tell gcc960 not to optimize alignments */
  30. #endif  /* CPU_FAMILY==I960 */
  31. typedef struct sntpsTimeData
  32.     {
  33.     ULONG seconds;
  34.     ULONG fraction;
  35.     } SNTP_TIMESTAMP;
  36. #if CPU_FAMILY==I960
  37. #pragma align 0                 /* turn off alignment requirement */
  38. #endif  /* CPU_FAMILY==I960 */
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. IMPORT STATUS sntpsInit (char *, u_char, char *, short, u_short, FUNCPTR);
  43. IMPORT STATUS sntpsClockSet (FUNCPTR);
  44. IMPORT ULONG  sntpsNsecToFraction (ULONG);
  45. IMPORT STATUS sntpsConfigSet (int, void *);
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49. #endif /* __INCsntpsh */