double dispersion, weight, when, offset, error;
} data_record;
-
+void syntax(int);
+void display_data(ntp_data *);
+void display_packet(unsigned char *, int);
+void pack_ntp(unsigned char *, int, ntp_data *);
+void unpack_ntp(ntp_data *, unsigned char *, int);
+void make_packet(ntp_data *, int);
+int read_packet(int, ntp_data *, double *, double *);
+void format_time(char *, int, double, double, double, double);
+double reset_clock(double, double, int);
+void run_server(void);
+double estimate_stats(int *, int *, data_record *, double, double *, double *,
+ double *, double *, double *, double *, int *, int);
+double correct_drift(double *, double *, double);
+void handle_saving(int, int *, int *, int *, data_record *, double *,
+ double *, double *);
+void query_savefile(void);
+void run_daemon(char **, int, int);
+void run_client(char **, int);
void fatal (int syserr, const char *message, const char *insert) {
static struct sockaddr_in here[MAX_SOCKETS], there[MAX_SOCKETS];
#endif
+void display_in_hex(const void *, int);
+#ifdef HAVE_IPV6
+void display_sock_in_hex(struct sockaddr_storage *);
+#else
+void display_sock_in_hex (struct sockaddr_in *);
+#endif
/* There needs to be some disgusting grobble for handling timeouts, that is
identical to the grobble in internet.c. */
#ifdef HAVE_IPV6
void display_sock_in_hex (struct sockaddr_storage *sock) {
- int family, len;
+ int family;
struct sockaddr_in *sin;
struct sockaddr_in6 *sin6;
/* if (settimeofday(&new,NULL))
fatal(1,"unable to reset current system time",NULL);*/
} else {
+ previous.tv_sec = 0;
+ previous.tv_usec = 0;
errno = 0;
/* if (adjtime(&adjust,&previous))
fatal(1,"unable to adjust current system time",NULL);*/