mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
Move some FSM initialisation into FsmInit().
This commit is contained in:
parent
68f7a8cdcc
commit
7e80369b76
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/MP/; revision=33630
5 changed files with 11 additions and 13 deletions
|
@ -17,7 +17,7 @@
|
|||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ccp.c,v 1.30.2.9 1998/02/10 03:23:07 brian Exp $
|
||||
* $Id: ccp.c,v 1.30.2.10 1998/02/18 19:36:09 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Support other compression protocols
|
||||
|
@ -145,7 +145,7 @@ void
|
|||
CcpInit(struct bundle *bundle, struct link *l)
|
||||
{
|
||||
/* Initialise ourselves */
|
||||
FsmInit(&CcpInfo.fsm, bundle, l);
|
||||
FsmInit(&CcpInfo.fsm, bundle, l, 10);
|
||||
CcpInfo.his_proto = CcpInfo.my_proto = -1;
|
||||
CcpInfo.reset_sent = CcpInfo.last_reset = -1;
|
||||
CcpInfo.in_algorithm = CcpInfo.out_algorithm = -1;
|
||||
|
@ -153,7 +153,6 @@ CcpInit(struct bundle *bundle, struct link *l)
|
|||
CcpInfo.out_init = CcpInfo.in_init = 0;
|
||||
CcpInfo.uncompout = CcpInfo.compout = 0;
|
||||
CcpInfo.uncompin = CcpInfo.compin = 0;
|
||||
CcpInfo.fsm.maxconfig = 10;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: fsm.c,v 1.27.2.10 1998/02/16 00:00:07 brian Exp $
|
||||
* $Id: fsm.c,v 1.27.2.11 1998/02/18 19:35:38 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Refer loglevel for log output
|
||||
|
@ -84,7 +84,7 @@ StoppedTimeout(void *v)
|
|||
}
|
||||
|
||||
void
|
||||
FsmInit(struct fsm *fp, struct bundle *bundle, struct link *l)
|
||||
FsmInit(struct fsm *fp, struct bundle *bundle, struct link *l, int maxcfg)
|
||||
{
|
||||
LogPrintf(LogDEBUG, "FsmInit\n");
|
||||
fp->state = ST_INITIAL;
|
||||
|
@ -93,6 +93,7 @@ FsmInit(struct fsm *fp, struct bundle *bundle, struct link *l)
|
|||
fp->maxconfig = 3;
|
||||
fp->link = l;
|
||||
fp->bundle = bundle;
|
||||
fp->maxconfig = maxcfg;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: fsm.h,v 1.16.2.4 1998/02/02 19:32:06 brian Exp $
|
||||
* $Id: fsm.h,v 1.16.2.5 1998/02/06 02:24:16 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
|
@ -131,7 +131,7 @@ extern u_char *rejp;
|
|||
|
||||
extern char const *StateNames[];
|
||||
|
||||
extern void FsmInit(struct fsm *, struct bundle *, struct link *);
|
||||
extern void FsmInit(struct fsm *, struct bundle *, struct link *, int);
|
||||
extern void FsmOutput(struct fsm *, u_int, u_int, u_char *, int);
|
||||
extern void FsmOpen(struct fsm *);
|
||||
extern void FsmUp(struct fsm *);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ipcp.c,v 1.50.2.12 1998/02/09 19:20:52 brian Exp $
|
||||
* $Id: ipcp.c,v 1.50.2.13 1998/02/10 03:23:20 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o More RFC1772 backwoard compatibility
|
||||
|
@ -234,7 +234,7 @@ void
|
|||
IpcpInit(struct bundle *bundle, struct link *l)
|
||||
{
|
||||
/* Initialise ourselves */
|
||||
FsmInit(&IpcpInfo.fsm, bundle, l);
|
||||
FsmInit(&IpcpInfo.fsm, bundle, l, 10);
|
||||
if (iplist_isvalid(&IpcpInfo.DefHisChoice))
|
||||
iplist_setrandpos(&IpcpInfo.DefHisChoice);
|
||||
IpcpInfo.his_compproto = 0;
|
||||
|
@ -268,7 +268,6 @@ IpcpInit(struct bundle *bundle, struct link *l)
|
|||
VjInit(IpcpInfo.VJInitSlots - 1);
|
||||
|
||||
IpcpInfo.heis1172 = 0;
|
||||
IpcpInfo.fsm.maxconfig = 10;
|
||||
throughput_init(&IpcpInfo.throughput);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: lcp.c,v 1.55.2.16 1998/02/17 19:29:11 brian Exp $
|
||||
* $Id: lcp.c,v 1.55.2.17 1998/02/18 19:35:48 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Limit data field length by MRU
|
||||
|
@ -186,7 +186,7 @@ void
|
|||
LcpInit(struct bundle *bundle, struct physical *physical)
|
||||
{
|
||||
/* Initialise ourselves */
|
||||
FsmInit(&LcpInfo.fsm, bundle, physical2link(physical));
|
||||
FsmInit(&LcpInfo.fsm, bundle, physical2link(physical), 10);
|
||||
hdlc_Init(&physical->hdlc);
|
||||
async_Init(&physical->async);
|
||||
|
||||
|
@ -209,7 +209,6 @@ LcpInit(struct bundle *bundle, struct physical *physical)
|
|||
|
||||
LcpInfo.his_reject = LcpInfo.my_reject = 0;
|
||||
LcpInfo.auth_iwait = LcpInfo.auth_ineed = 0;
|
||||
LcpInfo.fsm.maxconfig = 10;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue