1 /* Copyright (C) 1996 N.M. Maclaren
2 Copyright (C) 1996 The University of Cambridge
4 This includes all of the 'safe' headers and definitions used across modules.
5 No changes should be needed for any system that is even remotely like Unix. */
18 #define VERSION "1.6" /* Just the version string */
19 #define MAX_SOCKETS 10 /* Maximum number of addresses */
22 #define LOCKNAME "/etc/msntp.pid" /* Stores the pid */
25 #define SAVENAME "/etc/msntp.state" /* Stores the recovery state */
30 /* Defined in main.c */
32 #define op_client 1 /* Behave as a challenge client */
33 #define op_server 2 /* Behave as a response server */
34 #define op_listen 3 /* Behave as a listening client */
35 #define op_broadcast 4 /* Behave as a broadcast server */
37 extern const char *argv0;
39 extern int verbose, operation;
41 extern const char *lockname;
43 extern void fatal (int syserr, const char *message, const char *insert);
47 /* Defined in unix.c */
49 extern void do_nothing (int seconds);
51 extern int ftty (FILE *file);
53 extern void set_lock (int lock);
55 extern void log_message (const char *message);
59 /* Defined in internet.c */
61 /* extern void find_address (struct in_addr *address, int *port, char *hostname,
66 /* Defined in socket.c */
68 extern void open_sockets (int which, char *hostnames, int timespan);
70 extern void write_socket (int which, void *packet, int length);
72 extern int read_socket (int which, void *packet, int length, int waiting);
74 extern int flush_socket (int which);
76 extern void close_socket (int which);
80 /* Defined in timing.c */
82 extern double current_time (double offset);
84 extern time_t convert_time (double value, int *millisecs);
86 extern void adjust_time (double difference, int immediate, double ignore);