Go to the documentation of this file.
32 #define TRACE_LEVEL NTP_TRACE_LEVEL
40 #if (NTP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG)
126 TRACE_DEBUG(
" Leap indicator = %" PRIu8
" (%s)\r\n", header->li,
name);
133 TRACE_DEBUG(
" Version Number = %" PRIu8
" (%s)\r\n", header->vn,
name);
154 TRACE_DEBUG(
" Stratum = %" PRIu8
"\r\n", header->stratum);
158 TRACE_DEBUG(
" Poll = %" PRIu8
" (%us)\r\n", header->poll, 1U << header->poll);
159 TRACE_DEBUG(
" Precision = %" PRId8
"\r\n", header->precision);
161 TRACE_DEBUG(
" Root Dispersion = %" PRIu32
"\r\n",
ntohl(header->rootDispersion));
172 TRACE_DEBUG(
" Reference Identifier = '%c%c%c%c'\r\n",
179 TRACE_DEBUG(
" Reference Identifier = %" PRIu32
"\r\n",
180 header->referenceId);
228 n =
ntohs(extension->length);
298 uint16_t ciphertextLen;
305 nonceLen =
ntohs(extension->nonceLength);
306 ciphertextLen =
ntohs(extension->ciphertextLength);
313 TRACE_DEBUG(
" Nonce Length = %" PRIu16
"\r\n", nonceLen);
314 TRACE_DEBUG(
" Ciphertext Length = %" PRIu16
"\r\n", ciphertextLen);
317 TRACE_DEBUG(
" Nonce (%" PRIu16
" bytes)\r\n", nonceLen);
321 TRACE_DEBUG(
" Ciphertext (%" PRIu16
" bytes)\r\n", ciphertextLen);
354 static const char_t defaultName[] =
"Unknown";
357 for(i = 0; i < paramListLen; i++)
360 return paramList[i].
name;
@ NTP_STRATUM_SECONDARY_2
@ NTP_EXTENSION_TYPE_NTS_COOKIE
NTS Cookie.
void ntpDumpPacket(const NtpHeader *packet, size_t length)
Dump NTP packet for debugging purpose.
void ntpDumpTimestamp(const NtpTimestamp *timestamp)
Dump NTP timestamp.
@ NTP_STRATUM_SECONDARY_13
@ NTP_STRATUM_SECONDARY_6
@ NTP_STRATUM_SECONDARY_7
void ntpDumpExtensions(const uint8_t *extensions, size_t length)
Dump NTP extension fields.
@ NTP_STRATUM_SECONDARY_8
const NtpParamName ntpStartumList[]
@ NTP_EXTENSION_TYPE_NO_OPERATION_ERROR_RESP
No-Operation Error Response.
@ NTP_STRATUM_SECONDARY_4
@ NTP_STRATUM_SECONDARY_9
@ NTP_EXTENSION_TYPE_NO_OPERATION_REQ
No-Operation Request.
Data logging functions for debugging purpose (NTP)
@ NTP_MODE_SYMMETRIC_PASSIVE
@ NTP_STRATUM_SECONDARY_12
@ NTP_STRATUM_SECONDARY_10
@ NTP_EXTENSION_TYPE_UNIQUE_ID
Unique Identifier.
const NtpParamName ntpLeapIndicatorList[]
@ NTP_STRATUM_SECONDARY_15
void ntpDumpNtsAeadExtension(const NtpNtsAeadExtension *extension, size_t length)
Dump NTS Authenticator and Encrypted Extension Fields extension.
@ NTP_LI_LAST_MIN_HAS_61_SECS
const NtpParamName ntpVersionList[]
@ NTP_LI_LAST_MIN_HAS_59_SECS
@ NTP_STRATUM_KISS_OF_DEATH
const NtpParamName ntpExtensionTypeList[]
#define TRACE_DEBUG_ARRAY(p, a, n)
@ NTP_STRATUM_SECONDARY_14
@ NTP_EXTENSION_TYPE_NO_OPERATION_RESP
No-Operation Response.
@ NTP_STRATUM_SECONDARY_11
@ NTP_STRATUM_SECONDARY_5
Parameter value/name binding.
@ NTP_EXTENSION_TYPE_NTS_COOKIE_PLACEHOLDER
NTS Cookie Placeholder.
const NtpParamName ntpModeList[]
void ntpDumpExtension(const NtpExtension *extension, size_t length)
Dump NTP extension field.
@ NTP_STRATUM_SECONDARY_3
@ NTP_MODE_SYMMETRIC_ACTIVE
const char_t * ntpGetParamName(uint_t value, const NtpParamName *paramList, size_t paramListLen)
Convert a parameter to string representation.
@ NTP_EXTENSION_TYPE_NTS_AEAD
NTS Authenticator and Encrypted Extension Fields.