...
...
...
...
#define NXD_SNTP_CLIENT_H
#include "nx_ip.h"
#define NXD_SNTP_ID
#define NX_SNTP_MILLISECONDS_PER_TICK
#define NX_SNTP_CLIENT_MIN_UNICAST_POLL_INTERVAL
#define NX_SNTP_CLIENT_MAX_UNICAST_POLL_INTERVAL
#define BROADCAST_MODE
#define UNICAST_MODE
#define NX_SNTP_CLIENT_RECEIVE_EVENT
#define NX_SNTP_TIME_MESSAGE_MIN_SIZE
#define NX_SNTP_TIME_MESSAGE_MAX_SIZE
#define NX_SNTP_CLIENT_MAX_IP_ADDRESS_SIZE
#define REFERENCE_TIME
#define ORIGINATE_TIME
#define RECEIVE_TIME
#define TRANSMIT_TIME
#define STRATUM_KISS_OF_DEATH
#define STRATUM_PRIMARY
#define STRATUM_SECONDARY
#define STRATUM_RESERVED
#define ANYCAST
#define AUTH_FAIL
#define AUTOKEY_FAIL
#define BROADCAST
#define CRYP_FAIL
#define DENY
#define DROP
#define DENY_POLICY
#define NOT_INIT
#define MANYCAST
#define NO_KEY
#define RATE
#define RMOT
#define STEP
#define NX_SNTP_KISS_OF_DEATH_PACKET
#define NX_SNTP_KOD_ANYCAST
#define NX_SNTP_KOD_AUTH_FAIL
#define NX_SNTP_KOD_AUTOKEY_FAIL
#define NX_SNTP_KOD_BROADCAST
#define NX_SNTP_KOD_CRYP_FAIL
#define NX_SNTP_KOD_DENY
#define NX_SNTP_KOD_DROP
#define NX_SNTP_KOD_DENY_POLICY
#define NX_SNTP_KOD_NOT_INIT
#define NX_SNTP_KOD_MANYCAST
#define NX_SNTP_KOD_NO_KEY
#define NX_SNTP_KOD_RATE
#define NX_SNTP_KOD_RMOT
#define NX_SNTP_KOD_STEP
#define PROTOCOL_MODE_RESERVED
#define PROTOCOL_MODE_SYMM_ACTIVE
#define PROTOCOL_MODE_SYMM_PASSIVE
#define PROTOCOL_MODE_CLIENT
#define PROTOCOL_MODE_SERVER_UNICAST
#define PROTOCOL_MODE_SERVER_BROADCAST
#define PROTOCOL_MODE_NTP_CNTL_MSG
#define PROTOCOL_MODE_PRIVATE
#define NX_SNTP_CLIENT_THREAD_STACK_SIZE
#define NX_SNTP_CLIENT_THREAD_TIME_SLICE
#define NX_SNTP_CLIENT_THREAD_PRIORITY
#define NX_SNTP_CLIENT_PREEMPTION_THRESHOLD
#define NX_SNTP_CLIENT_UDP_SOCKET_NAME
#define NX_SNTP_CLIENT_UDP_PORT
#define NX_SNTP_SERVER_UDP_PORT
#define NX_SNTP_CLIENT_TIME_TO_LIVE
#define NX_SNTP_CLIENT_MAX_QUEUE_DEPTH
#define NX_SNTP_CLIENT_PACKET_TIMEOUT
#define NX_SNTP_CLIENT_NTP_VERSION
#define NX_SNTP_CLIENT_MIN_NTP_VERSION
#define NX_SNTP_CLIENT_MIN_SERVER_STRATUM
#define NX_SNTP_CLIENT_MIN_TIME_ADJUSTMENT
#define NX_SNTP_CLIENT_MAX_TIME_ADJUSTMENT
#define NX_SNTP_CLIENT_IGNORE_MAX_ADJUST_STARTUP
#define NX_SNTP_CLIENT_RANDOMIZE_ON_STARTUP
#define NX_SNTP_CLIENT_MAX_TIME_LAPSE
#define NX_SNTP_UPDATE_TIMEOUT_INTERVAL
#define NX_SNTP_CLIENT_SLEEP_INTERVAL
#define NX_SNTP_CLIENT_UNICAST_POLL_INTERVAL
#define NX_SNTP_CLIENT_EXP_BACKOFF_RATE
#define NX_SNTP_CLIENT_RTT_REQUIRED
#define NX_SNTP_CLIENT_MAX_ROOT_DISPERSION
#define NX_SNTP_CLIENT_INVALID_UPDATE_LIMIT
#define NX_SNTP_CLIENT_PACKET_DATA_SIZE
#define NX_SNTP_CURRENT_YEAR
#define UPDATE_STATUS_CONTINUE
#define UPDATE_STATUS_BREAK
#define UPDATE_STATUS_ERROR
#define UPDATE_STATUS_SUCCESS
#define NTP_SECONDS_AT_01011999
#define UNIX_EPOCH
#define NTP_EPOCH
#define JANUARY
#define FEBRUARY
#define MARCH
#define APRIL
#define MAY
#define JUNE
#define JULY
#define AUGUST
#define SEPTEMBER
#define OCTOBER
#define NOVEMBER
#define DECEMBER
#define SEC_IN_JAN
#define SEC_IN_LEAPFEB
#define SEC_IN_NONLEAPFEB
#define SEC_IN_MAR
#define SEC_IN_APR
#define SEC_IN_MAY
#define SEC_IN_JUN
#define SEC_IN_JUL
#define SEC_IN_AUG
#define SEC_IN_SEP
#define SEC_IN_OCT
#define SEC_IN_NOV
#define SEC_IN_DEC
#define SECONDS_PER_LEAPYEAR
#define SECONDS_PER_NONLEAPYEAR
#define SECONDS_PER_DAY
#define SECONDS_PER_HOUR
#define SECONDS_PER_MINUTE
#define NX_SNTP_ERROR_CONSTANT
#define NX_SNTP_CLIENT_NOT_INITIALIZED
#define NX_SNTP_OVER_LIMIT_ON_SERVERS
#define NX_SNTP_INVALID_DOMAIN
#define NX_SNTP_NO_AVAILABLE_SERVERS
#define NX_SNTP_INVALID_LOCAL_TIME
#define NX_SNTP_OUT_OF_DOMAIN_SERVER
#define NX_SNTP_INVALID_DATETIME_BUFFER
#define NX_SNTP_ERROR_CONVERTING_DATETIME
#define NX_SNTP_UNABLE_TO_CONVERT_DATETIME
#define NX_SNTP_INVALID_SERVER_ADDRESS
#define NX_SNTP_CLIENT_NOT_STARTED
#define NX_SNTP_CLIENT_ALREADY_STARTED
#define NX_SNTP_PARAM_ERROR
#define NX_SNTP_SERVER_NOT_AVAILABLE
#define NX_SNTP_NO_UNICAST_FROM_SERVER
#define NX_SNTP_SERVER_CLOCK_NOT_SYNC
#define NX_SNTP_KOD_SERVER_NOT_AVAILABLE
#define NX_SNTP_KOD_REMOVE_SERVER
#define NX_SNTP_SERVER_AUTH_FAIL
#define NX_SNTP_INVALID_TIME_PACKET
#define NX_SNTP_INVALID_NTP_VERSION
#define NX_SNTP_INVALID_SERVER_MODE
#define NX_SNTP_INVALID_SERVER_PORT
#define NX_SNTP_INVALID_IP_ADDRESS
#define NX_SNTP_INVALID_SERVER_STRATUM
#define NX_SNTP_BAD_SERVER_ROOT_DISPERSION
#define NX_SNTP_OVER_INVALID_LIMIT
#define NX_SNTP_DUPE_SERVER_PACKET
#define NX_SNTP_INVALID_TIMESTAMP
#define NX_SNTP_INSUFFICIENT_PACKET_PAYLOAD
#define NX_SNTP_INVALID_SNTP_PACKET
#define NX_SNTP_INVALID_TIME
#define NX_SNTP_INVALID_RTT_TIME
#define NX_SNTP_OVERFLOW_ERROR
#define NX_SNTP_SIGN_ERROR
#define NX_SNTP_TIMED_OUT_ON_SERVER
#define NX_SNTP_MAX_TIME_LAPSE_EXCEEDED
NX_SNTP_DATE_TIME_STRUCT
year
month
day
hour
minute
second
millisecond
time_zone
leap_year
NX_SNTP_TIME_STRUCT
seconds
fraction
NX_SNTP_TIME_MESSAGE_STRUCT
flags
peer_clock_stratum
peer_poll_interval
peer_clock_precision
root_delay
clock_dispersion
reference_clock_id
reference_clock_update_time_stamp
originate_time_stamp
receive_time_stamp
transmit_time_stamp
KeyIdentifier
MessageDigest
reference_clock_update_time
originate_time
receive_time
transmit_time
NX_SNTP_CLIENT_STRUCT
nx_sntp_client_id
nx_sntp_client_ip_ptr
nx_sntp_client_interface_index
nx_sntp_client_packet_pool_ptr
nx_sntp_client_sleep_flag
nx_sntp_client_started
nx_sntp_client_thread
nx_sntp_client_mutex
nx_sntp_client_thread_stack
nx_sntp_server_ip_address
nx_sntp_client_udp_socket
nx_sntp_client_first_update_pending
nx_sntp_client_time_start_wait
nx_sntp_client_sent_initial_unicast
nx_sntp_client_invalid_time_updates
nx_sntp_valid_server_status
nx_sntp_client_protocol_mode
nx_sntp_client_broadcast_initialized
nx_sntp_broadcast_time_server
nx_sntp_multicast_server_address
nx_sntp_client_unicast_initialized
nx_sntp_unicast_time_server
nx_sntp_client_unicast_poll_interval
nx_sntp_client_backoff_count
nx_sntp_update_timer
nx_sntp_update_time_remaining
nx_sntp_client_roundtrip_time_msec
nx_sntp_client_local_ntp_time_elapsed
nx_sntp_current_server_time_message
nx_sntp_current_time_message_request
nx_sntp_previous_server_time_message
nx_sntp_client_local_ntp_time
nx_sntp_server_update_time
apply_custom_sanity_checks
leap_second_handler
kiss_of_death_handler
random_number_generator
nx_sntp_client_time_update_notify
#define nx_sntp_client_create
#define nx_sntp_client_delete
#define nx_sntp_client_get_local_time
#define nx_sntp_client_get_local_time_extended
#define nxd_sntp_client_initialize_broadcast
#define nxd_sntp_client_initialize_unicast
#define nx_sntp_client_initialize_broadcast
#define nx_sntp_client_initialize_unicast
#define nx_sntp_client_receiving_updates
#define nx_sntp_client_run_broadcast
#define nx_sntp_client_run_unicast
#define nx_sntp_client_set_local_time
#define nx_sntp_client_stop
#define nx_sntp_client_utility_msecs_to_fraction
#define nx_sntp_client_utility_usecs_to_fraction
#define nx_sntp_client_utility_fraction_to_usecs
#define nx_sntp_client_utility_display_date_time
#define nx_sntp_client_request_unicast_time
#define nx_sntp_client_set_time_update_notify
#define nx_sntp_client_create
#define nx_sntp_client_delete
#define nx_sntp_client_get_local_time
#define nx_sntp_client_get_local_time_extended
#define nxd_sntp_client_initialize_broadcast
#define nxd_sntp_client_initialize_unicast
#define nx_sntp_client_initialize_broadcast
#define nx_sntp_client_initialize_unicast
#define nx_sntp_client_receiving_updates
#define nx_sntp_client_run_broadcast
#define nx_sntp_client_run_unicast
#define nx_sntp_client_set_local_time
#define nx_sntp_client_stop
#define nx_sntp_client_utility_msecs_to_fraction
#define nx_sntp_client_utility_usecs_to_fraction
#define nx_sntp_client_utility_fraction_to_usecs
#define nx_sntp_client_utility_display_date_time
#define nx_sntp_client_request_unicast_time
#define nx_sntp_client_set_time_update_notify
_nx_sntp_client_create(NX_SNTP_CLIENT *, NX_IP *, UINT, NX_PACKET_POOL *, UINT (*)(NX_SNTP_CLIENT *, UINT), UINT (*)(NX_SNTP_CLIENT *, UINT), void (*)(struct NX_SNTP_CLIENT_STRUCT *, ULONG *));
_nxe_sntp_client_create(NX_SNTP_CLIENT *, NX_IP *, UINT, NX_PACKET_POOL *, UINT (*)(NX_SNTP_CLIENT *, UINT), UINT (*)(NX_SNTP_CLIENT *, UINT), void (*)(struct NX_SNTP_CLIENT_STRUCT *, ULONG *));
_nx_sntp_client_delete(NX_SNTP_CLIENT *);
_nxe_sntp_client_delete(NX_SNTP_CLIENT *);
_nx_sntp_client_get_local_time(NX_SNTP_CLIENT *, ULONG *, ULONG *, CHAR *);
_nxe_sntp_client_get_local_time(NX_SNTP_CLIENT *, ULONG *, ULONG *, CHAR *);
_nx_sntp_client_get_local_time_extended(NX_SNTP_CLIENT *, ULONG *, ULONG *, CHAR *, UINT);
_nxe_sntp_client_get_local_time_extended(NX_SNTP_CLIENT *, ULONG *, ULONG *, CHAR *, UINT);
_nxde_sntp_client_initialize_broadcast(NX_SNTP_CLIENT *, NXD_ADDRESS *, NXD_ADDRESS *);
_nxd_sntp_client_initialize_broadcast(NX_SNTP_CLIENT *, NXD_ADDRESS *, NXD_ADDRESS *);
_nx_sntp_client_initialize_broadcast(NX_SNTP_CLIENT *, ULONG, ULONG);
_nxe_sntp_client_initialize_broadcast(NX_SNTP_CLIENT *, ULONG, ULONG);
_nxde_sntp_client_initialize_unicast(NX_SNTP_CLIENT *, NXD_ADDRESS *);
_nxd_sntp_client_initialize_unicast(NX_SNTP_CLIENT *, NXD_ADDRESS *);
_nx_sntp_client_initialize_unicast(NX_SNTP_CLIENT *, ULONG);
_nxe_sntp_client_initialize_unicast(NX_SNTP_CLIENT *, ULONG);
_nx_sntp_client_receiving_updates(NX_SNTP_CLIENT *, UINT *);
_nxe_sntp_client_receiving_updates(NX_SNTP_CLIENT *, UINT *);
_nx_sntp_client_run_broadcast(NX_SNTP_CLIENT *);
_nxe_sntp_client_run_broadcast(NX_SNTP_CLIENT *);
_nx_sntp_client_run_unicast(NX_SNTP_CLIENT *);
_nxe_sntp_client_run_unicast(NX_SNTP_CLIENT *);
_nx_sntp_client_set_local_time(NX_SNTP_CLIENT *, ULONG, ULONG);
_nxe_sntp_client_set_local_time(NX_SNTP_CLIENT *, ULONG, ULONG);
_nx_sntp_client_stop(NX_SNTP_CLIENT *);
_nxe_sntp_client_stop(NX_SNTP_CLIENT *);
_nx_sntp_client_utility_msecs_to_fraction(ULONG, ULONG *);
_nxe_sntp_client_utility_msecs_to_fraction(ULONG, ULONG *);
_nx_sntp_client_utility_usecs_to_fraction(ULONG, ULONG *);
_nxe_sntp_client_utility_usecs_to_fraction(ULONG, ULONG *);
_nx_sntp_client_utility_fraction_to_usecs(ULONG, ULONG *);
_nxe_sntp_client_utility_fraction_to_usecs(ULONG, ULONG *);
_nx_sntp_client_utility_display_date_time(NX_SNTP_CLIENT *, CHAR *, UINT);
_nxe_sntp_client_utility_display_date_time(NX_SNTP_CLIENT *, CHAR *, UINT);
_nxe_sntp_client_utility_display_NTP_time(NX_SNTP_CLIENT *, CHAR *);
_nx_sntp_client_request_unicast_time(NX_SNTP_CLIENT *, UINT);
_nxe_sntp_client_request_unicast_time(NX_SNTP_CLIENT *, UINT);
_nx_sntp_client_set_time_update_notify(NX_SNTP_CLIENT *, void (*)(NX_SNTP_TIME_MESSAGE *, NX_SNTP_TIME *));
_nxe_sntp_client_set_time_update_notify(NX_SNTP_CLIENT *, void (*)(NX_SNTP_TIME_MESSAGE *, NX_SNTP_TIME *));
_nx_sntp_client_apply_sanity_checks(NX_SNTP_CLIENT *);
_nx_sntp_client_calculate_roundtrip(LONG *);
_nx_sntp_client_check_server_clock_dispersion(NX_SNTP_CLIENT *);
_nx_sntp_client_create_time_request_packet(NX_SNTP_CLIENT *, NX_PACKET *, NX_SNTP_TIME_MESSAGE *);
_nx_sntp_client_duplicate_update_check(NX_SNTP_TIME_MESSAGE *, NX_SNTP_TIME_MESSAGE *, UINT *);
_nx_sntp_client_extract_time_message_from_packet(NX_SNTP_CLIENT *, NX_PACKET *);
_nx_sntp_client_process(NX_SNTP_CLIENT *);
_nx_sntp_client_process_broadcast(NX_SNTP_CLIENT *);
_nx_sntp_client_process_unicast(NX_SNTP_CLIENT *);
_nx_sntp_client_process_time_data(NX_SNTP_CLIENT *);
_nx_sntp_client_process_update_packet(NX_SNTP_CLIENT *);
_nx_sntp_client_receive_notify(NX_UDP_SOCKET *);
_nx_sntp_client_receive_time_update(NX_SNTP_CLIENT *, ULONG);
_nx_sntp_client_reset_current_time_message(NX_SNTP_CLIENT *);
_nx_sntp_client_send_unicast_request(NX_SNTP_CLIENT *);
_nx_sntp_client_thread_entry(ULONG);
_nx_sntp_client_update_timeout_entry(ULONG);
_nx_sntp_client_utility_add_msecs_to_ntp_time(NX_SNTP_TIME *, LONG);
_nx_sntp_client_utility_convert_fraction_to_msecs(ULONG *, NX_SNTP_TIME *);
_nx_sntp_client_utility_convert_seconds_to_date(NX_SNTP_TIME *, UINT, NX_SNTP_DATE_TIME *);
_nx_sntp_client_utility_convert_refID_KOD_code(UCHAR *, UINT *);
_nx_sntp_client_utility_get_msec_diff(NX_SNTP_TIME *, NX_SNTP_TIME *, ULONG *, UINT *);
_nx_sntp_client_utility_addition_overflow_check(ULONG, ULONG);
_nx_sntp_client_utility_convert_time_to_UCHAR(NX_SNTP_TIME *, NX_SNTP_TIME_MESSAGE *, UINT);
_nx_sntp_client_utility_is_zero_data(UCHAR *, UINT);