Lines Matching refs:lcp

159   struct lcp *lcp;  in lcp_ReportStatus()  local
162 lcp = &l->lcp; in lcp_ReportStatus()
164 prompt_Printf(arg->prompt, "%s: %s [%s]\n", l->name, lcp->fsm.name, in lcp_ReportStatus()
165 State2Nam(lcp->fsm.state)); in lcp_ReportStatus()
169 lcp->his_mru, (u_long)lcp->his_accmap, in lcp_ReportStatus()
170 lcp->his_protocomp ? "on" : "off", in lcp_ReportStatus()
171 lcp->his_acfcomp ? "on" : "off", in lcp_ReportStatus()
172 (u_long)lcp->his_magic, lcp->his_mrru, in lcp_ReportStatus()
173 lcp->his_shortseq ? "on" : "off", lcp->his_reject); in lcp_ReportStatus()
177 lcp->want_mru, (u_long)lcp->want_accmap, in lcp_ReportStatus()
178 lcp->want_protocomp ? "on" : "off", in lcp_ReportStatus()
179 lcp->want_acfcomp ? "on" : "off", in lcp_ReportStatus()
180 (u_long)lcp->want_magic, lcp->want_mrru, in lcp_ReportStatus()
181 lcp->want_shortseq ? "on" : "off", lcp->my_reject); in lcp_ReportStatus()
183 if (lcp->cfg.mru) in lcp_ReportStatus()
185 lcp->cfg.mru, lcp->cfg.max_mru); in lcp_ReportStatus()
188 lcp->cfg.max_mru); in lcp_ReportStatus()
189 if (lcp->cfg.mtu) in lcp_ReportStatus()
191 lcp->cfg.mtu, lcp->cfg.max_mtu); in lcp_ReportStatus()
193 prompt_Printf(arg->prompt, "MTU = any (max %d), ", lcp->cfg.max_mtu); in lcp_ReportStatus()
194 prompt_Printf(arg->prompt, "ACCMAP = %08lx\n", (u_long)lcp->cfg.accmap); in lcp_ReportStatus()
196 lcp->cfg.lqrperiod); in lcp_ReportStatus()
198 lcp->cfg.openmode == OPEN_PASSIVE ? "passive" : "active"); in lcp_ReportStatus()
199 if (lcp->cfg.openmode > 0) in lcp_ReportStatus()
200 prompt_Printf(arg->prompt, " (delay %ds)", lcp->cfg.openmode); in lcp_ReportStatus()
202 " REQ%s, %u Term REQ%s\n", lcp->cfg.fsm.timeout, in lcp_ReportStatus()
203 lcp->cfg.fsm.maxreq, lcp->cfg.fsm.maxreq == 1 ? "" : "s", in lcp_ReportStatus()
204 lcp->cfg.fsm.maxtrm, lcp->cfg.fsm.maxtrm == 1 ? "" : "s"); in lcp_ReportStatus()
205 prompt_Printf(arg->prompt, " Ident: %s\n", lcp->cfg.ident); in lcp_ReportStatus()
208 command_ShowNegval(lcp->cfg.acfcomp)); in lcp_ReportStatus()
210 command_ShowNegval(lcp->cfg.chap05)); in lcp_ReportStatus()
213 command_ShowNegval(lcp->cfg.chap80nt)); in lcp_ReportStatus()
215 command_ShowNegval(lcp->cfg.chap80lm)); in lcp_ReportStatus()
217 command_ShowNegval(lcp->cfg.chap81)); in lcp_ReportStatus()
220 command_ShowNegval(lcp->cfg.lqr)); in lcp_ReportStatus()
222 lcp->cfg.echo ? "enabled" : "disabled"); in lcp_ReportStatus()
224 command_ShowNegval(lcp->cfg.pap)); in lcp_ReportStatus()
226 command_ShowNegval(lcp->cfg.protocomp)); in lcp_ReportStatus()
240 lcp_SetupCallbacks(struct lcp *lcp) in lcp_SetupCallbacks() argument
242 lcp->fsm.fn = &lcp_Callbacks; in lcp_SetupCallbacks()
243 lcp->fsm.FsmTimer.name = lcp_TimerNames[0]; in lcp_SetupCallbacks()
244 lcp->fsm.OpenTimer.name = lcp_TimerNames[1]; in lcp_SetupCallbacks()
245 lcp->fsm.StoppedTimer.name = lcp_TimerNames[2]; in lcp_SetupCallbacks()
249 lcp_Init(struct lcp *lcp, struct bundle *bundle, struct link *l, in lcp_Init() argument
255 fsm_Init(&lcp->fsm, "LCP", PROTO_LCP, mincode, LCP_MAXCODE, LogLCP, in lcp_Init()
258 lcp->cfg.mru = 0; in lcp_Init()
259 lcp->cfg.max_mru = MAX_MRU; in lcp_Init()
260 lcp->cfg.mtu = 0; in lcp_Init()
261 lcp->cfg.max_mtu = MAX_MTU; in lcp_Init()
262 lcp->cfg.accmap = 0; in lcp_Init()
263 lcp->cfg.openmode = 1; in lcp_Init()
264 lcp->cfg.lqrperiod = DEF_LQRPERIOD; in lcp_Init()
265 lcp->cfg.fsm.timeout = DEF_FSMRETRY; in lcp_Init()
266 lcp->cfg.fsm.maxreq = DEF_FSMTRIES; in lcp_Init()
267 lcp->cfg.fsm.maxtrm = DEF_FSMTRIES; in lcp_Init()
269 lcp->cfg.acfcomp = NEG_ENABLED|NEG_ACCEPTED; in lcp_Init()
270 lcp->cfg.chap05 = NEG_ACCEPTED; in lcp_Init()
272 lcp->cfg.chap80nt = NEG_ACCEPTED; in lcp_Init()
273 lcp->cfg.chap80lm = 0; in lcp_Init()
274 lcp->cfg.chap81 = NEG_ACCEPTED; in lcp_Init()
276 lcp->cfg.lqr = NEG_ACCEPTED; in lcp_Init()
277 lcp->cfg.echo = 0; in lcp_Init()
278 lcp->cfg.pap = NEG_ACCEPTED; in lcp_Init()
279 lcp->cfg.protocomp = NEG_ENABLED|NEG_ACCEPTED; in lcp_Init()
280 *lcp->cfg.ident = '\0'; in lcp_Init()
282 lcp_Setup(lcp, lcp->cfg.openmode); in lcp_Init()
286 lcp_Setup(struct lcp *lcp, int openmode) in lcp_Setup() argument
288 struct physical *p = link2physical(lcp->fsm.link); in lcp_Setup()
290 lcp->fsm.open_mode = openmode; in lcp_Setup()
292 lcp->his_mru = DEF_MRU; in lcp_Setup()
293 lcp->his_mrru = 0; in lcp_Setup()
294 lcp->his_magic = 0; in lcp_Setup()
295 lcp->his_lqrperiod = 0; in lcp_Setup()
296 lcp->his_acfcomp = 0; in lcp_Setup()
297 lcp->his_auth = 0; in lcp_Setup()
298 lcp->his_authtype = 0; in lcp_Setup()
299 lcp->his_callback.opmask = 0; in lcp_Setup()
300 lcp->his_shortseq = 0; in lcp_Setup()
301 lcp->mru_req = 0; in lcp_Setup()
303 if ((lcp->want_mru = lcp->cfg.mru) == 0) in lcp_Setup()
304 lcp->want_mru = DEF_MRU; in lcp_Setup()
305 lcp->want_mrru = lcp->fsm.bundle->ncp.mp.cfg.mrru; in lcp_Setup()
306 lcp->want_shortseq = IsEnabled(lcp->fsm.bundle->ncp.mp.cfg.shortseq) ? 1 : 0; in lcp_Setup()
307 lcp->want_acfcomp = IsEnabled(lcp->cfg.acfcomp) ? 1 : 0; in lcp_Setup()
309 if (lcp->fsm.parent) { in lcp_Setup()
310 lcp->his_accmap = 0xffffffff; in lcp_Setup()
311 lcp->want_accmap = lcp->cfg.accmap; in lcp_Setup()
312 lcp->his_protocomp = 0; in lcp_Setup()
313 lcp->want_protocomp = IsEnabled(lcp->cfg.protocomp) ? 1 : 0; in lcp_Setup()
314 lcp->want_magic = GenerateMagic(); in lcp_Setup()
316 if (IsEnabled(lcp->cfg.chap05)) { in lcp_Setup()
317 lcp->want_auth = PROTO_CHAP; in lcp_Setup()
318 lcp->want_authtype = 0x05; in lcp_Setup()
320 } else if (IsEnabled(lcp->cfg.chap80nt) || in lcp_Setup()
321 IsEnabled(lcp->cfg.chap80lm)) { in lcp_Setup()
322 lcp->want_auth = PROTO_CHAP; in lcp_Setup()
323 lcp->want_authtype = 0x80; in lcp_Setup()
324 } else if (IsEnabled(lcp->cfg.chap81)) { in lcp_Setup()
325 lcp->want_auth = PROTO_CHAP; in lcp_Setup()
326 lcp->want_authtype = 0x81; in lcp_Setup()
328 } else if (IsEnabled(lcp->cfg.pap)) { in lcp_Setup()
329 lcp->want_auth = PROTO_PAP; in lcp_Setup()
330 lcp->want_authtype = 0; in lcp_Setup()
332 lcp->want_auth = 0; in lcp_Setup()
333 lcp->want_authtype = 0; in lcp_Setup()
337 memcpy(&lcp->want_callback, &p->dl->cfg.callback, in lcp_Setup()
340 lcp->want_callback.opmask = 0; in lcp_Setup()
341 lcp->want_lqrperiod = IsEnabled(lcp->cfg.lqr) ? in lcp_Setup()
342 lcp->cfg.lqrperiod * 100 : 0; in lcp_Setup()
344 lcp->his_accmap = lcp->want_accmap = 0; in lcp_Setup()
345 lcp->his_protocomp = lcp->want_protocomp = 1; in lcp_Setup()
346 lcp->want_magic = 0; in lcp_Setup()
347 lcp->want_auth = 0; in lcp_Setup()
348 lcp->want_authtype = 0; in lcp_Setup()
349 lcp->want_callback.opmask = 0; in lcp_Setup()
350 lcp->want_lqrperiod = 0; in lcp_Setup()
353 lcp->his_reject = lcp->my_reject = 0; in lcp_Setup()
354 lcp->auth_iwait = lcp->auth_ineed = 0; in lcp_Setup()
355 lcp->LcpFailedMagic = 0; in lcp_Setup()
362 struct lcp *lcp = fsm2lcp(fp); in LcpInitRestartCounter() local
364 fp->FsmTimer.load = lcp->cfg.fsm.timeout * SECTICKS; in LcpInitRestartCounter()
367 fp->restart = lcp->cfg.fsm.maxreq; in LcpInitRestartCounter()
370 fp->restart = lcp->cfg.fsm.maxtrm; in LcpInitRestartCounter()
383 struct lcp *lcp = fsm2lcp(fp); in LcpSendConfigReq() local
398 if (lcp->want_acfcomp && !REJECTED(lcp, TY_ACFCOMP)) in LcpSendConfigReq()
401 if (lcp->want_protocomp && !REJECTED(lcp, TY_PROTOCOMP)) in LcpSendConfigReq()
404 if (!REJECTED(lcp, TY_ACCMAP)) { in LcpSendConfigReq()
405 ua_htonl(&lcp->want_accmap, o->data); in LcpSendConfigReq()
411 if (lcp->cfg.max_mru && (!maxmru || maxmru > lcp->cfg.max_mru)) in LcpSendConfigReq()
412 maxmru = lcp->cfg.max_mru; in LcpSendConfigReq()
413 if (maxmru && lcp->want_mru > maxmru) { in LcpSendConfigReq()
415 fp->link->name, lcp->want_mru, maxmru); in LcpSendConfigReq()
416 lcp->want_mru = maxmru; in LcpSendConfigReq()
418 if (!REJECTED(lcp, TY_MRU)) { in LcpSendConfigReq()
419 ua_htons(&lcp->want_mru, o->data); in LcpSendConfigReq()
423 if (lcp->want_magic && !REJECTED(lcp, TY_MAGICNUM)) { in LcpSendConfigReq()
424 ua_htonl(&lcp->want_magic, o->data); in LcpSendConfigReq()
428 if (lcp->want_lqrperiod && !REJECTED(lcp, TY_QUALPROTO)) { in LcpSendConfigReq()
431 ua_htonl(&lcp->want_lqrperiod, o->data + 2); in LcpSendConfigReq()
435 switch (lcp->want_auth) { in LcpSendConfigReq()
445 o->data[2] = lcp->want_authtype; in LcpSendConfigReq()
450 if (!REJECTED(lcp, TY_CALLBACK)) { in LcpSendConfigReq()
451 if (lcp->want_callback.opmask & CALLBACK_BIT(CALLBACK_AUTH)) { in LcpSendConfigReq()
454 } else if (lcp->want_callback.opmask & CALLBACK_BIT(CALLBACK_CBCP)) { in LcpSendConfigReq()
457 } else if (lcp->want_callback.opmask & CALLBACK_BIT(CALLBACK_E164)) { in LcpSendConfigReq()
458 size_t sz = strlen(lcp->want_callback.msg); in LcpSendConfigReq()
466 memcpy(o->data + 1, lcp->want_callback.msg, sz); in LcpSendConfigReq()
471 if (lcp->want_mrru && !REJECTED(lcp, TY_MRRU)) { in LcpSendConfigReq()
472 ua_htons(&lcp->want_mrru, o->data); in LcpSendConfigReq()
475 if (lcp->want_shortseq && !REJECTED(lcp, TY_SHORTSEQ)) in LcpSendConfigReq()
479 mp = &lcp->fsm.bundle->ncp.mp; in LcpSendConfigReq()
481 !REJECTED(lcp, TY_ENDDISC)) { in LcpSendConfigReq()
492 lcp_SendProtoRej(struct lcp *lcp, u_char *option, int count) in lcp_SendProtoRej() argument
495 fsm_Output(&lcp->fsm, CODE_PROTOREJ, lcp->fsm.reqid, option, count, in lcp_SendProtoRej()
500 lcp_SendIdentification(struct lcp *lcp) in lcp_SendIdentification() argument
507 if (*lcp->cfg.ident == '\0') in lcp_SendIdentification()
510 argv[0] = lcp->cfg.ident; in lcp_SendIdentification()
513 command_Expand(exp, 1, argv, lcp->fsm.bundle, 1, getpid()); in lcp_SendIdentification()
515 ua_htonl(&lcp->want_magic, msg); in lcp_SendIdentification()
519 fsm_Output(&lcp->fsm, CODE_IDENT, id++, msg, 4 + strlen(msg + 4), MB_LCPOUT); in lcp_SendIdentification()
520 log_Printf(LogLCP, " MAGICNUM %08x\n", lcp->want_magic); in lcp_SendIdentification()
528 lcp_RecvIdentification(struct lcp *lcp, char *data) in lcp_RecvIdentification() argument
530 log_Printf(LogLCP, " MAGICNUM %08x\n", lcp->his_magic); in lcp_RecvIdentification()
556 struct lcp *lcp = fsm2lcp(fp); in LcpLayerStart() local
559 lcp->LcpFailedMagic = 0; in LcpLayerStart()
560 fp->more.reqs = fp->more.naks = fp->more.rejs = lcp->cfg.fsm.maxreq * 3; in LcpLayerStart()
561 lcp->mru_req = 0; in LcpLayerStart()
576 struct lcp *lcp = fsm2lcp(fp); in LcpLayerUp() local
579 physical_SetAsyncParams(p, lcp->want_accmap, lcp->his_accmap); in LcpLayerUp()
580 lqr_Start(lcp); in LcpLayerUp()
582 fp->more.reqs = fp->more.naks = fp->more.rejs = lcp->cfg.fsm.maxreq * 3; in LcpLayerUp()
584 lcp_SendIdentification(lcp); in LcpLayerUp()
621 lcp_auth_nak(struct lcp *lcp, struct fsm_decode *dec) in lcp_auth_nak() argument
627 if (IsAccepted(lcp->cfg.pap)) { in lcp_auth_nak()
639 if (IsAccepted(lcp->cfg.chap05)) { in lcp_auth_nak()
643 } else if (IsAccepted(lcp->cfg.chap80nt) || in lcp_auth_nak()
644 IsAccepted(lcp->cfg.chap80lm)) { in lcp_auth_nak()
647 } else if (IsAccepted(lcp->cfg.chap81)) { in lcp_auth_nak()
663 struct lcp *lcp = fsm2lcp(fp); in LcpDecodeConfig() local
686 mp = &lcp->fsm.bundle->ncp.mp; in LcpDecodeConfig()
693 if (REJECTED(lcp, TY_MRRU)) in LcpDecodeConfig()
695 lcp->his_reject &= ~(1 << opt->hdr.id); in LcpDecodeConfig()
699 lcp->his_mrru = MAX_MRU; in LcpDecodeConfig()
702 ua_htons(&lcp->his_mrru, nak.data); in LcpDecodeConfig()
706 lcp->his_mrru = MIN_MRU; in LcpDecodeConfig()
709 ua_htons(&lcp->his_mrru, nak.data); in LcpDecodeConfig()
712 lcp->his_mrru = mru; in LcpDecodeConfig()
718 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
723 if (REJECTED(lcp, TY_MRRU)) in LcpDecodeConfig()
725 lcp->his_reject &= ~(1 << opt->hdr.id); in LcpDecodeConfig()
728 lcp->want_mrru = MAX_MRU; in LcpDecodeConfig()
730 lcp->want_mrru = MIN_MRU; in LcpDecodeConfig()
732 lcp->want_mrru = mru; in LcpDecodeConfig()
737 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
738 lcp->want_mrru = 0; /* Ah well, no multilink :-( */ in LcpDecodeConfig()
744 lcp->mru_req = 1; in LcpDecodeConfig()
751 if (lcp->cfg.max_mtu && (!maxmtu || maxmtu > lcp->cfg.max_mtu)) in LcpDecodeConfig()
752 maxmtu = lcp->cfg.max_mtu; in LcpDecodeConfig()
753 wantmtu = lcp->cfg.mtu; in LcpDecodeConfig()
761 lcp->his_mru = maxmtu; in LcpDecodeConfig()
764 ua_htons(&lcp->his_mru, nak.data); in LcpDecodeConfig()
768 lcp->his_mru = wantmtu; in LcpDecodeConfig()
771 ua_htons(&lcp->his_mru, nak.data); in LcpDecodeConfig()
774 lcp->his_mru = mru; in LcpDecodeConfig()
780 if (lcp->cfg.max_mru && (!maxmru || maxmru > lcp->cfg.max_mru)) in LcpDecodeConfig()
781 maxmru = lcp->cfg.max_mru; in LcpDecodeConfig()
782 wantmru = lcp->cfg.mru > maxmru ? maxmru : lcp->cfg.mru; in LcpDecodeConfig()
785 lcp->want_mru = wantmru; in LcpDecodeConfig()
787 lcp->want_mru = maxmru; in LcpDecodeConfig()
789 lcp->want_mru = MIN_MRU; in LcpDecodeConfig()
791 lcp->want_mru = mru; in LcpDecodeConfig()
794 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
796 if (lcp->his_mru > lcp->want_mru) in LcpDecodeConfig()
797 lcp->his_mru = lcp->want_mru; in LcpDecodeConfig()
808 lcp->his_accmap = accmap; in LcpDecodeConfig()
812 lcp->want_accmap = accmap; in LcpDecodeConfig()
815 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
831 if (opt->hdr.len == 4 && IsAccepted(lcp->cfg.pap)) { in LcpDecodeConfig()
832 lcp->his_auth = proto; in LcpDecodeConfig()
833 lcp->his_authtype = 0; in LcpDecodeConfig()
835 } else if (!lcp_auth_nak(lcp, dec)) { in LcpDecodeConfig()
836 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
842 if ((chap_type == 0x05 && IsAccepted(lcp->cfg.chap05)) in LcpDecodeConfig()
844 || (chap_type == 0x80 && (IsAccepted(lcp->cfg.chap80nt) || in LcpDecodeConfig()
845 (IsAccepted(lcp->cfg.chap80lm)))) in LcpDecodeConfig()
846 || (chap_type == 0x81 && IsAccepted(lcp->cfg.chap81)) in LcpDecodeConfig()
849 lcp->his_auth = proto; in LcpDecodeConfig()
850 lcp->his_authtype = chap_type; in LcpDecodeConfig()
864 if (!lcp_auth_nak(lcp, dec)) { in LcpDecodeConfig()
865 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
874 if (!lcp_auth_nak(lcp, dec)) { in LcpDecodeConfig()
875 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
885 if (IsEnabled(lcp->cfg.pap)) { in LcpDecodeConfig()
886 lcp->want_auth = PROTO_PAP; in LcpDecodeConfig()
887 lcp->want_authtype = 0; in LcpDecodeConfig()
890 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
894 if (chap_type == 0x05 && IsEnabled(lcp->cfg.chap05)) { in LcpDecodeConfig()
895 lcp->want_auth = PROTO_CHAP; in LcpDecodeConfig()
896 lcp->want_authtype = 0x05; in LcpDecodeConfig()
898 } else if (chap_type == 0x80 && (IsEnabled(lcp->cfg.chap80nt) || in LcpDecodeConfig()
899 IsEnabled(lcp->cfg.chap80lm))) { in LcpDecodeConfig()
900 lcp->want_auth = PROTO_CHAP; in LcpDecodeConfig()
901 lcp->want_authtype = 0x80; in LcpDecodeConfig()
902 } else if (chap_type == 0x81 && IsEnabled(lcp->cfg.chap81)) { in LcpDecodeConfig()
903 lcp->want_auth = PROTO_CHAP; in LcpDecodeConfig()
904 lcp->want_authtype = 0x81; in LcpDecodeConfig()
922 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
927 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
933 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
944 if (ntohs(req.proto) != PROTO_LQR || !IsAccepted(lcp->cfg.lqr)) { in LcpDecodeConfig()
946 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
948 lcp->his_lqrperiod = ntohl(req.period); in LcpDecodeConfig()
949 if (lcp->his_lqrperiod < MIN_LQRPERIOD * 100) in LcpDecodeConfig()
950 lcp->his_lqrperiod = MIN_LQRPERIOD * 100; in LcpDecodeConfig()
951 req.period = htonl(lcp->his_lqrperiod); in LcpDecodeConfig()
956 lcp->want_lqrperiod = ntohl(req.period); in LcpDecodeConfig()
959 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
970 if (lcp->want_magic) { in LcpDecodeConfig()
972 if (magic == lcp->want_magic) { in LcpDecodeConfig()
976 (u_long)magic, ++lcp->LcpFailedMagic); in LcpDecodeConfig()
977 lcp->want_magic = GenerateMagic(); in LcpDecodeConfig()
979 ualarm(TICKUNIT * (4 + 4 * lcp->LcpFailedMagic), 0); in LcpDecodeConfig()
983 lcp->his_magic = magic; in LcpDecodeConfig()
984 lcp->LcpFailedMagic = 0; in LcpDecodeConfig()
988 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
994 lcp->want_magic = GenerateMagic(); in LcpDecodeConfig()
998 lcp->want_magic = 0; in LcpDecodeConfig()
999 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1009 if (IsAccepted(lcp->cfg.protocomp)) { in LcpDecodeConfig()
1010 lcp->his_protocomp = 1; in LcpDecodeConfig()
1018 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1024 lcp->want_protocomp = 0; in LcpDecodeConfig()
1025 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1034 if (IsAccepted(lcp->cfg.acfcomp)) { in LcpDecodeConfig()
1035 lcp->his_acfcomp = 1; in LcpDecodeConfig()
1043 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1049 lcp->want_acfcomp = 0; in LcpDecodeConfig()
1050 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1106 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1111 (op != CALLBACK_AUTH || p->link.lcp.want_auth) && in LcpDecodeConfig()
1114 lcp->his_callback.opmask = CALLBACK_BIT(op); in LcpDecodeConfig()
1115 if (sz > sizeof lcp->his_callback.msg - 1) { in LcpDecodeConfig()
1116 sz = sizeof lcp->his_callback.msg - 1; in LcpDecodeConfig()
1119 memcpy(lcp->his_callback.msg, opt->data + 1, sz); in LcpDecodeConfig()
1120 lcp->his_callback.msg[sz] = '\0'; in LcpDecodeConfig()
1123 p->link.lcp.auth_ineed) { in LcpDecodeConfig()
1138 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1144 if (lcp->want_callback.opmask & CALLBACK_BIT(CALLBACK_AUTH)) in LcpDecodeConfig()
1145 lcp->want_callback.opmask &= ~CALLBACK_BIT(CALLBACK_AUTH); in LcpDecodeConfig()
1146 else if (lcp->want_callback.opmask & CALLBACK_BIT(CALLBACK_CBCP)) in LcpDecodeConfig()
1147 lcp->want_callback.opmask &= ~CALLBACK_BIT(CALLBACK_CBCP); in LcpDecodeConfig()
1148 else if (lcp->want_callback.opmask & CALLBACK_BIT(CALLBACK_E164)) in LcpDecodeConfig()
1149 lcp->want_callback.opmask &= ~CALLBACK_BIT(CALLBACK_E164); in LcpDecodeConfig()
1150 if (lcp->want_callback.opmask == CALLBACK_BIT(CALLBACK_NONE)) { in LcpDecodeConfig()
1152 lcp->want_callback.opmask = 0; in LcpDecodeConfig()
1153 } else if (!lcp->want_callback.opmask) { in LcpDecodeConfig()
1155 fsm_Close(&lcp->fsm); in LcpDecodeConfig()
1159 if (lcp->want_callback.opmask & CALLBACK_BIT(CALLBACK_NONE)) { in LcpDecodeConfig()
1160 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1161 lcp->want_callback.opmask = 0; in LcpDecodeConfig()
1164 fsm_Close(&lcp->fsm); in LcpDecodeConfig()
1171 mp = &lcp->fsm.bundle->ncp.mp; in LcpDecodeConfig()
1176 if (lcp->want_mrru && IsAccepted(mp->cfg.shortseq)) { in LcpDecodeConfig()
1177 lcp->his_shortseq = 1; in LcpDecodeConfig()
1181 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1191 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1192 lcp->want_shortseq = 0; /* For when we hit MP */ in LcpDecodeConfig()
1198 mp = &lcp->fsm.bundle->ncp.mp; in LcpDecodeConfig()
1206 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1208 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1226 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1232 lcp->his_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1250 lcp->my_reject |= (1 << opt->hdr.id); in LcpDecodeConfig()
1264 p->link.lcp.want_auth) in LcpDecodeConfig()
1277 if (mode_type == MODE_REQ && !lcp->mru_req) { in LcpDecodeConfig()
1282 if (mru > lcp->cfg.max_mtu) in LcpDecodeConfig()
1283 mru = lcp->cfg.max_mtu; in LcpDecodeConfig()
1286 lcp->his_mru = lcp->cfg.mtu && lcp->cfg.mtu < mru ? lcp->cfg.mtu : mru; in LcpDecodeConfig()
1289 ua_htons(&lcp->his_mru, nak.data); in LcpDecodeConfig()
1291 lcp->mru_req = 1; /* Don't keep NAK'ing this */ in LcpDecodeConfig()
1303 fsm_Input(&l->lcp.fsm, bp); in lcp_Input()