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()
921 if (arg->cx->physical->async.cfg.EscMap[32]) { in ShowEscape()
926 if (arg->cx->physical->async.cfg.EscMap[code]) in ShowEscape()
928 if (arg->cx->physical->async.cfg.EscMap[code] & (1 << bit)) { in ShowEscape()
948 if (!arg->cx->physical->link.lcp.fsm.StoppedTimer.load) in ShowStopped()
952 arg->cx->physical->link.lcp.fsm.StoppedTimer.load / SECTICKS); in ShowStopped()
955 if (!arg->cx->physical->link.ccp.fsm.StoppedTimer.load) in ShowStopped()
959 arg->cx->physical->link.ccp.fsm.StoppedTimer.load / SECTICKS); in ShowStopped()
1092 char const *const *argv, struct prompt *prompt, struct datalink *cx) in FindExec() argument
1105 if ((cmd->lauth & LOCAL_CX) && !cx) in FindExec()
1107 cx = bundle2datalink(bundle, NULL); in FindExec()
1109 if ((cmd->lauth & LOCAL_CX) && !cx) in FindExec()
1113 if (cx && !(cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) { in FindExec()
1115 mkPrefix(argn+1, argv, prefix, sizeof prefix), cx->name); in FindExec()
1116 cx = NULL; in FindExec()
1124 arg.cx = cx; in FindExec()
1192 struct prompt *prompt, const char *label, struct datalink *cx) in command_Run() argument
1222 FindExec(bundle, Commands, argc, 0, argv, prompt, cx); in command_Run()
1247 arg->prompt, arg->cx); in ShowCommand()
1262 if (arg->cx->physical->link.lcp.fsm.state > ST_CLOSED) { in TerminalCommand()
1264 State2Nam(arg->cx->physical->link.lcp.fsm.state)); in TerminalCommand()
1268 datalink_Up(arg->cx, 0, 0); in TerminalCommand()
1269 prompt_TtyTermMode(arg->prompt, arg->cx); in TerminalCommand()
1290 bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, 1); in OpenCommand()
1293 struct datalink *cx = arg->cx ? in OpenCommand() local
1294 arg->cx : bundle2datalink(arg->bundle, NULL); in OpenCommand()
1295 if (cx) { in OpenCommand()
1296 if (cx->physical->link.lcp.fsm.state == ST_OPENED) in OpenCommand()
1297 fsm_Reopen(&cx->physical->link.lcp.fsm); in OpenCommand()
1299 bundle_Open(arg->bundle, cx->name, PHYS_ALL, 1); in OpenCommand()
1321 if (arg->cx) in OpenCommand()
1339 bundle_Close(arg->bundle, arg->cx ? arg->cx->name : NULL, CLOSE_STAYDOWN); in CloseCommand()
1342 bundle_Close(arg->bundle, arg->cx ? arg->cx->name : NULL, CLOSE_LCP); in CloseCommand()
1367 if (arg->cx) in DownCommand()
1368 datalink_Down(arg->cx, CLOSE_STAYDOWN); in DownCommand()
1373 if (arg->cx) in DownCommand()
1374 datalink_Down(arg->cx, CLOSE_LCP); in DownCommand()
1378 struct fsm *fp = arg->cx ? &arg->cx->physical->link.ccp.fsm : in DownCommand()
1401 physical_SetSync(arg->cx->physical); in SetModemSpeed()
1411 if (physical_SetSpeed(arg->cx->physical, speed)) in SetModemSpeed()
1423 struct link *l = &arg->cx->physical->link; in SetStoppedTimeout()
1552 arg->cx->physical->async.cfg.EscMap[code] = 0; in SetEscape()
1557 arg->cx->physical->async.cfg.EscMap[code >> 3] |= (1 << (code & 7)); in SetEscape()
1558 arg->cx->physical->async.cfg.EscMap[32] = 1; in SetEscape()
1658 struct datalink *cx = arg->cx; /* LOCAL_CX uses this */ in SetVariable() local
1670 if ((arg->cmd->lauth & LOCAL_CX) && !cx) { in SetVariable()
1674 } else if (cx && !(arg->cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) { in SetVariable()
1676 arg->cmd->name, cx->name); in SetVariable()
1677 cx = NULL; in SetVariable()
1747 strncpy(cx->cfg.script.dial, argp, sizeof cx->cfg.script.dial - 1); in SetVariable()
1748 cx->cfg.script.dial[sizeof cx->cfg.script.dial - 1] = '\0'; in SetVariable()
1752 strncpy(cx->cfg.script.login, argp, sizeof cx->cfg.script.login - 1); in SetVariable()
1753 cx->cfg.script.login[sizeof cx->cfg.script.login - 1] = '\0'; in SetVariable()
1827 physical_SetDeviceList(cx->physical, arg->argc - arg->argn, in SetVariable()
1835 cx->physical->link.lcp.cfg.accmap = (u_int32_t)ulong_val; in SetVariable()
1849 bundle_SetMode(arg->bundle, cx, mode); in SetVariable()
1999 cx->physical->link.lcp.cfg.openmode = arg->argc > arg->argn+1 ? in SetVariable()
2002 cx->physical->link.lcp.cfg.openmode = OPEN_PASSIVE; in SetVariable()
2010 strncpy(cx->cfg.phone.list, argp, sizeof cx->cfg.phone.list - 1); in SetVariable()
2011 cx->cfg.phone.list[sizeof cx->cfg.phone.list - 1] = '\0'; in SetVariable()
2012 cx->phone.alt = cx->phone.next = NULL; in SetVariable()
2016 strncpy(cx->cfg.script.hangup, argp, sizeof cx->cfg.script.hangup - 1); in SetVariable()
2017 cx->cfg.script.hangup[sizeof cx->cfg.script.hangup - 1] = '\0'; in SetVariable()
2026 strncpy(cx->cfg.script.logout, argp, sizeof cx->cfg.script.logout - 1); in SetVariable()
2027 cx->cfg.script.logout[sizeof cx->cfg.script.logout - 1] = '\0'; in SetVariable()
2083 &cx->physical->link.lcp.cfg.fsm.timeout, in SetVariable()
2084 &cx->physical->link.lcp.cfg.fsm.maxreq, in SetVariable()
2085 &cx->physical->link.lcp.cfg.fsm.maxtrm, DEF_FSMTRIES); in SetVariable()
2090 &cx->chap.auth.cfg.fsm.timeout, in SetVariable()
2091 &cx->chap.auth.cfg.fsm.maxreq, NULL, DEF_FSMAUTHTRIES); in SetVariable()
2096 &cx->pap.cfg.fsm.timeout, &cx->pap.cfg.fsm.maxreq, in SetVariable()
2154 cx->cfg.callback.opmask = 0; in SetVariable()
2157 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_AUTH); in SetVariable()
2159 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_CBCP); in SetVariable()
2164 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_E164); in SetVariable()
2165 strncpy(cx->cfg.callback.msg, arg->argv[++dummyint], in SetVariable()
2166 sizeof cx->cfg.callback.msg - 1); in SetVariable()
2167 cx->cfg.callback.msg[sizeof cx->cfg.callback.msg - 1] = '\0'; in SetVariable()
2170 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_NONE); in SetVariable()
2176 if (cx->cfg.callback.opmask == CALLBACK_BIT(CALLBACK_NONE)) in SetVariable()
2177 cx->cfg.callback.opmask = 0; in SetVariable()
2181 cx->cfg.cbcp.delay = 0; in SetVariable()
2182 *cx->cfg.cbcp.phone = '\0'; in SetVariable()
2183 cx->cfg.cbcp.fsmretry = DEF_FSMRETRY; in SetVariable()
2185 strncpy(cx->cfg.cbcp.phone, arg->argv[arg->argn], in SetVariable()
2186 sizeof cx->cfg.cbcp.phone - 1); in SetVariable()
2187 cx->cfg.cbcp.phone[sizeof cx->cfg.cbcp.phone - 1] = '\0'; in SetVariable()
2189 cx->cfg.cbcp.delay = atoi(arg->argv[arg->argn + 1]); in SetVariable()
2196 cx->cfg.cbcp.fsmretry = long_val; in SetVariable()
2241 cx->physical->cfg.cd.delay = long_val; in SetVariable()
2242 cx->physical->cfg.cd.necessity = argp[strlen(argp)-1] == '!' ? in SetVariable()
2245 cx->physical->cfg.cd.necessity = CD_NOTREQUIRED; in SetVariable()
2247 cx->physical->cfg.cd.delay = 0; in SetVariable()
2248 cx->physical->cfg.cd.necessity = CD_DEFAULT; in SetVariable()
2254 res = physical_SetParity(arg->cx->physical, argp); in SetVariable()
2263 physical_SetRtsCts(arg->cx->physical, 1); in SetVariable()
2265 physical_SetRtsCts(arg->cx->physical, 0); in SetVariable()
2322 physical_SetPPPoEnonstandard(arg->cx->physical, 1); in SetVariable()
2324 physical_SetPPPoEnonstandard(arg->cx->physical, 0); in SetVariable()
2496 arg->prompt, arg->cx); in SetCommand()
2696 struct datalink *cx; in LinkCommand() local
2703 cx = arg->bundle->links; in LinkCommand()
2704 while (cx) { in LinkCommand()
2706 dl = cx->next; in LinkCommand()
2708 arg->prompt, cx); in LinkCommand()
2709 for (cx = arg->bundle->links; cx; cx = cx->next) in LinkCommand()
2710 if (cx == dl) in LinkCommand()
2725 cx = bundle2datalink(arg->bundle, name); in LinkCommand()
2726 if (cx) in LinkCommand()
2728 arg->prompt, cx); in LinkCommand()
2745 if (arg->cx) in command_ChooseLink()
2746 return &arg->cx->physical->link; in command_ChooseLink()
2853 struct datalink *cx = arg->cx; /* LOCAL_CX uses this */ in NegotiateSet() local
2861 if ((arg->cmd->lauth & LOCAL_CX) && !cx) { in NegotiateSet()
2865 } else if (cx && !(arg->cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) { in NegotiateSet()
2867 cmd, arg->cmd->name, cx->name); in NegotiateSet()
2868 cx = NULL; in NegotiateSet()
2873 cx->physical->link.lcp.cfg.acfcomp &= keep; in NegotiateSet()
2874 cx->physical->link.lcp.cfg.acfcomp |= add; in NegotiateSet()
2877 cx->physical->link.lcp.cfg.chap05 &= keep; in NegotiateSet()
2878 cx->physical->link.lcp.cfg.chap05 |= add; in NegotiateSet()
2882 cx->physical->link.lcp.cfg.chap80nt &= keep; in NegotiateSet()
2883 cx->physical->link.lcp.cfg.chap80nt |= add; in NegotiateSet()
2886 cx->physical->link.lcp.cfg.chap80lm &= keep; in NegotiateSet()
2887 cx->physical->link.lcp.cfg.chap80lm |= add; in NegotiateSet()
2890 cx->physical->link.lcp.cfg.chap81 &= keep; in NegotiateSet()
2891 cx->physical->link.lcp.cfg.chap81 |= add; in NegotiateSet()
2907 if (cx->physical->link.lcp.cfg.echo && !add) { in NegotiateSet()
2908 cx->physical->link.lcp.cfg.echo = 0; in NegotiateSet()
2909 cx->physical->hdlc.lqm.method &= ~LQM_ECHO; in NegotiateSet()
2910 if (cx->physical->hdlc.lqm.method & LQM_ECHO && in NegotiateSet()
2911 !cx->physical->link.lcp.want_lqrperiod && in NegotiateSet()
2912 cx->physical->hdlc.lqm.timer.load) { in NegotiateSet()
2913 cx->physical->hdlc.lqm.timer.load = 0; in NegotiateSet()
2914 lqr_StopTimer(cx->physical); in NegotiateSet()
2916 } else if (!cx->physical->link.lcp.cfg.echo && add) { in NegotiateSet()
2917 cx->physical->link.lcp.cfg.echo = 1; in NegotiateSet()
2918 cx->physical->hdlc.lqm.method |= LQM_ECHO; in NegotiateSet()
2919 cx->physical->hdlc.lqm.timer.load = in NegotiateSet()
2920 cx->physical->link.lcp.cfg.lqrperiod * SECTICKS; in NegotiateSet()
2921 if (cx->physical->link.lcp.fsm.state == ST_OPENED) in NegotiateSet()
2922 (*cx->physical->hdlc.lqm.timer.func)(&cx->physical->link.lcp); in NegotiateSet()
2930 cx->physical->link.lcp.cfg.lqr &= keep; in NegotiateSet()
2931 cx->physical->link.lcp.cfg.lqr |= add; in NegotiateSet()
2934 cx->physical->link.lcp.cfg.pap &= keep; in NegotiateSet()
2935 cx->physical->link.lcp.cfg.pap |= add; in NegotiateSet()
2946 cx->physical->link.lcp.cfg.protocomp &= keep; in NegotiateSet()
2947 cx->physical->link.lcp.cfg.protocomp |= add; in NegotiateSet()
3096 0 : NEG_OPT_MAX), 2, 1, argv, arg->prompt, arg->cx); in NegotiateCommand()
3123 struct datalink *cx; in ClearCommand() local
3130 cx = arg->cx; in ClearCommand()
3131 if (!cx) in ClearCommand()
3132 cx = bundle2datalink(arg->bundle, NULL); in ClearCommand()
3133 if (!cx) { in ClearCommand()
3137 t = &cx->physical->link.stats.total; in ClearCommand()
3182 arg->prompt, arg->cx); in RunListCommand()