]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/cbcp.c
update_link_stats(): treat link stats as unsigned, not signed
[ppp.git] / pppd / cbcp.c
index 34ba6f756a4a2319ee7c15d649d214cc86dc88cf..abe6253fe78222f22b996d00daa4319df1ce37f3 100644 (file)
@@ -18,9 +18,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#ifndef lint
-static char rcsid[] = "$Id: cbcp.c,v 1.7 1999/05/12 06:19:46 paulus Exp $";
-#endif
+#define RCSID  "$Id: cbcp.c,v 1.13 2002/09/18 02:49:46 carlsonj Exp $"
 
 #include <stdio.h>
 #include <string.h>
@@ -31,7 +29,8 @@ static char rcsid[] = "$Id: cbcp.c,v 1.7 1999/05/12 06:19:46 paulus Exp $";
 #include "cbcp.h"
 #include "fsm.h"
 #include "lcp.h"
-#include "ipcp.h"
+
+static const char rcsid[] = RCSID;
 
 /*
  * Options.
@@ -39,8 +38,8 @@ static char rcsid[] = "$Id: cbcp.c,v 1.7 1999/05/12 06:19:46 paulus Exp $";
 static int setcbcp __P((char **));
 
 static option_t cbcp_option_list[] = {
-    { "callback", o_special, setcbcp,
-      "Ask for callback" },
+    { "callback", o_special, (void *)setcbcp,
+      "Ask for callback", OPT_PRIO | OPT_A2STRVAL, &cbcp[0].us_number },
     { NULL }
 };
 
@@ -80,11 +79,11 @@ cbcp_state cbcp[NUM_PPP];
 
 /* internal prototypes */
 
-static void cbcp_recvreq __P((cbcp_state *us, char *pckt, int len));
+static void cbcp_recvreq __P((cbcp_state *us, u_char *pckt, int len));
 static void cbcp_resp __P((cbcp_state *us));
 static void cbcp_up __P((cbcp_state *us));
-static void cbcp_recvack __P((cbcp_state *us, char *pckt, int len));
-static void cbcp_send __P((cbcp_state *us, u_char code, u_char *buf, int len));
+static void cbcp_recvack __P((cbcp_state *us, u_char *pckt, int len));
+static void cbcp_send __P((cbcp_state *us, int code, u_char *buf, int len));
 
 /* option processing */
 static int
@@ -270,8 +269,8 @@ cbcp_printpkt(p, plen, printer, arg)
                printer(arg, " number = %s", str);
            }
            printer(arg, ">");
-           break;
        }
+       break;
 
     default:
        break;
@@ -289,7 +288,7 @@ cbcp_printpkt(p, plen, printer, arg)
 static void
 cbcp_recvreq(us, pckt, pcktlen)
     cbcp_state *us;
-    char *pckt;
+    u_char *pckt;
     int pcktlen;
 {
     u_char type, opt_len, delay, addr_type;
@@ -384,7 +383,7 @@ cbcp_resp(us)
        PUTCHAR(len , bufp);
        PUTCHAR(0, bufp);
        cbcp_send(us, CBCP_RESP, buf, len);
-       (*ipcp_protent.open)(us->us_unit);
+       start_networks(us->us_unit);
        return;
     }
 }
@@ -392,7 +391,7 @@ cbcp_resp(us)
 static void
 cbcp_send(us, code, buf, len)
     cbcp_state *us;
-    u_char code;
+    int code;
     u_char *buf;
     int len;
 {
@@ -418,7 +417,7 @@ cbcp_send(us, code, buf, len)
 static void
 cbcp_recvack(us, pckt, len)
     cbcp_state *us;
-    char *pckt;
+    u_char *pckt;
     int len;
 {
     u_char type, delay, addr_type;