]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/ipcp.c
don't need if.h or if_ppp.h
[ppp.git] / pppd / ipcp.c
index 94929cc6a8b38d47845cbea8510abe1f951fe47e..6c9abb15f2be9487516afe27a68523800c5f824d 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: ipcp.c,v 1.4 1994/04/11 07:19:06 paulus Exp $";
+static char rcsid[] = "$Id: ipcp.c,v 1.8 1994/05/26 06:37:34 paulus Exp $";
 #endif
 
 /*
@@ -26,18 +26,10 @@ static char rcsid[] = "$Id: ipcp.c,v 1.4 1994/04/11 07:19:06 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"
@@ -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)
@@ -1157,9 +1147,9 @@ ipcp_printpkt(p, plen, printer, arg)
                if (olen == CILEN_ADDRS) {
                    p += 2;
                    GETLONG(cilong, p);
-                   printer(arg, "addrs %s", ip_ntoa(cilong));
+                   printer(arg, "addrs %s", ip_ntoa(htonl(cilong)));
                    GETLONG(cilong, p);
-                   printer(arg, " %s", ip_ntoa(cilong));
+                   printer(arg, " %s", ip_ntoa(htonl(cilong)));
                }
                break;
            case CI_COMPRESSTYPE:
@@ -1183,7 +1173,7 @@ ipcp_printpkt(p, plen, printer, arg)
                if (olen == CILEN_ADDR) {
                    p += 2;
                    GETLONG(cilong, p);
-                   printer(arg, "addr %s", ip_ntoa(cilong));
+                   printer(arg, "addr %s", ip_ntoa(htonl(cilong)));
                }
                break;
            }