2323/* */
2424/* APPLICATION INTERFACE DEFINITION RELEASE */
2525/* */
26- #ifdef __PRODUCT_NETXDUO__
2726/* nxd_sntp_client.h PORTABLE C */
2827/* 6.0 */
29- #else
30- /* nx_sntp_client.h PORTABLE C */
31- /* 6.0 */
32- #endif
3328/* AUTHOR */
3429/* */
3530/* Yuxin Zhou, Microsoft Corporation */
@@ -65,11 +60,7 @@ extern "C" {
6560#endif
6661
6762
68- #ifdef __PRODUCT_NETXDUO__
6963#define NXD_SNTP_ID 0x534E5460UL
70- #else
71- #define NX_SNTP_ID 0x534E5460UL
72- #endif
7364
7465
7566/* Conversion between seconds and timer ticks. This must equal the
@@ -573,11 +564,7 @@ extern "C" {
573564 TX_THREAD nx_sntp_client_thread ; /* The SNTP Client processing thread */
574565 TX_MUTEX nx_sntp_client_mutex ; /* The SNTP Client mutex for protecting access */
575566 UCHAR nx_sntp_client_thread_stack [NX_SNTP_CLIENT_THREAD_STACK_SIZE ]; /* Stack size for SNTP client thread */
576- #ifdef __PRODUCT_NETXDUO__
577567 NXD_ADDRESS nx_sntp_server_ip_address ; /* Client's current time server IP address. */
578- #else
579- ULONG nx_sntp_server_ip_address ; /* Client's current time server IP address. */
580- #endif
581568 NX_UDP_SOCKET nx_sntp_client_udp_socket ; /* Client UDP socket for sending and receiving time updates. */
582569 UINT nx_sntp_client_first_update_pending ; /* First SNTP update not yet received with current server */
583570 UINT nx_sntp_client_time_start_wait ; /* Initial time at start of receiving broadcast SNTP updates */
@@ -586,19 +573,10 @@ extern "C" {
586573 UINT nx_sntp_valid_server_status ; /* Server status; if receiving valid updates, status is TRUE */
587574 UINT nx_sntp_client_protocol_mode ; /* Mode of operation, either unicast or broadcast */
588575 UINT nx_sntp_client_broadcast_initialized ; /* Client task is ready to receive broadcast time data. */
589- #ifdef __PRODUCT_NETXDUO__
590576 NXD_ADDRESS nx_sntp_broadcast_time_server ; /* Client's broadcast SNTP server */
591577 NXD_ADDRESS nx_sntp_multicast_server_address ; /* IP address Client should listen on to receive broadcasts from a multicast server. */
592- #else
593- ULONG nx_sntp_broadcast_time_server ; /* Client's broadcast SNTP server */
594- ULONG nx_sntp_multicast_server_address ; /* IP address Client should listen on to receive broadcasts from a multicast server. */
595- #endif
596578 UINT nx_sntp_client_unicast_initialized ; /* Client task is ready to receive unicast time data. */
597- #ifdef __PRODUCT_NETXDUO__
598579 NXD_ADDRESS nx_sntp_unicast_time_server ; /* Client's unicast time server. */
599- #else
600- ULONG nx_sntp_unicast_time_server ; /* Client's unicast time server. */
601- #endif
602580 ULONG nx_sntp_client_unicast_poll_interval ; /* Unicast interval at which client is polling the time server. */
603581 UINT nx_sntp_client_backoff_count ; /* Count of times the back off rate has been applied to the poll interval */
604582 TX_TIMER nx_sntp_update_timer ; /* SNTP update timer; expires when no data received for specified time lapse. */
@@ -643,10 +621,8 @@ extern "C" {
643621#define nx_sntp_client_delete _nx_sntp_client_delete
644622#define nx_sntp_client_get_local_time _nx_sntp_client_get_local_time
645623#define nx_sntp_client_get_local_time_extended _nx_sntp_client_get_local_time_extended
646- #ifdef __PRODUCT_NETXDUO__
647624#define nxd_sntp_client_initialize_broadcast _nxd_sntp_client_initialize_broadcast
648625#define nxd_sntp_client_initialize_unicast _nxd_sntp_client_initialize_unicast
649- #endif
650626#define nx_sntp_client_initialize_broadcast _nx_sntp_client_initialize_broadcast
651627#define nx_sntp_client_initialize_unicast _nx_sntp_client_initialize_unicast
652628#define nx_sntp_client_receiving_updates _nx_sntp_client_receiving_updates
@@ -669,10 +645,8 @@ extern "C" {
669645#define nx_sntp_client_delete _nxe_sntp_client_delete
670646#define nx_sntp_client_get_local_time _nxe_sntp_client_get_local_time
671647#define nx_sntp_client_get_local_time_extended _nxe_sntp_client_get_local_time_extended
672- #ifdef __PRODUCT_NETXDUO__
673648#define nxd_sntp_client_initialize_broadcast _nxde_sntp_client_initialize_broadcast
674649#define nxd_sntp_client_initialize_unicast _nxde_sntp_client_initialize_unicast
675- #endif
676650#define nx_sntp_client_initialize_broadcast _nxe_sntp_client_initialize_broadcast
677651#define nx_sntp_client_initialize_unicast _nxe_sntp_client_initialize_unicast
678652#define nx_sntp_client_receiving_updates _nxe_sntp_client_receiving_updates
@@ -699,13 +673,9 @@ UINT nx_sntp_client_create(NX_SNTP_CLIENT *client_ptr, NX_IP *ip_ptr, UINT ifa
699673UINT nx_sntp_client_delete (NX_SNTP_CLIENT * client_ptr );
700674UINT nx_sntp_client_get_local_time (NX_SNTP_CLIENT * client_ptr , ULONG * seconds , ULONG * fraction , CHAR * buffer );
701675UINT nx_sntp_client_get_local_time_extended (NX_SNTP_CLIENT * client_ptr , ULONG * seconds , ULONG * fraction , CHAR * buffer , UINT buffer_size );
702- #ifdef __PRODUCT_NETXDUO__
703676UINT nxd_sntp_client_initialize_broadcast (NX_SNTP_CLIENT * client_ptr , NXD_ADDRESS * multicast_server_address , NXD_ADDRESS * broadcast_time_server );
704- #endif
705677UINT nx_sntp_client_initialize_broadcast (NX_SNTP_CLIENT * client_ptr , ULONG multicast_server_address , ULONG broadcast_time_server );
706- #ifdef __PRODUCT_NETXDUO__
707678UINT nxd_sntp_client_initialize_unicast (NX_SNTP_CLIENT * client_ptr , NXD_ADDRESS * unicast_time_server );
708- #endif
709679UINT nx_sntp_client_initialize_unicast (NX_SNTP_CLIENT * client_ptr , ULONG unicast_time_server );
710680UINT nx_sntp_client_receiving_updates (NX_SNTP_CLIENT * client_ptr , UINT * server_status );
711681UINT nx_sntp_client_run_broadcast (NX_SNTP_CLIENT * client_ptr );
@@ -738,20 +708,12 @@ UINT _nx_sntp_client_get_local_time(NX_SNTP_CLIENT *client_ptr, ULONG *second
738708UINT _nxe_sntp_client_get_local_time (NX_SNTP_CLIENT * client_ptr , ULONG * seconds , ULONG * fraction , CHAR * buffer );
739709UINT _nx_sntp_client_get_local_time_extended (NX_SNTP_CLIENT * client_ptr , ULONG * seconds , ULONG * fraction , CHAR * buffer , UINT buffer_size );
740710UINT _nxe_sntp_client_get_local_time_extended (NX_SNTP_CLIENT * client_ptr , ULONG * seconds , ULONG * fraction , CHAR * buffer , UINT buffer_size );
741- #ifdef __PRODUCT_NETXDUO__
742711UINT _nxde_sntp_client_initialize_broadcast (NX_SNTP_CLIENT * client_ptr , NXD_ADDRESS * multicast_server_address , NXD_ADDRESS * broadcast_time_server );
743712UINT _nxd_sntp_client_initialize_broadcast (NX_SNTP_CLIENT * client_ptr , NXD_ADDRESS * multicast_server_address , NXD_ADDRESS * broadcast_time_server );
744- #else
745- UINT _nx_sntp_client_initialize_broadcast (NX_SNTP_CLIENT * client_ptr , ULONG multicast_server_address , ULONG broadcast_time_server );
746- #endif
747713UINT _nx_sntp_client_initialize_broadcast (NX_SNTP_CLIENT * client_ptr , ULONG multicast_server_address , ULONG broadcast_time_server );
748714UINT _nxe_sntp_client_initialize_broadcast (NX_SNTP_CLIENT * client_ptr , ULONG multicast_server_address , ULONG broadcast_time_server );
749- #ifdef __PRODUCT_NETXDUO__
750715UINT _nxde_sntp_client_initialize_unicast (NX_SNTP_CLIENT * client_ptr , NXD_ADDRESS * unicast_time_server );
751716UINT _nxd_sntp_client_initialize_unicast (NX_SNTP_CLIENT * client_ptr , NXD_ADDRESS * unicast_time_server );
752- #else
753- UINT _nx_sntp_client_initialize_unicast (NX_SNTP_CLIENT * client_ptr , ULONG unicast_time_server );
754- #endif
755717UINT _nx_sntp_client_initialize_unicast (NX_SNTP_CLIENT * client_ptr , ULONG unicast_time_server );
756718UINT _nxe_sntp_client_initialize_unicast (NX_SNTP_CLIENT * client_ptr , ULONG unicast_time_server );
757719UINT _nx_sntp_client_receiving_updates (NX_SNTP_CLIENT * client_ptr , UINT * server_status );
0 commit comments