2 * Copyright (C) 1995-1997, 1999 Jeffrey A. Uphoff
3 * Modified by Olaf Kirch, Dec. 1996.
14 * Paths and filenames.
16 #if defined(NFS_STATEDIR)
17 # define DIR_BASE NFS_STATEDIR "/"
19 # define DIR_BASE "/var/lib/nfs/"
21 #define SM_DIR DIR_BASE "sm"
22 #define SM_BAK_DIR DIR_BASE "sm.bak"
23 #define SM_STAT_PATH DIR_BASE "state"
28 #define STAT_FAIL stat_fail
29 #define STAT_SUCC stat_succ
32 * Function prototypes.
34 extern void change_state(void);
35 extern void do_regist(u_long, void (*)());
36 extern void my_svc_run(void);
37 extern void notify_hosts(void);
38 extern void shuffle_dirs(void);
39 extern int process_notify_list(void);
40 extern int process_reply(FD_SET_TYPE *);
41 extern char * xstrdup(const char *);
42 extern void * xmalloc(size_t);
43 extern void xunlink (char *, char *, short int);
46 * Host status structure and macros.
48 stat_chge SM_stat_chge;
49 #define MY_NAME SM_stat_chge.mon_name
50 #define MY_STATE SM_stat_chge.state
53 * Some timeout values. (Timeout values are in whole seconds.)
55 #define CALLBACK_TIMEOUT 3 /* For client call-backs. */
56 #define NOTIFY_TIMEOUT 5 /* For status-change notifications. */
57 #define SELECT_TIMEOUT 10 /* Max select() timeout when work to do. */
58 #define MAX_TRIES 5 /* Max number of tries for any host. */