Lines Matching refs:algorithm

147 static const struct ccp_algorithm * const algorithm[] = {  variable
156 #define NALGORITHMS (sizeof algorithm/sizeof algorithm[0])
179 if (ccp->in.algorithm != -1) in ccp_ReportStatus()
181 (*algorithm[ccp->in.algorithm]->Disp)(&ccp->in.opt)); in ccp_ReportStatus()
183 if (ccp->out.algorithm != -1) { in ccp_ReportStatus()
185 for (f = 0; f < ccp->out.algorithm; f++) in ccp_ReportStatus()
186 if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg])) in ccp_ReportStatus()
189 (*algorithm[ccp->out.algorithm]->Disp)(&(*o)->val)); in ccp_ReportStatus()
277 ccp->in.algorithm = ccp->out.algorithm = -1; in ccp_Setup()
303 if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]) && in ccp_Required()
304 (*algorithm[f]->Required)(&ccp->fsm)) in ccp_Required()
317 if (ccp->fsm.state == ST_OPENED && ccp->out.algorithm >= 0) in ccp_MTUOverhead()
318 return algorithm[ccp->out.algorithm]->o.MTUOverhead; in ccp_MTUOverhead()
357 ccp->out.algorithm = -1; in CcpSendConfigReq()
359 if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]) && in CcpSendConfigReq()
360 !REJECTED(ccp, algorithm[f]->id) && in CcpSendConfigReq()
361 (*algorithm[f]->Usable)(fp)) { in CcpSendConfigReq()
365 if ((*o)->val.hdr.id == algorithm[f]->id && (*o)->algorithm == (int)f) in CcpSendConfigReq()
374 (*o)->val.hdr.id = algorithm[f]->id; in CcpSendConfigReq()
377 (*o)->algorithm = f; in CcpSendConfigReq()
378 (*algorithm[f]->o.OptInit)(fp->bundle, &(*o)->val, &ccp->cfg); in CcpSendConfigReq()
389 ccp->out.algorithm = f; in CcpSendConfigReq()
429 return (*algorithm[ccp->out.algorithm]->o.Reset)(ccp->out.state); in CcpRecvResetReq()
451 (*algorithm[ccp->in.algorithm]->i.Term)(ccp->in.state); in CcpLayerDown()
453 ccp->in.algorithm = -1; in CcpLayerDown()
456 (*algorithm[ccp->out.algorithm]->o.Term)(ccp->out.state); in CcpLayerDown()
458 ccp->out.algorithm = -1; in CcpLayerDown()
506 if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]) && in CcpLayerUp()
507 (*algorithm[f]->Required)(&ccp->fsm) && in CcpLayerUp()
508 (ccp->in.algorithm != (int)f || ccp->out.algorithm != (int)f)) { in CcpLayerUp()
511 fp->link->name, protoname(algorithm[f]->id)); in CcpLayerUp()
524 if (ccp->in.state == NULL && ccp->in.algorithm >= 0 && in CcpLayerUp()
525 ccp->in.algorithm < (int)NALGORITHMS) { in CcpLayerUp()
526 ccp->in.state = (*algorithm[ccp->in.algorithm]->i.Init) in CcpLayerUp()
538 if (ccp->out.algorithm > 0) in CcpLayerUp()
539 for (f = 0; f < (unsigned)ccp->out.algorithm; f++) in CcpLayerUp()
540 if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg])) in CcpLayerUp()
543 if (ccp->out.state == NULL && ccp->out.algorithm >= 0 && in CcpLayerUp()
544 ccp->out.algorithm < (int)NALGORITHMS) { in CcpLayerUp()
545 ccp->out.state = (*algorithm[ccp->out.algorithm]->o.Init) in CcpLayerUp()
576 ccp->in.algorithm = -1; /* In case we've received two REQs in a row */ in CcpDecodeConfig()
583 if (algorithm[f]->id == opt->hdr.id) in CcpDecodeConfig()
586 disp = f == -1 ? "" : (*algorithm[f]->Disp)(opt); in CcpDecodeConfig()
604 if (IsAccepted(ccp->cfg.neg[algorithm[f]->Neg]) && in CcpDecodeConfig()
605 (*algorithm[f]->Usable)(fp) && in CcpDecodeConfig()
606 ccp->in.algorithm == -1) { in CcpDecodeConfig()
608 switch ((*algorithm[f]->i.Set)(fp->bundle, &ccp->in.opt, &ccp->cfg)) { in CcpDecodeConfig()
618 ccp->in.algorithm = (int)f; /* This one'll do :-) */ in CcpDecodeConfig()
634 if ((*algorithm[f]->o.Set)(fp->bundle, &o->val, &ccp->cfg) == in CcpDecodeConfig()
636 ccp->my_proto = algorithm[f]->id; in CcpDecodeConfig()
640 if (algorithm[f]->Required(fp)) { in CcpDecodeConfig()
643 protoname(algorithm[f]->id)); in CcpDecodeConfig()
652 if (algorithm[f]->Required(fp)) { in CcpDecodeConfig()
654 fp->link->name, protoname(algorithm[f]->id)); in CcpDecodeConfig()
667 ccp->in.algorithm = -1; in CcpDecodeConfig()
714 (*algorithm[ccp->in.algorithm]->i.Reset)(ccp->in.state); in CcpRecvResetAck()
731 bp = (*algorithm[l->ccp.out.algorithm]->o.Write) in ccp_LayerPush()
763 bp = (*algorithm[l->ccp.in.algorithm]->i.Read) in ccp_LayerPull()
779 (*algorithm[l->ccp.in.algorithm]->i.DictSetup) in ccp_LayerPull()