Go to the documentation of this file.
32 #define TRACE_LEVEL NTS_TRACE_LEVEL
41 #if (NTS_TRACE_LEVEL >= TRACE_LEVEL_DEBUG)
99 n =
ntohs(record->bodyLength);
106 TRACE_DEBUG(
" NTS-KE Record (%" PRIu16
" bytes)\r\n",
137 bodyLen =
ntohs(record->bodyLength);
150 TRACE_DEBUG(
" Body Length = %" PRIu16
"\r\n", bodyLen);
156 TRACE_DEBUG(
" Body (%" PRIu16
" bytes)\r\n", bodyLen);
212 for(i = 0; (i + 1) <
length; i +=
sizeof(uint16_t))
239 if(
length <
sizeof(uint16_t))
264 uint16_t warningCode;
267 if(
length <
sizeof(uint16_t))
276 TRACE_DEBUG(
" Warning Code = %" PRIu16
"\r\n", warningCode);
294 for(i = 0; (i + 1) <
length; i +=
sizeof(uint16_t))
325 for(i = 0; i <
length; i++)
346 if(
length <
sizeof(uint16_t))
372 static const char_t defaultName[] =
"Unknown";
375 for(i = 0; i < paramListLen; i++)
378 return paramList[i].
name;
const NtsParamName ntsErrorCodeList[]
void ntsDumpErrorRecord(const uint8_t *body, size_t length)
Dump Error record.
#define NTS_KE_RECORD_TYPE_MASK
@ NTS_KE_RECORD_TYPE_NTPV4_SERVER_NEGO
NTPv4 Server Negotiation.
@ NTS_KE_RECORD_TYPE_END_OF_MESSAGE
End of Message.
void ntsDumpNtpv4ServerNegoRecord(const uint8_t *body, size_t length)
Dump NTPv4 Server Negotiation record.
@ NTS_ERROR_CODE_INTERNAL_SERVER_ERROR
Internal Server Error.
@ NTS_KE_RECORD_TYPE_NTS_NEXT_PROTO_NEGO
NTS Next Protocol Negotiation.
@ AEAD_AES_SIV_CMAC_256
RFC 5297.
void ntsDumpNtsKeRecords(const uint8_t *records, size_t length)
Dump NTS-KE records.
const NtsParamName ntsAeadAlgoList[]
@ NTS_ERROR_CODE_UNRECOGNIZED_CRITICAL_RECORD
Unrecognized Critical Record.
void ntsDumpNtpv4PortNegoRecord(const uint8_t *body, size_t length)
Dump NTPv4 Port Negotiation record.
Parameter value/name binding.
const char_t * ntsGetParamName(uint_t value, const NtsParamName *paramList, size_t paramListLen)
Convert a parameter to string representation.
@ NTS_KE_RECORD_TYPE_NEW_COOKIE_FOR_NTPV4
New Cookie for NTPv4.
void ntsDumpWarningRecord(const uint8_t *body, size_t length)
Dump Warning record.
@ NTS_KE_RECORD_TYPE_AEAD_ALGO_NEGO
AEAD Algorithm Negotiation.
@ NTS_PROTOCOL_ID_NTPV4
Network Time Protocol version 4 (NTPv4)
#define TRACE_DEBUG_ARRAY(p, a, n)
@ NTS_KE_RECORD_TYPE_ERROR
Error.
void ntsDumpNtsNextProtoNegoRecord(const uint8_t *body, size_t length)
Dump NTS Next Protocol Negotiation record.
void ntsDumpAeadAlgoNegoRecord(const uint8_t *body, size_t length)
Dump AEAD Algorithm Negotiation record.
@ NTS_ERROR_CODE_BAD_REQUEST
Bad Request.
@ NTS_KE_RECORD_TYPE_WARNING
Warning.
const NtsParamName ntsProtocolIdList[]
Data logging functions for debugging purpose (NTS)
@ NTS_KE_RECORD_TYPE_NTPV4_PORT_NEGO
NTPv4 Port Negotiation.
void ntsDumpNtsKeRecord(const NtsKeRecord *record, size_t length)
Dump NTS-KE record.
const NtsParamName ntsKeRecordTypeList[]