void
redir_usage(char *name)
{
fprintf(stderr,"usage:\n");
fprintf(stderr,
"\t%s [options] [remote-host] listen_port connect_port\n",
name);
fprintf(stderr, "\t%s --inetd [options] [remote-host] connect_port\n", name);
fprintf(stderr, "\n\tOptions are:-\n");
fprintf(stderr, "\t\t--inetd\t\trun from inetd\n");
fprintf(stderr, "\t\t--debug\t\toutput debugging info\n");
fprintf(stderr, "\t\t--timeout=<n>\tset timeout to n seconds\n");
fprintf(stderr, "\t\t--syslog=\tlog messages to syslog\n");
fprintf(stderr, "\t\t--name=<str>\ttag syslog messages with 'str'\n");
fprintf(stderr, "\n\tVersion %s - $Id$\n", VERSION);
exit(2);
}
static struct option long_options[] = {
{"debug", no_argument, 0, 'd'},
{"timeout", required_argument, 0, 't'},
{"inetd", no_argument, 0, 'i'},
{"ident", required_argument, 0, 'n'},
{"name", required_argument, 0, 'n'},
{"syslog", no_argument, 0, 's'},
{0,0,0,0} /* End marker */
};
return to top