* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#ifndef lint
-static const char rcsid[] = "$Id: cbcp.c,v 1.9 1999/08/12 04:25:19 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>
#include "fsm.h"
#include "lcp.h"
+static const char rcsid[] = RCSID;
+
/*
* Options.
*/
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 }
};
/* 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
printer(arg, " number = %s", str);
}
printer(arg, ">");
- break;
}
+ break;
default:
break;
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;
PUTCHAR(len , bufp);
PUTCHAR(0, bufp);
cbcp_send(us, CBCP_RESP, buf, len);
- start_networks();
+ start_networks(us->us_unit);
return;
}
}
static void
cbcp_send(us, code, buf, len)
cbcp_state *us;
- u_char code;
+ int code;
u_char *buf;
int len;
{
static void
cbcp_recvack(us, pckt, len)
cbcp_state *us;
- char *pckt;
+ u_char *pckt;
int len;
{
u_char type, delay, addr_type;