X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fstatd%2Fstatd.h;h=c2d5956ec3329147d0d9ec8274da6ba9b650ad82;hp=5476d503aa8107c5eb8d2ea0b8aee6fa3939d225;hb=d6ea66438d89c7708a10e464013491655f5361b0;hpb=8f9579b1bed5a8aa9a3bddc2affe0da7e6a2bba5 diff --git a/utils/statd/statd.h b/utils/statd/statd.h index 5476d50..c2d5956 100644 --- a/utils/statd/statd.h +++ b/utils/statd/statd.h @@ -5,22 +5,13 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif + #include "sm_inter.h" #include "system.h" -#include "log.h" - -/* - * Paths and filenames. - */ -#if defined(NFS_STATEDIR) -# define DIR_BASE NFS_STATEDIR "/" -#else -# define DIR_BASE "/var/lib/nfs/" -#endif -#define SM_DIR DIR_BASE "sm" -#define SM_BAK_DIR DIR_BASE "sm.bak" -#define SM_STAT_PATH DIR_BASE "state" +#include "xlog.h" /* * Status definitions. @@ -31,16 +22,19 @@ /* * Function prototypes. */ -extern void change_state(void); -extern void do_regist(u_long, void (*)()); +extern _Bool statd_matchhostname(const char *hostname1, const char *hostname2); +extern _Bool statd_present_address(const struct sockaddr *sap, char *buf, + const size_t buflen); + extern void my_svc_run(void); extern void notify_hosts(void); extern void shuffle_dirs(void); +extern int statd_get_socket(void); extern int process_notify_list(void); extern int process_reply(FD_SET_TYPE *); extern char * xstrdup(const char *); extern void * xmalloc(size_t); -extern void xunlink (char *, char *, short int); +extern void load_state(void); /* * Host status structure and macros. @@ -63,15 +57,10 @@ stat_chge SM_stat_chge; extern int run_mode; #define MODE_NODAEMON 1 /* No-daemon/foreground mode. */ #define MODE_LOG_STDERR 2 /* in foreground mode, log to stderr */ -/*#define MODE_NOTIFY_ONLY 4*/ /* Send SM_NOTIFY to everyone monitored on +#define MODE_NOTIFY_ONLY 4 /* Send SM_NOTIFY to everyone monitored on a single interface/alias */ /* LH - notify_only mode would be for notifying hosts on an IP alias * that just came back up, for ex, when failing over a HA service to * another host.... */ - -/* - * Program name and version pointers -- See statd.c for the reasoning - * as to why they're global. - */ -extern char *name_p; /* program basename */ -extern char *version_p; /* program version */ +#define STATIC_HOSTNAME 8 /* Always use the hostname set by -n */ +#define MODE_NO_NOTIFY 16 /* Don't notify peers of a reboot */