ntp: move auth parsing to ntp_auth

Move the remaining authentication-specific code to the new file.
This commit is contained in:
Miroslav Lichvar
2019-08-15 11:20:36 +02:00
parent ca28dbd2c3
commit 56a102ed4d
3 changed files with 122 additions and 106 deletions

View File

@@ -56,6 +56,9 @@ extern void NAU_AdjustRequestTimestamp(NAU_Instance instance, struct timespec *t
extern int NAU_GenerateRequestAuth(NAU_Instance instance, NTP_Packet *request,
NTP_PacketInfo *info);
/* Parse a request or response to detect the authentication mode */
extern int NAU_ParsePacket(NTP_Packet *packet, NTP_PacketInfo *info);
/* Verify that a request is authentic */
extern int NAU_CheckRequestAuth(NTP_Packet *request, NTP_PacketInfo *info);