Lines Matching refs:fsm
51 #include "fsm.h"
91 static int ipv6cp_LayerUp(struct fsm *);
92 static void ipv6cp_LayerDown(struct fsm *);
93 static void ipv6cp_LayerStart(struct fsm *);
94 static void ipv6cp_LayerFinish(struct fsm *);
95 static void ipv6cp_InitRestartCounter(struct fsm *, int);
96 static void ipv6cp_SendConfigReq(struct fsm *);
97 static void ipv6cp_SentTerminateReq(struct fsm *);
98 static void ipv6cp_SendTerminateAck(struct fsm *, u_char);
99 static void ipv6cp_DecodeConfig(struct fsm *, u_char *, u_char *, int,
199 struct bundle *bundle = ipv6cp->fsm.bundle;
272 fsm_Init(&ipv6cp->fsm, "IPV6CP", PROTO_IPV6CP, 1, IPV6CP_MAXCODE, LogIPV6CP,
275 ipv6cp->cfg.fsm.timeout = DEF_FSMRETRY;
276 ipv6cp->cfg.fsm.maxreq = DEF_FSMTRIES;
277 ipv6cp->cfg.fsm.maxtrm = DEF_FSMTRIES;
320 ipv6cp->fsm.link = l;
328 prompt_Printf(arg->prompt, "%s [%s]\n", ipv6cp->fsm.name,
329 State2Nam(ipv6cp->fsm.state));
330 if (ipv6cp->fsm.state == ST_OPENED) {
341 " REQ%s, %u Term REQ%s\n\n", ipv6cp->cfg.fsm.timeout,
342 ipv6cp->cfg.fsm.maxreq, ipv6cp->cfg.fsm.maxreq == 1 ? "" : "s",
343 ipv6cp->cfg.fsm.maxtrm, ipv6cp->cfg.fsm.maxtrm == 1 ? "" : "s");
356 fsm_Input(&bundle->ncp.ipv6cp.fsm, bp);
398 if (!iface_SetFlags(ipv6cp->fsm.bundle->iface->name, IFF_UP)) {
400 " flag on %s\n", ipv6cp->fsm.bundle->iface->name);
423 struct bundle *bundle = ipv6cp->fsm.bundle;
430 if (ipv6cp->fsm.state != ST_OPENED)
436 if (l->ccp.fsm.state != ST_OPENED && ccp_Required(&l->ccp)) {
464 ipv6cp_LayerUp(struct fsm *fp)
513 fp->more.reqs = fp->more.naks = fp->more.rejs = ipv6cp->cfg.fsm.maxreq * 3;
520 ipv6cp_LayerDown(struct fsm *fp)
572 ipv6cp_LayerStart(struct fsm *fp)
580 fp->more.reqs = fp->more.naks = fp->more.rejs = ipv6cp->cfg.fsm.maxreq * 3;
585 ipv6cp_LayerFinish(struct fsm *fp)
596 ipv6cp_InitRestartCounter(struct fsm *fp, int what)
598 /* Set fsm timer load */
601 fp->FsmTimer.load = ipv6cp->cfg.fsm.timeout * SECTICKS;
604 fp->restart = ipv6cp->cfg.fsm.maxreq;
607 fp->restart = ipv6cp->cfg.fsm.maxtrm;
616 ipv6cp_SendConfigReq(struct fsm *fp)
636 ipv6cp_SentTerminateReq(struct fsm *fp __unused)
642 ipv6cp_SendTerminateAck(struct fsm *fp, u_char id)
682 ipv6cp_DecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
717 fsm_Close(&ipv6cp->fsm);
736 fsm_Close(&ipv6cp->fsm);