]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/options.c
add support for CDTRCTS flow control
[ppp.git] / pppd / options.c
index ae12981dffdf34681dc4a0ec441687ffda7b09db..54810965f7a069c032cca0dafe0bf1684d1f7628 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: options.c,v 1.41 1998/03/25 01:29:05 paulus Exp $";
+static char rcsid[] = "$Id: options.c,v 1.43 1998/09/04 18:49:15 christos Exp $";
 #endif
 
 #include <ctype.h>
@@ -171,8 +171,10 @@ static int setdomain __P((char **));
 static int setnetmask __P((char **));
 static int setcrtscts __P((char **));
 static int setnocrtscts __P((char **));
+static int setcdtrcts __P((char **));
 static int setxonxoff __P((char **));
 static int setnodetach __P((char **));
+static int setupdetach __P((char **));
 static int setmodem __P((char **));
 static int setlocal __P((char **));
 static int setlock __P((char **));
@@ -275,6 +277,7 @@ static struct cmd {
     {"-d", 0, setdebug},       /* Increase debugging level */
     {"nodetach", 0, setnodetach}, /* Don't detach from controlling tty */
     {"-detach", 0, setnodetach}, /* don't fork */
+    {"updetach", 0, setupdetach}, /* Detach once an NP has come up */
     {"noip", 0, noip},         /* Disable IP and IPCP */
     {"-ip", 0, noip},          /* Disable IP and IPCP */
     {"nomagic", 0, nomagicnumber}, /* Disable magic number negotiation */
@@ -309,6 +312,9 @@ static struct cmd {
     {"crtscts", 0, setcrtscts},        /* set h/w flow control */
     {"nocrtscts", 0, setnocrtscts}, /* clear h/w flow control */
     {"-crtscts", 0, setnocrtscts}, /* clear h/w flow control */
+    {"cdtrcts", 0, setcdtrcts},  /* set alternate h/w flow control */
+    {"nocdtrcts", 0, setnocrtscts}, /* clear h/w flow control */
+    {"-cdtrcts", 0, setnocrtscts}, /* clear h/w flow control */
     {"xonxoff", 0, setxonxoff},        /* set s/w flow control */
     {"debug", 0, setdebug},    /* Increase debugging level */
     {"kdebug", 1, setkdebug},  /* Enable kernel-level debugging */
@@ -433,6 +439,7 @@ Usage: %s [ options ], where options are:\n\
        auth            Require authentication from peer\n\
         connect <p>     Invoke shell command <p> to set up the serial line\n\
        crtscts         Use hardware RTS/CTS flow control\n\
+       cdtrcts         Use hardware DTR/CTS flow control (if supported)\n\
        defaultroute    Add default route through interface\n\
        file <f>        Take options from file <f>\n\
        modem           Use modem control lines\n\
@@ -1851,6 +1858,14 @@ setnocrtscts(argv)
     return (1);
 }
 
+static int
+setcdtrcts(argv)
+    char **argv;
+{
+    crtscts = 2;
+    return (1);
+}
+
 static int
 setxonxoff(argv)
     char **argv;
@@ -1870,6 +1885,14 @@ setnodetach(argv)
     return (1);
 }
 
+static int
+setupdetach(argv)
+    char **argv;
+{
+    nodetach = -1;
+    return (1);
+}
+
 static int
 setdemand(argv)
     char **argv;