]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/options.c
add support for CDTRCTS flow control
[ppp.git] / pppd / options.c
index 5a194b59ea1054511f3ec402601753c529189d7b..54810965f7a069c032cca0dafe0bf1684d1f7628 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: options.c,v 1.42 1998/03/26 04:46:06 paulus Exp $";
+static char rcsid[] = "$Id: options.c,v 1.43 1998/09/04 18:49:15 christos Exp $";
 #endif
 
 #include <ctype.h>
@@ -171,6 +171,7 @@ 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 **));
@@ -311,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 */
@@ -435,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\
@@ -1853,6 +1858,14 @@ setnocrtscts(argv)
     return (1);
 }
 
+static int
+setcdtrcts(argv)
+    char **argv;
+{
+    crtscts = 2;
+    return (1);
+}
+
 static int
 setxonxoff(argv)
     char **argv;