diff --git a/conf.c b/conf.c index f5583fa..c6d4bed 100644 --- a/conf.c +++ b/conf.c @@ -79,7 +79,7 @@ static void parse_tempcomp(char *); static int restarted = 0; static char *rtc_device; static int acquisition_port = -1; -static int ntp_port = 123; +static int ntp_port = NTP_PORT; static char *keys_file = NULL; static char *drift_file = NULL; static char *rtc_file = NULL; @@ -1179,7 +1179,7 @@ parse_broadcast(char *line) } } else { /* default port */ - port = 123; + port = NTP_PORT; } destination = (NTP_Broadcast_Destination *)ARR_GetNewElement(broadcasts); diff --git a/ntp.h b/ntp.h index e2abd84..801f264 100644 --- a/ntp.h +++ b/ntp.h @@ -38,6 +38,9 @@ typedef struct { typedef uint32_t NTP_int32; +/* The UDP port number used by NTP */ +#define NTP_PORT 123 + /* The NTP protocol version that we support */ #define NTP_VERSION 4