• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/usr.sbin/ppp/

Lines Matching refs:algorithm

149 static const struct ccp_algorithm * const algorithm[] = {
158 #define NALGORITHMS (sizeof algorithm/sizeof algorithm[0])
181 if (ccp->in.algorithm != -1)
183 (*algorithm[ccp->in.algorithm]->Disp)(&ccp->in.opt));
185 if (ccp->out.algorithm != -1) {
187 for (f = 0; f < ccp->out.algorithm; f++)
188 if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]))
191 (*algorithm[ccp->out.algorithm]->Disp)(&(*o)->val));
279 ccp->in.algorithm = ccp->out.algorithm = -1;
305 if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]) &&
306 (*algorithm[f]->Required)(&ccp->fsm))
319 if (ccp->fsm.state == ST_OPENED && ccp->out.algorithm >= 0)
320 return algorithm[ccp->out.algorithm]->o.MTUOverhead;
359 ccp->out.algorithm = -1;
361 if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]) &&
362 !REJECTED(ccp, algorithm[f]->id) &&
363 (*algorithm[f]->Usable)(fp)) {
367 if ((*o)->val.hdr.id == algorithm[f]->id && (*o)->algorithm == (int)f)
376 (*o)->val.hdr.id = algorithm[f]->id;
379 (*o)->algorithm = f;
380 (*algorithm[f]->o.OptInit)(fp->bundle, &(*o)->val, &ccp->cfg);
391 ccp->out.algorithm = f;
431 return (*algorithm[ccp->out.algorithm]->o.Reset)(ccp->out.state);
453 (*algorithm[ccp->in.algorithm]->i.Term)(ccp->in.state);
455 ccp->in.algorithm = -1;
458 (*algorithm[ccp->out.algorithm]->o.Term)(ccp->out.state);
460 ccp->out.algorithm = -1;
508 if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]) &&
509 (*algorithm[f]->Required)(&ccp->fsm) &&
510 (ccp->in.algorithm != (int)f || ccp->out.algorithm != (int)f)) {
511 /* Blow it all away - we haven't negotiated a required algorithm */
513 fp->link->name, protoname(algorithm[f]->id));
526 if (ccp->in.state == NULL && ccp->in.algorithm >= 0 &&
527 ccp->in.algorithm < (int)NALGORITHMS) {
528 ccp->in.state = (*algorithm[ccp->in.algorithm]->i.Init)
540 if (ccp->out.algorithm > 0)
541 for (f = 0; f < (unsigned)ccp->out.algorithm; f++)
542 if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]))
545 if (ccp->out.state == NULL && ccp->out.algorithm >= 0 &&
546 ccp->out.algorithm < (int)NALGORITHMS) {
547 ccp->out.state = (*algorithm[ccp->out.algorithm]->o.Init)
578 ccp->in.algorithm = -1; /* In case we've received two REQs in a row */
585 if (algorithm[f]->id == opt->hdr.id)
588 disp = f == -1 ? "" : (*algorithm[f]->Disp)(opt);
606 if (IsAccepted(ccp->cfg.neg[algorithm[f]->Neg]) &&
607 (*algorithm[f]->Usable)(fp) &&
608 ccp->in.algorithm == -1) {
610 switch ((*algorithm[f]->i.Set)(fp->bundle, &ccp->in.opt, &ccp->cfg)) {
620 ccp->in.algorithm = (int)f; /* This one'll do :-) */
636 if ((*algorithm[f]->o.Set)(fp->bundle, &o->val, &ccp->cfg) ==
638 ccp->my_proto = algorithm[f]->id;
642 if (algorithm[f]->Required(fp)) {
645 protoname(algorithm[f]->id));
654 if (algorithm[f]->Required(fp)) {
656 fp->link->name, protoname(algorithm[f]->id));
669 ccp->in.algorithm = -1;
716 (*algorithm[ccp->in.algorithm]->i.Reset)(ccp->in.state);
733 bp = (*algorithm[l->ccp.out.algorithm]->o.Write)
765 bp = (*algorithm[l->ccp.in.algorithm]->i.Read)
781 (*algorithm[l->ccp.in.algorithm]->i.DictSetup)