Lines Matching refs:fsm
67 #include "fsm.h"
110 static int IpcpLayerUp(struct fsm *);
111 static void IpcpLayerDown(struct fsm *);
112 static void IpcpLayerStart(struct fsm *);
113 static void IpcpLayerFinish(struct fsm *);
114 static void IpcpInitRestartCounter(struct fsm *, int);
115 static void IpcpSendConfigReq(struct fsm *);
116 static void IpcpSentTerminateReq(struct fsm *);
117 static void IpcpSendTerminateAck(struct fsm *, u_char);
118 static void IpcpDecodeConfig(struct fsm *, u_char *, u_char *, int,
273 bundle_AdjustDNS(ipcp->fsm.bundle);
363 prompt_Printf(arg->prompt, "%s [%s]\n", ipcp->fsm.name,
364 State2Nam(ipcp->fsm.state));
365 if (ipcp->fsm.state == ST_OPENED) {
376 " REQ%s, %u Term REQ%s\n", ipcp->cfg.fsm.timeout,
377 ipcp->cfg.fsm.maxreq, ipcp->cfg.fsm.maxreq == 1 ? "" : "s",
378 ipcp->cfg.fsm.maxtrm, ipcp->cfg.fsm.maxtrm == 1 ? "" : "s");
456 fsm_Init(&ipcp->fsm, "IPCP", PROTO_IPCP, 1, IPCP_MAXCODE, LogIPCP,
482 ipcp->cfg.fsm.timeout = DEF_FSMRETRY;
483 ipcp->cfg.fsm.maxreq = DEF_FSMTRIES;
484 ipcp->cfg.fsm.maxtrm = DEF_FSMTRIES;
517 ipcp->fsm.link = l;
523 struct iface *iface = ipcp->fsm.bundle->iface;
529 ipcp->fsm.open_mode = 0;
583 || (ipcp->fsm.bundle->radius.valid && ipcp->fsm.bundle->radius.vj)
624 struct bundle *bundle = ipcp->fsm.bundle;
666 struct bundle *bundle = ipcp->fsm.bundle;
737 IpcpInitRestartCounter(struct fsm *fp, int what)
739 /* Set fsm timer load */
742 fp->FsmTimer.load = ipcp->cfg.fsm.timeout * SECTICKS;
745 fp->restart = ipcp->cfg.fsm.maxreq;
748 fp->restart = ipcp->cfg.fsm.maxtrm;
757 IpcpSendConfigReq(struct fsm *fp)
806 IpcpSentTerminateReq(struct fsm *fp __unused)
812 IpcpSendTerminateAck(struct fsm *fp, u_char id)
819 IpcpLayerStart(struct fsm *fp)
827 fp->more.reqs = fp->more.naks = fp->more.rejs = ipcp->cfg.fsm.maxreq * 3;
832 IpcpLayerFinish(struct fsm *fp)
848 struct bundle *bundle = ipcp->fsm.bundle;
860 struct bundle *bundle = ipcp->fsm.bundle;
867 IpcpLayerDown(struct fsm *fp)
915 if (!iface_SetFlags(ipcp->fsm.bundle->iface->name, IFF_UP)) {
917 ipcp->fsm.bundle->iface->name);
922 if (ipcp->fsm.bundle->NatEnabled)
930 IpcpLayerUp(struct fsm *fp)
971 fp->more.reqs = fp->more.naks = fp->more.rejs = ipcp->cfg.fsm.maxreq * 3;
980 struct bundle *bundle = ipcp->fsm.bundle;
1054 IpcpDecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
1099 fsm_Close(&ipcp->fsm);
1346 fsm_Input(&bundle->ncp.ipcp.fsm, bp);
1444 struct bundle *bundle = ipcp->fsm.bundle;
1451 if (ipcp->fsm.state != ST_OPENED)
1457 if (l->ccp.fsm.state != ST_OPENED && ccp_Required(&l->ccp)) {