]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/ccp.c
MP-related code should be wrapped within HAVE_MULTILINK pre-processor
[ppp.git] / pppd / ccp.c
index 7c6b8c7824b14ac4f4e9fb38782ebbdbf50a994a..7cfd692fd3558409bcf64c3f117db725c56a8437 100644 (file)
@@ -25,9 +25,7 @@
  * OR MODIFICATIONS.
  */
 
-#ifndef lint
-static char rcsid[] = "$Id: ccp.c,v 1.25 1999/03/16 03:15:12 paulus Exp $";
-#endif
+#define RCSID  "$Id: ccp.c,v 1.30 2000/04/15 01:27:11 masputra Exp $"
 
 #include <stdlib.h>
 #include <string.h>
@@ -37,6 +35,8 @@ static char rcsid[] = "$Id: ccp.c,v 1.25 1999/03/16 03:15:12 paulus Exp $";
 #include "ccp.h"
 #include <net/ppp-comp.h>
 
+static const char rcsid[] = RCSID;
+
 /*
  * Command-line options.
  */
@@ -48,7 +48,7 @@ static option_t ccp_option_list[] = {
       "Disable CCP negotiation" },
     { "-ccp", o_bool, &ccp_protent.enabled_flag,
       "Disable CCP negotiation" },
-    { "bsdcomp", o_special, setbsdcomp,
+    { "bsdcomp", o_special, (void *)setbsdcomp,
       "Request BSD-Compress packet compression" },
     { "nobsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress,
       "don't allow BSD-Compress", OPT_A2COPY,
@@ -56,7 +56,7 @@ static option_t ccp_option_list[] = {
     { "-bsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress,
       "don't allow BSD-Compress", OPT_A2COPY,
       &ccp_allowoptions[0].bsd_compress },
-    { "deflate", 1, setdeflate,
+    { "deflate", 1, (void *)setdeflate,
       "request Deflate compression" },
     { "nodeflate", o_bool, &ccp_wantoptions[0].deflate,
       "don't allow Deflate compression", OPT_A2COPY,
@@ -107,6 +107,7 @@ struct protent ccp_protent = {
     ccp_datainput,
     1,
     "CCP",
+    "Compressed",
     ccp_option_list,
     NULL,
     NULL,
@@ -707,12 +708,9 @@ ccp_nakci(f, p, len)
     /*
      * Predictor-1 and 2 have no options, so they can't be Naked.
      *
-     * XXX What should we do with any remaining options?
+     * There may be remaining options but we ignore them.
      */
 
-    if (len != 0)
-       return 0;
-
     if (f->state != OPENED)
        *go = try;
     return 1;
@@ -1033,7 +1031,7 @@ ccp_up(f)
            if (go->method == ho->method) {
                notice("%s compression enabled", method_name(go, ho));
            } else {
-               strlcpy(method1, sizeof(method1), method_name(go, NULL));
+               strlcpy(method1, method_name(go, NULL), sizeof(method1));
                notice("%s / %s compression enabled",
                       method1, method_name(ho, NULL));
            }
@@ -1152,7 +1150,7 @@ ccp_printpkt(p, plen, printer, arg)
     case TERMACK:
     case TERMREQ:
        if (len > 0 && *p >= ' ' && *p < 0x7f) {
-           print_string(p, len, printer, arg);
+           print_string((char *)p, len, printer, arg);
            p += len;
            len = 0;
        }