ntp: define NTP port for configuration code
This commit is contained in:
parent
7bd1c02781
commit
9983185d6d
2 changed files with 5 additions and 2 deletions
4
conf.c
4
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);
|
||||
|
|
3
ntp.h
3
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue