2 * Copyright (C) 1995-1997, 1999 Jeffrey A. Uphoff
3 * Modified by Olaf Kirch, Dec. 1996.
19 #define STAT_FAIL stat_fail
20 #define STAT_SUCC stat_succ
23 * Function prototypes.
25 extern void change_state(void);
26 extern void my_svc_run(void);
27 extern void notify_hosts(void);
28 extern void shuffle_dirs(void);
29 extern int statd_get_socket(void);
30 extern int process_notify_list(void);
31 extern int process_reply(FD_SET_TYPE *);
32 extern char * xstrdup(const char *);
33 extern void * xmalloc(size_t);
34 extern void load_state(void);
37 * Host status structure and macros.
39 stat_chge SM_stat_chge;
40 #define MY_NAME SM_stat_chge.mon_name
41 #define MY_STATE SM_stat_chge.state
44 * Some timeout values. (Timeout values are in whole seconds.)
46 #define CALLBACK_TIMEOUT 3 /* For client call-backs. */
47 #define NOTIFY_TIMEOUT 5 /* For status-change notifications. */
48 #define SELECT_TIMEOUT 10 /* Max select() timeout when work to do. */
49 #define MAX_TRIES 5 /* Max number of tries for any host. */
52 * Modes of operation - Lon
55 #define MODE_NODAEMON 1 /* No-daemon/foreground mode. */
56 #define MODE_LOG_STDERR 2 /* in foreground mode, log to stderr */
57 #define MODE_NOTIFY_ONLY 4 /* Send SM_NOTIFY to everyone monitored on
58 a single interface/alias */
59 /* LH - notify_only mode would be for notifying hosts on an IP alias
60 * that just came back up, for ex, when failing over a HA service to
62 #define STATIC_HOSTNAME 8 /* Always use the hostname set by -n */
63 #define MODE_NO_NOTIFY 16 /* Don't notify peers of a reboot */