Lines Matching refs:fsm

69 #include "fsm.h"
112 static int IpcpLayerUp(struct fsm *);
113 static void IpcpLayerDown(struct fsm *);
114 static void IpcpLayerStart(struct fsm *);
115 static void IpcpLayerFinish(struct fsm *);
116 static void IpcpInitRestartCounter(struct fsm *, int);
117 static void IpcpSendConfigReq(struct fsm *);
118 static void IpcpSentTerminateReq(struct fsm *);
119 static void IpcpSendTerminateAck(struct fsm *, u_char);
120 static void IpcpDecodeConfig(struct fsm *, u_char *, u_char *, int,
275 bundle_AdjustDNS(ipcp->fsm.bundle);
365 prompt_Printf(arg->prompt, "%s [%s]\n", ipcp->fsm.name,
366 State2Nam(ipcp->fsm.state));
367 if (ipcp->fsm.state == ST_OPENED) {
378 " REQ%s, %u Term REQ%s\n", ipcp->cfg.fsm.timeout,
379 ipcp->cfg.fsm.maxreq, ipcp->cfg.fsm.maxreq == 1 ? "" : "s",
380 ipcp->cfg.fsm.maxtrm, ipcp->cfg.fsm.maxtrm == 1 ? "" : "s");
458 fsm_Init(&ipcp->fsm, "IPCP", PROTO_IPCP, 1, IPCP_MAXCODE, LogIPCP,
484 ipcp->cfg.fsm.timeout = DEF_FSMRETRY;
485 ipcp->cfg.fsm.maxreq = DEF_FSMTRIES;
486 ipcp->cfg.fsm.maxtrm = DEF_FSMTRIES;
519 ipcp->fsm.link = l;
525 struct iface *iface = ipcp->fsm.bundle->iface;
531 ipcp->fsm.open_mode = 0;
585 || (ipcp->fsm.bundle->radius.valid && ipcp->fsm.bundle->radius.vj)
626 struct bundle *bundle = ipcp->fsm.bundle;
668 struct bundle *bundle = ipcp->fsm.bundle;
739 IpcpInitRestartCounter(struct fsm *fp, int what)
741 /* Set fsm timer load */
744 fp->FsmTimer.load = ipcp->cfg.fsm.timeout * SECTICKS;
747 fp->restart = ipcp->cfg.fsm.maxreq;
750 fp->restart = ipcp->cfg.fsm.maxtrm;
759 IpcpSendConfigReq(struct fsm *fp)
808 IpcpSentTerminateReq(struct fsm *fp __unused)
814 IpcpSendTerminateAck(struct fsm *fp, u_char id)
821 IpcpLayerStart(struct fsm *fp)
829 fp->more.reqs = fp->more.naks = fp->more.rejs = ipcp->cfg.fsm.maxreq * 3;
834 IpcpLayerFinish(struct fsm *fp)
850 struct bundle *bundle = ipcp->fsm.bundle;
862 struct bundle *bundle = ipcp->fsm.bundle;
869 IpcpLayerDown(struct fsm *fp)
917 if (!iface_SetFlags(ipcp->fsm.bundle->iface->name, IFF_UP)) {
919 ipcp->fsm.bundle->iface->name);
924 if (ipcp->fsm.bundle->NatEnabled)
932 IpcpLayerUp(struct fsm *fp)
973 fp->more.reqs = fp->more.naks = fp->more.rejs = ipcp->cfg.fsm.maxreq * 3;
982 struct bundle *bundle = ipcp->fsm.bundle;
1056 IpcpDecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
1101 fsm_Close(&ipcp->fsm);
1348 fsm_Input(&bundle->ncp.ipcp.fsm, bp);
1446 struct bundle *bundle = ipcp->fsm.bundle;
1453 if (ipcp->fsm.state != ST_OPENED)
1459 if (l->ccp.fsm.state != ST_OPENED && ccp_Required(&l->ccp)) {