]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/ipcp.c
added stuff for compression and demand dialling;
[ppp.git] / pppd / ipcp.c
index a3a9247bf46b00686923b122d01d97360f5e7c54..8e20c525e8379753c8d5116b8075b7617f5f616c 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: ipcp.c,v 1.5 1994/05/01 11:45:09 paulus Exp $";
+static char rcsid[] = "$Id: ipcp.c,v 1.9 1994/08/22 00:36:38 paulus Exp $";
 #endif
 
 /*
@@ -26,18 +26,10 @@ static char rcsid[] = "$Id: ipcp.c,v 1.5 1994/05/01 11:45:09 paulus Exp $";
  */
 
 #include <stdio.h>
+#include <string.h>
 #include <syslog.h>
-#include <sys/ioctl.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/time.h>
-
-#include <net/if.h>
-#include <net/if_ppp.h>
-#include <net/route.h>
-#include <netinet/in.h>
-
-#include <string.h>
 
 #include "pppd.h"
 #include "ppp.h"
@@ -52,7 +44,7 @@ ipcp_options ipcp_allowoptions[NPPP]; /* Options we allow peer to request */
 ipcp_options ipcp_hisoptions[NPPP];    /* Options that we ack'd */
 
 extern char ifname[];
-extern char devname[];
+extern char devnam[];
 extern int baud_rate;
 
 /* local vars */
@@ -498,10 +490,6 @@ ipcp_nakci(f, p, len)
        len -= cilen; \
        INCPTR(2, p); \
        GETSHORT(cishort, p); \
-       if (cilen == CILEN_VJ) { \
-           GETCHAR(cimaxslotindex, p); \
-            GETCHAR(cicflag, p); \
-        } \
        no.neg = 1; \
         code \
     }
@@ -531,6 +519,8 @@ ipcp_nakci(f, p, len)
      */
     NAKCIVJ(CI_COMPRESSTYPE, neg_vj,
            if (cilen == CILEN_VJ) {
+               GETCHAR(cimaxslotindex, p);
+               GETCHAR(cicflag, p);
                if (cishort == IPCP_VJ_COMP) {
                    try.old_vj = 0;
                    if (cimaxslotindex < go->maxslotindex)
@@ -1093,7 +1083,7 @@ ipcp_script(f, script)
 
     argv[0] = script;
     argv[1] = ifname;
-    argv[2] = devname;
+    argv[2] = devnam;
     argv[3] = strspeed;
     argv[4] = strlocal;
     argv[5] = strremote;