mirror of
https://frontier.innolan.net/rainlance/amiga-ntimed.git
synced 2026-01-13 00:40:48 +00:00
Optimized includes
This commit is contained in:
14
compiler.h
14
compiler.h
@ -27,10 +27,18 @@
|
|||||||
#ifndef NTIMED_COMPILER_H
|
#ifndef NTIMED_COMPILER_H
|
||||||
#define NTIMED_COMPILER_H
|
#define NTIMED_COMPILER_H
|
||||||
|
|
||||||
/*
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
/*
|
||||||
* See also:
|
* See also:
|
||||||
* http://codewiz.org/projects/amiga/Headers/CompilerSpecific.h
|
* http://codewiz.org/projects/amiga/Headers/CompilerSpecific.h
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __VBCC__
|
#ifdef __VBCC__
|
||||||
@ -92,7 +100,7 @@ struct sockaddr_storage {
|
|||||||
sa_family_t ss_family; // address family
|
sa_family_t ss_family; // address family
|
||||||
|
|
||||||
// all this is padding, implementation specific, ignore it:
|
// all this is padding, implementation specific, ignore it:
|
||||||
char __ss_pad1[128 - sizeof(sa_family_t)];
|
char __ss_pad1[128 - sizeof(sa_family_t)];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
46
configure
vendored
46
configure
vendored
@ -50,6 +50,7 @@ SRCS='
|
|||||||
main_amiga_client.c
|
main_amiga_client.c
|
||||||
main_amiga_poll.c
|
main_amiga_poll.c
|
||||||
main_amiga_sim.c
|
main_amiga_sim.c
|
||||||
|
main_amiga_test.c
|
||||||
combine_delta.c
|
combine_delta.c
|
||||||
mem.c
|
mem.c
|
||||||
net_getaddrinfo.c
|
net_getaddrinfo.c
|
||||||
@ -137,6 +138,28 @@ SRCS3='
|
|||||||
todo.c
|
todo.c
|
||||||
udp.c
|
udp.c
|
||||||
'
|
'
|
||||||
|
|
||||||
|
SRCS4='
|
||||||
|
main_amiga_test.c
|
||||||
|
combine_delta.c
|
||||||
|
mem.c
|
||||||
|
net_getaddrinfo.c
|
||||||
|
net_poll.c
|
||||||
|
ntp_filter.c
|
||||||
|
ntp_packet.c
|
||||||
|
ntp_peer.c
|
||||||
|
ntp_peerset.c
|
||||||
|
ntp_tools.c
|
||||||
|
ocx_stdio.c
|
||||||
|
param.c
|
||||||
|
pll_std.c
|
||||||
|
suckaddr.c
|
||||||
|
time_amiga.c
|
||||||
|
time_stuff.c
|
||||||
|
todo.c
|
||||||
|
udp.c
|
||||||
|
'
|
||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
if make -v 2>&1 | grep GNU > /dev/null 2>&1 ; then
|
if make -v 2>&1 | grep GNU > /dev/null 2>&1 ; then
|
||||||
@ -151,16 +174,16 @@ if $VALID ; then
|
|||||||
(
|
(
|
||||||
echo '# Portable Makefile generated by configure'
|
echo '# Portable Makefile generated by configure'
|
||||||
echo ''
|
echo ''
|
||||||
echo 'all: ntimed ntimed-poll ntimed-sim'
|
echo 'all: ntimed ntimed-poll ntimed-sim ntimed-test'
|
||||||
echo ''
|
echo ''
|
||||||
if [ -n "$1" ] && [ $1 = "AMIGA" ] ; then
|
if [ -n "$1" ] && [ $1 = "AMIGA" ] ; then
|
||||||
echo 'CC = gcc'
|
echo 'CC = gcc'
|
||||||
echo "CFLAGS += -O2 -DAOS3 -Wall -Werror"
|
echo "CFLAGS += -O2 -DAOS3 -DWITHTEST -Wall -Werror"
|
||||||
elif [ -n "$1" ] && [ $1 = "AROS" ] ; then
|
elif [ -n "$1" ] && [ $1 = "AROS" ] ; then
|
||||||
echo 'CC = gcc'
|
echo 'CC = gcc'
|
||||||
echo "CFLAGS += -O2 -DAROS -Wall -Werror"
|
echo "CFLAGS += -O2 -DAROS -DWITHTEST -Wall -Werror"
|
||||||
else
|
else
|
||||||
echo "CFLAGS += -O2 -Wall -Werror"
|
echo "CFLAGS += -O2 -Wall -DWITHTEST -Werror"
|
||||||
fi
|
fi
|
||||||
echo ''
|
echo ''
|
||||||
|
|
||||||
@ -200,18 +223,24 @@ if $VALID ; then
|
|||||||
do
|
do
|
||||||
BIN1="${BIN1} `basename $f .c`.o"
|
BIN1="${BIN1} `basename $f .c`.o"
|
||||||
done
|
done
|
||||||
|
|
||||||
BIN2=""
|
BIN2=""
|
||||||
for f in ${SRCS2}
|
for f in ${SRCS2}
|
||||||
do
|
do
|
||||||
BIN2="${BIN2} `basename $f .c`.o"
|
BIN2="${BIN2} `basename $f .c`.o"
|
||||||
done
|
done
|
||||||
|
|
||||||
BIN3=""
|
BIN3=""
|
||||||
for f in ${SRCS3}
|
for f in ${SRCS3}
|
||||||
do
|
do
|
||||||
BIN3="${BIN3} `basename $f .c`.o"
|
BIN3="${BIN3} `basename $f .c`.o"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
BIN4=""
|
||||||
|
for f in ${SRCS4}
|
||||||
|
do
|
||||||
|
BIN4="${BIN4} `basename $f .c`.o"
|
||||||
|
done
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@ -224,8 +253,11 @@ if $VALID ; then
|
|||||||
echo "ntimed-sim: ${BIN3}"
|
echo "ntimed-sim: ${BIN3}"
|
||||||
echo " \${CC} \${CFLAGS} -o ntimed-sim ${BIN3} -lm"
|
echo " \${CC} \${CFLAGS} -o ntimed-sim ${BIN3} -lm"
|
||||||
echo
|
echo
|
||||||
|
echo "ntimed-test: ${BIN4}"
|
||||||
|
echo " \${CC} \${CFLAGS} -o ntimed-test ${BIN4} -lm"
|
||||||
|
echo
|
||||||
echo "clean:"
|
echo "clean:"
|
||||||
echo " rm -f ${l} ntimed ntimed-poll ntimed-sim"
|
echo " rm -f ${l} ntimed ntimed-poll ntimed-sim ntimed-test"
|
||||||
echo
|
echo
|
||||||
echo "depend:"
|
echo "depend:"
|
||||||
echo " @echo Dependencies already done"
|
echo " @echo Dependencies already done"
|
||||||
|
|||||||
@ -25,67 +25,22 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <proto/dos.h>
|
|
||||||
#include <proto/intuition.h>
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
|
|
||||||
#include <resources/battclock.h>
|
|
||||||
#include <clib/battclock_protos.h>
|
|
||||||
#include <clib/utility_protos.h>
|
|
||||||
|
|
||||||
#ifdef Debug
|
|
||||||
#undef Debug
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef AROS
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include <proto/socket.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <bsdsocket/socketbasetags.h>
|
|
||||||
|
|
||||||
#include <net/if.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
|
|
||||||
#ifdef Debug
|
|
||||||
#undef Debug
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "tz.h"
|
|
||||||
#include "ntimed.h"
|
|
||||||
#include "ntimed_platform.h"
|
#include "ntimed_platform.h"
|
||||||
#include "mem.h"
|
#include "ntimed.h"
|
||||||
|
#include "tz.h"
|
||||||
#include "ntp.h"
|
#include "ntp.h"
|
||||||
#include "udp.h"
|
#include "udp.h"
|
||||||
|
|
||||||
|
#define ARGSFORMAT "P=PARAM/K,T=TRACEFILE/K,Z=TIMEZONE/K,SERVERS/M,SYNC/S,SAVE/S,QUIET/S"
|
||||||
|
const char *vers = "\0$VER: ntimed-client 1.0a";
|
||||||
|
|
||||||
#define PARAM_CLIENT PARAM_INSTANCE
|
#define PARAM_CLIENT PARAM_INSTANCE
|
||||||
#define PARAM_TABLE_NAME client_param_table
|
#define PARAM_TABLE_NAME client_param_table
|
||||||
#include "param_instance.h"
|
#include "param_instance.h"
|
||||||
#undef PARAM_TABLE_NAME
|
#undef PARAM_TABLE_NAME
|
||||||
#undef PARAM_CLIENT
|
#undef PARAM_CLIENT
|
||||||
|
|
||||||
#define ARGSFORMAT "P=PARAM/K,T=TRACEFILE/K,Z=TIMEZONE/K,SERVERS/M,SYNC/S,SAVE/S,QUIET/S"
|
|
||||||
const char *vers = "\0$VER: ntimed 1.0a";
|
|
||||||
|
|
||||||
void Time_Amiga(struct todolist *);
|
void Time_Amiga(struct todolist *);
|
||||||
void Time_Amiga_Passive(void);
|
|
||||||
extern int validtime;
|
extern int validtime;
|
||||||
|
|
||||||
BOOL savetime;
|
BOOL savetime;
|
||||||
|
|||||||
@ -25,56 +25,15 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <proto/dos.h>
|
|
||||||
#include <proto/intuition.h>
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
|
|
||||||
#ifdef Debug
|
|
||||||
#undef Debug
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef AROS
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include <proto/socket.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <bsdsocket/socketbasetags.h>
|
|
||||||
|
|
||||||
#include <net/if.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
|
|
||||||
#ifdef Debug
|
|
||||||
#undef Debug
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "tz.h"
|
|
||||||
#include "ntimed.h"
|
|
||||||
#include "ntimed_platform.h"
|
#include "ntimed_platform.h"
|
||||||
#include "mem.h"
|
#include "ntimed.h"
|
||||||
|
#include "tz.h"
|
||||||
#include "ntp.h"
|
#include "ntp.h"
|
||||||
#include "udp.h"
|
#include "udp.h"
|
||||||
|
|
||||||
#define ARGSFORMAT "D=DURATION/N,M=MONITOR/K,T=TRACEFILE/K,Z=TIMEZONE/K,SERVERS/M,QUIET/S"
|
#define ARGSFORMAT "D=DURATION/N,M=MONITOR/K,T=TRACEFILE/K,Z=TIMEZONE/K,SERVERS/M,QUIET/S"
|
||||||
const char *vers = "\0$VER: ntimed-poll 1.0a";
|
const char *vers = "\0$VER: ntimed-poll 1.0a";
|
||||||
|
|
||||||
void Time_Amiga(struct todolist *);
|
|
||||||
void Time_Amiga_Passive(void);
|
void Time_Amiga_Passive(void);
|
||||||
|
|
||||||
BOOL started_from_wb;
|
BOOL started_from_wb;
|
||||||
|
|||||||
@ -25,52 +25,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <proto/dos.h>
|
|
||||||
#include <proto/intuition.h>
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
|
|
||||||
#ifdef Debug
|
|
||||||
#undef Debug
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef AROS
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include <proto/socket.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <bsdsocket/socketbasetags.h>
|
|
||||||
|
|
||||||
#include <net/if.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
|
|
||||||
#ifdef Debug
|
|
||||||
#undef Debug
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "tz.h"
|
|
||||||
#include "ntimed.h"
|
|
||||||
#include "ntimed_platform.h"
|
#include "ntimed_platform.h"
|
||||||
#include "mem.h"
|
#include "ntimed.h"
|
||||||
#include "ntp.h"
|
#include "ntp.h"
|
||||||
#include "udp.h"
|
#include "udp.h"
|
||||||
|
|
||||||
|
#define ARGSFORMAT "P=PARAM/K,B=BUMP/K,T=TRACEFILE/K,SIMFILE/A,QUIET/S"
|
||||||
|
const char *vers = "\0$VER: ntimed-sim 1.0a";
|
||||||
|
|
||||||
#define PARAM_CLIENT PARAM_INSTANCE
|
#define PARAM_CLIENT PARAM_INSTANCE
|
||||||
#define PARAM_TABLE_NAME client_param_table
|
#define PARAM_TABLE_NAME client_param_table
|
||||||
#include "param_instance.h"
|
#include "param_instance.h"
|
||||||
@ -107,9 +69,6 @@ struct Library *SocketBase = NULL;
|
|||||||
struct RDArgs *rdargs = NULL;
|
struct RDArgs *rdargs = NULL;
|
||||||
struct todolist *tdl = NULL;
|
struct todolist *tdl = NULL;
|
||||||
|
|
||||||
#define ARGSFORMAT "P=PARAM/K,B=BUMP/K,T=TRACEFILE/K,SIMFILE/A,QUIET/S"
|
|
||||||
const char *vers = "\0$VER: ntimed-sim 1.0a";
|
|
||||||
|
|
||||||
struct ntimedargs {
|
struct ntimedargs {
|
||||||
char *params;
|
char *params;
|
||||||
char *bump;
|
char *bump;
|
||||||
|
|||||||
@ -33,6 +33,37 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "mem.h"
|
||||||
|
#include <proto/exec.h>
|
||||||
|
#include <proto/dos.h>
|
||||||
|
#include <proto/intuition.h>
|
||||||
|
#include <resources/battclock.h>
|
||||||
|
#include <clib/battclock_protos.h>
|
||||||
|
#include <clib/utility_protos.h>
|
||||||
|
|
||||||
|
#ifdef AROS
|
||||||
|
#ifdef Debug
|
||||||
|
#undef Debug
|
||||||
|
#endif
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <proto/socket.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <bsdsocket/socketbasetags.h>
|
||||||
|
#include <net/if.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
#ifdef Debug
|
||||||
|
#undef Debug
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef AOS3
|
#ifdef AOS3
|
||||||
#define ARGPTR STRPTR
|
#define ARGPTR STRPTR
|
||||||
#define ARGS_FORMAT ARGSFORMAT
|
#define ARGS_FORMAT ARGSFORMAT
|
||||||
|
|||||||
70
ntp.h
70
ntp.h
@ -56,28 +56,28 @@ enum ntp_state {
|
|||||||
/* ntp_packet.c -- [De]Serialisation **********************************/
|
/* ntp_packet.c -- [De]Serialisation **********************************/
|
||||||
|
|
||||||
struct ntp_packet {
|
struct ntp_packet {
|
||||||
unsigned magic;
|
unsigned magic;
|
||||||
#define NTP_PACKET_MAGIC 0x78b7f0be
|
#define NTP_PACKET_MAGIC 0x78b7f0be
|
||||||
|
|
||||||
enum ntp_leap ntp_leap;
|
enum ntp_leap ntp_leap;
|
||||||
uint8_t ntp_version;
|
uint8_t ntp_version;
|
||||||
enum ntp_mode ntp_mode;
|
enum ntp_mode ntp_mode;
|
||||||
uint8_t ntp_stratum;
|
uint8_t ntp_stratum;
|
||||||
uint8_t ntp_poll;
|
uint8_t ntp_poll;
|
||||||
int8_t ntp_precision;
|
int8_t ntp_precision;
|
||||||
struct timestamp ntp_delay;
|
struct timestamp ntp_delay;
|
||||||
struct timestamp ntp_dispersion;
|
struct timestamp ntp_dispersion;
|
||||||
uint8_t ntp_refid[4];
|
uint8_t ntp_refid[4];
|
||||||
struct timestamp ntp_reference;
|
struct timestamp ntp_reference;
|
||||||
struct timestamp ntp_origin;
|
struct timestamp ntp_origin;
|
||||||
struct timestamp ntp_receive;
|
struct timestamp ntp_receive;
|
||||||
struct timestamp ntp_transmit;
|
struct timestamp ntp_transmit;
|
||||||
|
|
||||||
struct timestamp ts_rx;
|
struct timestamp ts_rx;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ntp_packet *NTP_Packet_Unpack(struct ntp_packet *dst, void *ptr,
|
struct ntp_packet *NTP_Packet_Unpack(struct ntp_packet *dst, void *ptr,
|
||||||
ssize_t len);
|
ssize_t len);
|
||||||
size_t NTP_Packet_Pack(void *ptr, ssize_t len, struct ntp_packet *);
|
size_t NTP_Packet_Pack(void *ptr, ssize_t len, struct ntp_packet *);
|
||||||
|
|
||||||
/* ntp_tools.c -- Handy tools *****************************************/
|
/* ntp_tools.c -- Handy tools *****************************************/
|
||||||
@ -97,45 +97,45 @@ void NF_Init(void);
|
|||||||
|
|
||||||
|
|
||||||
struct ntp_peer {
|
struct ntp_peer {
|
||||||
unsigned magic;
|
unsigned magic;
|
||||||
#define NTP_PEER_MAGIC 0xbf0740a0
|
#define NTP_PEER_MAGIC 0xbf0740a0
|
||||||
char *hostname;
|
char *hostname;
|
||||||
char *ip;
|
char *ip;
|
||||||
struct sockaddr *sa;
|
struct sockaddr *sa;
|
||||||
unsigned sa_len;
|
unsigned sa_len;
|
||||||
struct ntp_packet *tx_pkt;
|
struct ntp_packet *tx_pkt;
|
||||||
struct ntp_packet *rx_pkt;
|
struct ntp_packet *rx_pkt;
|
||||||
|
|
||||||
ntp_filter_f *filter_func;
|
ntp_filter_f *filter_func;
|
||||||
void *filter_priv;
|
void *filter_priv;
|
||||||
|
|
||||||
struct combiner *combiner;
|
struct combiner *combiner;
|
||||||
|
|
||||||
// For ntp_peerset.c
|
// For ntp_peerset.c
|
||||||
TAILQ_ENTRY(ntp_peer) list;
|
TAILQ_ENTRY(ntp_peer) list;
|
||||||
struct ntp_group *group;
|
struct ntp_group *group;
|
||||||
enum ntp_state state;
|
enum ntp_state state;
|
||||||
const struct ntp_peer *other;
|
const struct ntp_peer *other;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ntp_peer *NTP_Peer_New(const char *name, const void *, unsigned);
|
struct ntp_peer *NTP_Peer_New(const char *name, const void *, unsigned);
|
||||||
struct ntp_peer *NTP_Peer_NewLookup(struct ocx *ocx, const char *name);
|
struct ntp_peer *NTP_Peer_NewLookup(struct ocx *ocx, const char *name);
|
||||||
void NTP_Peer_Destroy(struct ntp_peer *np);
|
void NTP_Peer_Destroy(struct ntp_peer *np);
|
||||||
int NTP_Peer_Poll(struct ocx *, const struct udp_socket *,
|
int NTP_Peer_Poll(struct ocx *, const struct udp_socket *,
|
||||||
const struct ntp_peer *, double tmo);
|
const struct ntp_peer *, double tmo);
|
||||||
|
|
||||||
/* ntp_peerset.c -- Peer set management ****************************/
|
/* ntp_peerset.c -- Peer set management ****************************/
|
||||||
|
|
||||||
struct ntp_peerset *NTP_PeerSet_New(struct ocx *);
|
struct ntp_peerset *NTP_PeerSet_New(struct ocx *);
|
||||||
void NTP_PeerSet_AddSim(struct ocx *, struct ntp_peerset *,
|
void NTP_PeerSet_AddSim(struct ocx *, struct ntp_peerset *,
|
||||||
const char *hostname, const char *ip);
|
const char *hostname, const char *ip);
|
||||||
int NTP_PeerSet_Add(struct ocx *, struct ntp_peerset *, const char *hostname);
|
int NTP_PeerSet_Add(struct ocx *, struct ntp_peerset *, const char *hostname);
|
||||||
void NTP_PeerSet_Poll(struct ocx *, struct ntp_peerset *, struct udp_socket *,
|
void NTP_PeerSet_Poll(struct ocx *, struct ntp_peerset *, struct udp_socket *,
|
||||||
struct todolist *);
|
struct todolist *);
|
||||||
|
|
||||||
struct ntp_peer *NTP_PeerSet_Iter0(const struct ntp_peerset *);
|
struct ntp_peer *NTP_PeerSet_Iter0(const struct ntp_peerset *);
|
||||||
struct ntp_peer *NTP_PeerSet_IterN(const struct ntp_peerset *,
|
struct ntp_peer *NTP_PeerSet_IterN(const struct ntp_peerset *,
|
||||||
const struct ntp_peer *);
|
const struct ntp_peer *);
|
||||||
|
|
||||||
#define NTP_PeerSet_Foreach(var, nps) \
|
#define NTP_PeerSet_Foreach(var, nps) \
|
||||||
for(var = NTP_PeerSet_Iter0(nps); \
|
for(var = NTP_PeerSet_Iter0(nps); \
|
||||||
|
|||||||
@ -216,6 +216,8 @@ tb_adjust_f *TB_Adjust = tb_Adjust;
|
|||||||
* Timebase test functions.
|
* Timebase test functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef WITHTEST
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ts_onetest(struct ocx *ocx, const struct timestamp *ts, double off)
|
ts_onetest(struct ocx *ocx, const struct timestamp *ts, double off)
|
||||||
{
|
{
|
||||||
@ -264,4 +266,4 @@ TS_RunTest(struct ocx *ocx)
|
|||||||
AZ(nf);
|
AZ(nf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user