Lines Matching full:cx
215 const char *cx; in HelpCommand() local
248 cx = showcx(cmd); in HelpCommand()
253 cmd->name, cxlen, cxlen, cx, dmax, dmax, cmd->helpmes); in HelpCommand()
266 Concatinate(arg->cx->physical->link.lcp.cfg.ident, in IdentCommand()
267 sizeof arg->cx->physical->link.lcp.cfg.ident, in IdentCommand()
275 if (arg->cx->state < DATALINK_LCP) { in SendIdentification()
279 return lcp_SendIdentification(&arg->cx->physical->link.lcp) ? 0 : 1; in SendIdentification()
296 bundle_DatalinkClone(arg->bundle, arg->cx, name); in CloneCommand()
308 if (arg->cx->state != DATALINK_CLOSED) { in RemoveCommand()
313 bundle_DatalinkRemove(arg->bundle, arg->cx); in RemoveCommand()
323 if (bundle_RenameDatalink(arg->bundle, arg->cx, arg->argv[arg->argn])) in RenameCommand()
327 arg->cx->name, arg->argv[arg->argn]); in RenameCommand()
348 system_Select(arg->bundle, arg->argv[n], CONFFILE, arg->prompt, arg->cx); in LoadCommand()
356 system_Select(arg->bundle, "default", CONFFILE, arg->prompt, arg->cx); in LoadCommand()
398 if ((arg->cx && !(arg->cx->physical->type & (PHYS_INTERACTIVE|PHYS_AUTO))) in DialCommand()
399 || (!arg->cx && in DialCommand()
409 bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, 1); in DialCommand()
917 if (arg->cx->physical->async.cfg.EscMap[32]) { in ShowEscape()
922 if (arg->cx->physical->async.cfg.EscMap[code]) in ShowEscape()
924 if (arg->cx->physical->async.cfg.EscMap[code] & (1 << bit)) { in ShowEscape()
944 if (!arg->cx->physical->link.lcp.fsm.StoppedTimer.load) in ShowStopped()
948 arg->cx->physical->link.lcp.fsm.StoppedTimer.load / SECTICKS); in ShowStopped()
951 if (!arg->cx->physical->link.ccp.fsm.StoppedTimer.load) in ShowStopped()
955 arg->cx->physical->link.ccp.fsm.StoppedTimer.load / SECTICKS); in ShowStopped()
1088 char const *const *argv, struct prompt *prompt, struct datalink *cx) in FindExec() argument
1101 if ((cmd->lauth & LOCAL_CX) && !cx) in FindExec()
1103 cx = bundle2datalink(bundle, NULL); in FindExec()
1105 if ((cmd->lauth & LOCAL_CX) && !cx) in FindExec()
1109 if (cx && !(cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) { in FindExec()
1111 mkPrefix(argn+1, argv, prefix, sizeof prefix), cx->name); in FindExec()
1112 cx = NULL; in FindExec()
1120 arg.cx = cx; in FindExec()
1188 struct prompt *prompt, const char *label, struct datalink *cx) in command_Run() argument
1218 FindExec(bundle, Commands, argc, 0, argv, prompt, cx); in command_Run()
1243 arg->prompt, arg->cx); in ShowCommand()
1258 if (arg->cx->physical->link.lcp.fsm.state > ST_CLOSED) { in TerminalCommand()
1260 State2Nam(arg->cx->physical->link.lcp.fsm.state)); in TerminalCommand()
1264 datalink_Up(arg->cx, 0, 0); in TerminalCommand()
1265 prompt_TtyTermMode(arg->prompt, arg->cx); in TerminalCommand()
1286 bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, 1); in OpenCommand()
1289 struct datalink *cx = arg->cx ? in OpenCommand() local
1290 arg->cx : bundle2datalink(arg->bundle, NULL); in OpenCommand()
1291 if (cx) { in OpenCommand()
1292 if (cx->physical->link.lcp.fsm.state == ST_OPENED) in OpenCommand()
1293 fsm_Reopen(&cx->physical->link.lcp.fsm); in OpenCommand()
1295 bundle_Open(arg->bundle, cx->name, PHYS_ALL, 1); in OpenCommand()
1317 if (arg->cx) in OpenCommand()
1335 bundle_Close(arg->bundle, arg->cx ? arg->cx->name : NULL, CLOSE_STAYDOWN); in CloseCommand()
1338 bundle_Close(arg->bundle, arg->cx ? arg->cx->name : NULL, CLOSE_LCP); in CloseCommand()
1363 if (arg->cx) in DownCommand()
1364 datalink_Down(arg->cx, CLOSE_STAYDOWN); in DownCommand()
1369 if (arg->cx) in DownCommand()
1370 datalink_Down(arg->cx, CLOSE_LCP); in DownCommand()
1374 struct fsm *fp = arg->cx ? &arg->cx->physical->link.ccp.fsm : in DownCommand()
1397 physical_SetSync(arg->cx->physical); in SetModemSpeed()
1407 if (physical_SetSpeed(arg->cx->physical, speed)) in SetModemSpeed()
1419 struct link *l = &arg->cx->physical->link; in SetStoppedTimeout()
1548 arg->cx->physical->async.cfg.EscMap[code] = 0; in SetEscape()
1553 arg->cx->physical->async.cfg.EscMap[code >> 3] |= (1 << (code & 7)); in SetEscape()
1554 arg->cx->physical->async.cfg.EscMap[32] = 1; in SetEscape()
1654 struct datalink *cx = arg->cx; /* LOCAL_CX uses this */ in SetVariable() local
1666 if ((arg->cmd->lauth & LOCAL_CX) && !cx) { in SetVariable()
1670 } else if (cx && !(arg->cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) { in SetVariable()
1672 arg->cmd->name, cx->name); in SetVariable()
1673 cx = NULL; in SetVariable()
1743 strncpy(cx->cfg.script.dial, argp, sizeof cx->cfg.script.dial - 1); in SetVariable()
1744 cx->cfg.script.dial[sizeof cx->cfg.script.dial - 1] = '\0'; in SetVariable()
1748 strncpy(cx->cfg.script.login, argp, sizeof cx->cfg.script.login - 1); in SetVariable()
1749 cx->cfg.script.login[sizeof cx->cfg.script.login - 1] = '\0'; in SetVariable()
1823 physical_SetDeviceList(cx->physical, arg->argc - arg->argn, in SetVariable()
1831 cx->physical->link.lcp.cfg.accmap = (u_int32_t)ulong_val; in SetVariable()
1845 bundle_SetMode(arg->bundle, cx, mode); in SetVariable()
1995 cx->physical->link.lcp.cfg.openmode = arg->argc > arg->argn+1 ? in SetVariable()
1998 cx->physical->link.lcp.cfg.openmode = OPEN_PASSIVE; in SetVariable()
2006 strncpy(cx->cfg.phone.list, argp, sizeof cx->cfg.phone.list - 1); in SetVariable()
2007 cx->cfg.phone.list[sizeof cx->cfg.phone.list - 1] = '\0'; in SetVariable()
2008 cx->phone.alt = cx->phone.next = NULL; in SetVariable()
2012 strncpy(cx->cfg.script.hangup, argp, sizeof cx->cfg.script.hangup - 1); in SetVariable()
2013 cx->cfg.script.hangup[sizeof cx->cfg.script.hangup - 1] = '\0'; in SetVariable()
2022 strncpy(cx->cfg.script.logout, argp, sizeof cx->cfg.script.logout - 1); in SetVariable()
2023 cx->cfg.script.logout[sizeof cx->cfg.script.logout - 1] = '\0'; in SetVariable()
2079 &cx->physical->link.lcp.cfg.fsm.timeout, in SetVariable()
2080 &cx->physical->link.lcp.cfg.fsm.maxreq, in SetVariable()
2081 &cx->physical->link.lcp.cfg.fsm.maxtrm, DEF_FSMTRIES); in SetVariable()
2086 &cx->chap.auth.cfg.fsm.timeout, in SetVariable()
2087 &cx->chap.auth.cfg.fsm.maxreq, NULL, DEF_FSMAUTHTRIES); in SetVariable()
2092 &cx->pap.cfg.fsm.timeout, &cx->pap.cfg.fsm.maxreq, in SetVariable()
2150 cx->cfg.callback.opmask = 0; in SetVariable()
2153 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_AUTH); in SetVariable()
2155 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_CBCP); in SetVariable()
2160 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_E164); in SetVariable()
2161 strncpy(cx->cfg.callback.msg, arg->argv[++dummyint], in SetVariable()
2162 sizeof cx->cfg.callback.msg - 1); in SetVariable()
2163 cx->cfg.callback.msg[sizeof cx->cfg.callback.msg - 1] = '\0'; in SetVariable()
2166 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_NONE); in SetVariable()
2172 if (cx->cfg.callback.opmask == CALLBACK_BIT(CALLBACK_NONE)) in SetVariable()
2173 cx->cfg.callback.opmask = 0; in SetVariable()
2177 cx->cfg.cbcp.delay = 0; in SetVariable()
2178 *cx->cfg.cbcp.phone = '\0'; in SetVariable()
2179 cx->cfg.cbcp.fsmretry = DEF_FSMRETRY; in SetVariable()
2181 strncpy(cx->cfg.cbcp.phone, arg->argv[arg->argn], in SetVariable()
2182 sizeof cx->cfg.cbcp.phone - 1); in SetVariable()
2183 cx->cfg.cbcp.phone[sizeof cx->cfg.cbcp.phone - 1] = '\0'; in SetVariable()
2185 cx->cfg.cbcp.delay = atoi(arg->argv[arg->argn + 1]); in SetVariable()
2192 cx->cfg.cbcp.fsmretry = long_val; in SetVariable()
2237 cx->physical->cfg.cd.delay = long_val; in SetVariable()
2238 cx->physical->cfg.cd.necessity = argp[strlen(argp)-1] == '!' ? in SetVariable()
2241 cx->physical->cfg.cd.necessity = CD_NOTREQUIRED; in SetVariable()
2243 cx->physical->cfg.cd.delay = 0; in SetVariable()
2244 cx->physical->cfg.cd.necessity = CD_DEFAULT; in SetVariable()
2250 res = physical_SetParity(arg->cx->physical, argp); in SetVariable()
2259 physical_SetRtsCts(arg->cx->physical, 1); in SetVariable()
2261 physical_SetRtsCts(arg->cx->physical, 0); in SetVariable()
2318 physical_SetPPPoEnonstandard(arg->cx->physical, 1); in SetVariable()
2320 physical_SetPPPoEnonstandard(arg->cx->physical, 0); in SetVariable()
2492 arg->prompt, arg->cx); in SetCommand()
2692 struct datalink *cx; in LinkCommand() local
2699 cx = arg->bundle->links; in LinkCommand()
2700 while (cx) { in LinkCommand()
2702 dl = cx->next; in LinkCommand()
2704 arg->prompt, cx); in LinkCommand()
2705 for (cx = arg->bundle->links; cx; cx = cx->next) in LinkCommand()
2706 if (cx == dl) in LinkCommand()
2721 cx = bundle2datalink(arg->bundle, name); in LinkCommand()
2722 if (cx) in LinkCommand()
2724 arg->prompt, cx); in LinkCommand()
2741 if (arg->cx) in command_ChooseLink()
2742 return &arg->cx->physical->link; in command_ChooseLink()
2849 struct datalink *cx = arg->cx; /* LOCAL_CX uses this */ in NegotiateSet() local
2857 if ((arg->cmd->lauth & LOCAL_CX) && !cx) { in NegotiateSet()
2861 } else if (cx && !(arg->cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) { in NegotiateSet()
2863 cmd, arg->cmd->name, cx->name); in NegotiateSet()
2864 cx = NULL; in NegotiateSet()
2869 cx->physical->link.lcp.cfg.acfcomp &= keep; in NegotiateSet()
2870 cx->physical->link.lcp.cfg.acfcomp |= add; in NegotiateSet()
2873 cx->physical->link.lcp.cfg.chap05 &= keep; in NegotiateSet()
2874 cx->physical->link.lcp.cfg.chap05 |= add; in NegotiateSet()
2878 cx->physical->link.lcp.cfg.chap80nt &= keep; in NegotiateSet()
2879 cx->physical->link.lcp.cfg.chap80nt |= add; in NegotiateSet()
2882 cx->physical->link.lcp.cfg.chap80lm &= keep; in NegotiateSet()
2883 cx->physical->link.lcp.cfg.chap80lm |= add; in NegotiateSet()
2886 cx->physical->link.lcp.cfg.chap81 &= keep; in NegotiateSet()
2887 cx->physical->link.lcp.cfg.chap81 |= add; in NegotiateSet()
2903 if (cx->physical->link.lcp.cfg.echo && !add) { in NegotiateSet()
2904 cx->physical->link.lcp.cfg.echo = 0; in NegotiateSet()
2905 cx->physical->hdlc.lqm.method &= ~LQM_ECHO; in NegotiateSet()
2906 if (cx->physical->hdlc.lqm.method & LQM_ECHO && in NegotiateSet()
2907 !cx->physical->link.lcp.want_lqrperiod && in NegotiateSet()
2908 cx->physical->hdlc.lqm.timer.load) { in NegotiateSet()
2909 cx->physical->hdlc.lqm.timer.load = 0; in NegotiateSet()
2910 lqr_StopTimer(cx->physical); in NegotiateSet()
2912 } else if (!cx->physical->link.lcp.cfg.echo && add) { in NegotiateSet()
2913 cx->physical->link.lcp.cfg.echo = 1; in NegotiateSet()
2914 cx->physical->hdlc.lqm.method |= LQM_ECHO; in NegotiateSet()
2915 cx->physical->hdlc.lqm.timer.load = in NegotiateSet()
2916 cx->physical->link.lcp.cfg.lqrperiod * SECTICKS; in NegotiateSet()
2917 if (cx->physical->link.lcp.fsm.state == ST_OPENED) in NegotiateSet()
2918 (*cx->physical->hdlc.lqm.timer.func)(&cx->physical->link.lcp); in NegotiateSet()
2926 cx->physical->link.lcp.cfg.lqr &= keep; in NegotiateSet()
2927 cx->physical->link.lcp.cfg.lqr |= add; in NegotiateSet()
2930 cx->physical->link.lcp.cfg.pap &= keep; in NegotiateSet()
2931 cx->physical->link.lcp.cfg.pap |= add; in NegotiateSet()
2942 cx->physical->link.lcp.cfg.protocomp &= keep; in NegotiateSet()
2943 cx->physical->link.lcp.cfg.protocomp |= add; in NegotiateSet()
3092 0 : NEG_OPT_MAX), 2, 1, argv, arg->prompt, arg->cx); in NegotiateCommand()
3119 struct datalink *cx; in ClearCommand() local
3126 cx = arg->cx; in ClearCommand()
3127 if (!cx) in ClearCommand()
3128 cx = bundle2datalink(arg->bundle, NULL); in ClearCommand()
3129 if (!cx) { in ClearCommand()
3133 t = &cx->physical->link.stats.total; in ClearCommand()
3178 arg->prompt, arg->cx); in RunListCommand()