+static struct option_list *extra_options = NULL;
+
+/*
+ * Valid arguments.
+ */
+option_t general_options[] = {
+ { "debug", o_int, &debug,
+ "Increase debugging level", OPT_INC|OPT_NOARG|1 },
+ { "-d", o_int, &debug,
+ "Increase debugging level", OPT_INC|OPT_NOARG|1 },
+ { "kdebug", o_int, &kdebugflag,
+ "Set kernel driver debug level" },
+ { "nodetach", o_bool, &nodetach,
+ "Don't detach from controlling tty", 1 },
+ { "-detach", o_bool, &nodetach,
+ "Don't detach from controlling tty", 1 },
+ { "updetach", o_bool, &updetach,
+ "Detach from controlling tty once link is up", 1 },
+ { "holdoff", o_int, &holdoff,
+ "Set time in seconds before retrying connection" },
+ { "idle", o_int, &idle_time_limit,
+ "Set time in seconds before disconnecting idle link" },
+ { "lock", o_bool, &lockflag,
+ "Lock serial device with UUCP-style lock file", 1 },
+ { "-all", o_special_noarg, noopt,
+ "Don't request/allow any LCP or IPCP options (useless)" },
+ { "init", o_string, &initializer,
+ "A program to initialize the device",
+ OPT_A2INFO | OPT_PRIVFIX, &initializer_info },
+ { "connect", o_string, &connector,
+ "A program to set up a connection",
+ OPT_A2INFO | OPT_PRIVFIX, &connector_info },
+ { "disconnect", o_string, &disconnector,
+ "Program to disconnect serial device",
+ OPT_A2INFO | OPT_PRIVFIX, &disconnector_info },
+ { "welcome", o_string, &welcomer,
+ "Script to welcome client",
+ OPT_A2INFO | OPT_PRIVFIX, &welcomer_info },
+ { "pty", o_string, &ptycommand,
+ "Script to run on pseudo-tty master side",
+ OPT_A2INFO | OPT_PRIVFIX | OPT_DEVNAM, &ptycommand_info },
+ { "notty", o_bool, ¬ty,
+ "Input/output is not a tty", OPT_DEVNAM | 1 },
+ { "record", o_string, &record_file,
+ "Record characters sent/received to file" },
+ { "maxconnect", o_int, &maxconnect,
+ "Set connection time limit", OPT_LLIMIT|OPT_NOINCR|OPT_ZEROINF },
+ { "crtscts", o_int, &crtscts,
+ "Set hardware (RTS/CTS) flow control", OPT_NOARG|OPT_VAL(1) },
+ { "nocrtscts", o_int, &crtscts,
+ "Disable hardware flow control", OPT_NOARG|OPT_VAL(-1) },
+ { "-crtscts", o_int, &crtscts,
+ "Disable hardware flow control", OPT_NOARG|OPT_VAL(-1) },
+ { "cdtrcts", o_int, &crtscts,
+ "Set alternate hardware (DTR/CTS) flow control", OPT_NOARG|OPT_VAL(2) },
+ { "nocdtrcts", o_int, &crtscts,
+ "Disable hardware flow control", OPT_NOARG|OPT_VAL(-1) },
+ { "xonxoff", o_special_noarg, setxonxoff,
+ "Set software (XON/XOFF) flow control" },
+ { "domain", o_special, setdomain,
+ "Add given domain name to hostname" },
+ { "mtu", o_int, &lcp_allowoptions[0].mru,
+ "Set our MTU", OPT_LIMITS, NULL, MAXMRU, MINMRU },
+ { "netmask", o_special, setnetmask,
+ "set netmask" },
+ { "modem", o_bool, &modem,
+ "Use modem control lines", 1 },
+ { "local", o_bool, &modem,
+ "Don't use modem control lines" },
+ { "file", o_special, readfile,
+ "Take options from a file", OPT_PREPASS },
+ { "call", o_special, callfile,
+ "Take options from a privileged file", OPT_PREPASS },
+ { "persist", o_bool, &persist,
+ "Keep on reopening connection after close", 1 },
+ { "nopersist", o_bool, &persist,
+ "Turn off persist option" },
+ { "demand", o_bool, &demand,
+ "Dial on demand", OPT_INITONLY | 1, &persist },
+ { "--version", o_special_noarg, showversion,
+ "Show version number" },
+ { "--help", o_special_noarg, showhelp,
+ "Show brief listing of options" },
+ { "-h", o_special_noarg, showhelp,
+ "Show brief listing of options" },
+ { "sync", o_bool, &sync_serial,
+ "Use synchronous HDLC serial encoding", 1 },
+ { "logfd", o_int, &log_to_fd,
+ "Send log messages to this file descriptor" },
+ { "logfile", o_special, setlogfile,
+ "Append log messages to this file" },
+ { "nolog", o_int, &log_to_fd,
+ "Don't send log messages to any file",
+ OPT_NOARG | OPT_VAL(-1) },
+ { "nologfd", o_int, &log_to_fd,
+ "Don't send log messages to any file descriptor",
+ OPT_NOARG | OPT_VAL(-1) },
+ { "linkname", o_string, linkname,
+ "Set logical name for link",
+ OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
+ { "maxfail", o_int, &maxfail,
+ "Maximum number of unsuccessful connection attempts to allow" },
+ { "ktune", o_bool, &tune_kernel,
+ "Alter kernel settings as necessary", 1 },
+ { "noktune", o_bool, &tune_kernel,
+ "Don't alter kernel settings", 0 },
+#ifdef PLUGIN
+ { "plugin", o_special, loadplugin,
+ "Load a plug-in module into pppd", OPT_PRIV },
+#endif
+
+#ifdef PPP_FILTER
+ { "pdebug", o_int, &dflag,
+ "libpcap debugging" },
+ { "pass-filter", 1, setpassfilter,
+ "set filter for packets to pass" },
+ { "active-filter", 1, setactivefilter,
+ "set filter for active pkts" },
+#endif
+
+ { NULL }
+};