+/*
+ * Startup information.
+ */
+static void log_modes(void)
+{
+ char buf[128]; /* watch stack size... */
+
+ /* No flags = no message */
+ if (!run_mode) return;
+
+ memset(buf,0,128);
+ sprintf(buf,"Flags: ");
+ if (run_mode & MODE_NODAEMON)
+ strcat(buf,"No-Daemon ");
+ if (run_mode & MODE_LOG_STDERR)
+ strcat(buf,"Log-STDERR ");
+
+ if (run_mode & MODE_NOTIFY_ONLY)
+ {
+ strcat(buf,"Notify-Only ");
+ }
+ log(L_WARNING,buf);
+ /* future: IP aliasing
+ if (run_mode & MODE_NOTIFY_ONLY)
+ {
+ dprintf(L_DEBUG,"Notify IP: %s",svr_addr);
+ } */
+}
+
+/*
+ * Since we do more than standard statd stuff, we might need to
+ * help the occasional admin.
+ */
+static void
+usage()
+{
+ fprintf(stderr,"usage: %s [options]\n", name_p);
+ fprintf(stderr," -h, -?, --help Print this help screen.\n");
+ fprintf(stderr," -F, --foreground Foreground (no-daemon mode)\n");
+ fprintf(stderr," -d, --no-syslog Verbose logging to stderr. Foreground mode only.\n");
+ fprintf(stderr," -p, --port Port to listen on\n");
+ fprintf(stderr," -o, --outgoing-port Port for outgoing connections\n");
+ fprintf(stderr," -V, -v, --version Display version information and exit.\n");
+ fprintf(stderr," -n, --name Specify a local hostname.\n");
+ fprintf(stderr," -P State directory path.\n");
+ fprintf(stderr," -N Run in notify only mode.\n");
+}