Lines Matching refs:cx

212   const char *cx;
245 cx = showcx(cmd);
250 cmd->name, cxlen, cxlen, cx, dmax, dmax, cmd->helpmes);
263 Concatinate(arg->cx->physical->link.lcp.cfg.ident,
264 sizeof arg->cx->physical->link.lcp.cfg.ident,
272 if (arg->cx->state < DATALINK_LCP) {
276 return lcp_SendIdentification(&arg->cx->physical->link.lcp) ? 0 : 1;
293 bundle_DatalinkClone(arg->bundle, arg->cx, name);
305 if (arg->cx->state != DATALINK_CLOSED) {
310 bundle_DatalinkRemove(arg->bundle, arg->cx);
320 if (bundle_RenameDatalink(arg->bundle, arg->cx, arg->argv[arg->argn]))
324 arg->cx->name, arg->argv[arg->argn]);
345 system_Select(arg->bundle, arg->argv[n], CONFFILE, arg->prompt, arg->cx);
353 system_Select(arg->bundle, "default", CONFFILE, arg->prompt, arg->cx);
395 if ((arg->cx && !(arg->cx->physical->type & (PHYS_INTERACTIVE|PHYS_AUTO)))
396 || (!arg->cx &&
406 bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, 1);
910 if (arg->cx->physical->async.cfg.EscMap[32]) {
915 if (arg->cx->physical->async.cfg.EscMap[code])
917 if (arg->cx->physical->async.cfg.EscMap[code] & (1 << bit)) {
937 if (!arg->cx->physical->link.lcp.fsm.StoppedTimer.load)
941 arg->cx->physical->link.lcp.fsm.StoppedTimer.load / SECTICKS);
944 if (!arg->cx->physical->link.ccp.fsm.StoppedTimer.load)
948 arg->cx->physical->link.ccp.fsm.StoppedTimer.load / SECTICKS);
1081 char const *const *argv, struct prompt *prompt, struct datalink *cx)
1094 if ((cmd->lauth & LOCAL_CX) && !cx)
1096 cx = bundle2datalink(bundle, NULL);
1098 if ((cmd->lauth & LOCAL_CX) && !cx)
1102 if (cx && !(cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) {
1104 mkPrefix(argn+1, argv, prefix, sizeof prefix), cx->name);
1105 cx = NULL;
1113 arg.cx = cx;
1181 struct prompt *prompt, const char *label, struct datalink *cx)
1211 FindExec(bundle, Commands, argc, 0, argv, prompt, cx);
1236 arg->prompt, arg->cx);
1251 if (arg->cx->physical->link.lcp.fsm.state > ST_CLOSED) {
1253 State2Nam(arg->cx->physical->link.lcp.fsm.state));
1257 datalink_Up(arg->cx, 0, 0);
1258 prompt_TtyTermMode(arg->prompt, arg->cx);
1279 bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, 1);
1282 struct datalink *cx = arg->cx ?
1283 arg->cx : bundle2datalink(arg->bundle, NULL);
1284 if (cx) {
1285 if (cx->physical->link.lcp.fsm.state == ST_OPENED)
1286 fsm_Reopen(&cx->physical->link.lcp.fsm);
1288 bundle_Open(arg->bundle, cx->name, PHYS_ALL, 1);
1310 if (arg->cx)
1328 bundle_Close(arg->bundle, arg->cx ? arg->cx->name : NULL, CLOSE_STAYDOWN);
1331 bundle_Close(arg->bundle, arg->cx ? arg->cx->name : NULL, CLOSE_LCP);
1356 if (arg->cx)
1357 datalink_Down(arg->cx, CLOSE_STAYDOWN);
1362 if (arg->cx)
1363 datalink_Down(arg->cx, CLOSE_LCP);
1367 struct fsm *fp = arg->cx ? &arg->cx->physical->link.ccp.fsm :
1390 physical_SetSync(arg->cx->physical);
1400 if (physical_SetSpeed(arg->cx->physical, speed))
1412 struct link *l = &arg->cx->physical->link;
1541 arg->cx->physical->async.cfg.EscMap[code] = 0;
1546 arg->cx->physical->async.cfg.EscMap[code >> 3] |= (1 << (code & 7));
1547 arg->cx->physical->async.cfg.EscMap[32] = 1;
1647 struct datalink *cx = arg->cx; /* LOCAL_CX uses this */
1659 if ((arg->cmd->lauth & LOCAL_CX) && !cx) {
1663 } else if (cx && !(arg->cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) {
1665 arg->cmd->name, cx->name);
1666 cx = NULL;
1736 strncpy(cx->cfg.script.dial, argp, sizeof cx->cfg.script.dial - 1);
1737 cx->cfg.script.dial[sizeof cx->cfg.script.dial - 1] = '\0';
1741 strncpy(cx->cfg.script.login, argp, sizeof cx->cfg.script.login - 1);
1742 cx->cfg.script.login[sizeof cx->cfg.script.login - 1] = '\0';
1816 physical_SetDeviceList(cx->physical, arg->argc - arg->argn,
1824 cx->physical->link.lcp.cfg.accmap = (u_int32_t)ulong_val;
1838 bundle_SetMode(arg->bundle, cx, mode);
1988 cx->physical->link.lcp.cfg.openmode = arg->argc > arg->argn+1 ?
1991 cx->physical->link.lcp.cfg.openmode = OPEN_PASSIVE;
1999 strncpy(cx->cfg.phone.list, argp, sizeof cx->cfg.phone.list - 1);
2000 cx->cfg.phone.list[sizeof cx->cfg.phone.list - 1] = '\0';
2001 cx->phone.alt = cx->phone.next = NULL;
2005 strncpy(cx->cfg.script.hangup, argp, sizeof cx->cfg.script.hangup - 1);
2006 cx->cfg.script.hangup[sizeof cx->cfg.script.hangup - 1] = '\0';
2015 strncpy(cx->cfg.script.logout, argp, sizeof cx->cfg.script.logout - 1);
2016 cx->cfg.script.logout[sizeof cx->cfg.script.logout - 1] = '\0';
2072 &cx->physical->link.lcp.cfg.fsm.timeout,
2073 &cx->physical->link.lcp.cfg.fsm.maxreq,
2074 &cx->physical->link.lcp.cfg.fsm.maxtrm, DEF_FSMTRIES);
2079 &cx->chap.auth.cfg.fsm.timeout,
2080 &cx->chap.auth.cfg.fsm.maxreq, NULL, DEF_FSMAUTHTRIES);
2085 &cx->pap.cfg.fsm.timeout, &cx->pap.cfg.fsm.maxreq,
2143 cx->cfg.callback.opmask = 0;
2146 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_AUTH);
2148 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_CBCP);
2153 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_E164);
2154 strncpy(cx->cfg.callback.msg, arg->argv[++dummyint],
2155 sizeof cx->cfg.callback.msg - 1);
2156 cx->cfg.callback.msg[sizeof cx->cfg.callback.msg - 1] = '\0';
2159 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_NONE);
2165 if (cx->cfg.callback.opmask == CALLBACK_BIT(CALLBACK_NONE))
2166 cx->cfg.callback.opmask = 0;
2170 cx->cfg.cbcp.delay = 0;
2171 *cx->cfg.cbcp.phone = '\0';
2172 cx->cfg.cbcp.fsmretry = DEF_FSMRETRY;
2174 strncpy(cx->cfg.cbcp.phone, arg->argv[arg->argn],
2175 sizeof cx->cfg.cbcp.phone - 1);
2176 cx->cfg.cbcp.phone[sizeof cx->cfg.cbcp.phone - 1] = '\0';
2178 cx->cfg.cbcp.delay = atoi(arg->argv[arg->argn + 1]);
2185 cx->cfg.cbcp.fsmretry = long_val;
2230 cx->physical->cfg.cd.delay = long_val;
2231 cx->physical->cfg.cd.necessity = argp[strlen(argp)-1] == '!' ?
2234 cx->physical->cfg.cd.necessity = CD_NOTREQUIRED;
2236 cx->physical->cfg.cd.delay = 0;
2237 cx->physical->cfg.cd.necessity = CD_DEFAULT;
2243 res = physical_SetParity(arg->cx->physical, argp);
2252 physical_SetRtsCts(arg->cx->physical, 1);
2254 physical_SetRtsCts(arg->cx->physical, 0);
2306 physical_SetPPPoEnonstandard(arg->cx->physical, 1);
2308 physical_SetPPPoEnonstandard(arg->cx->physical, 0);
2480 arg->prompt, arg->cx);
2680 struct datalink *cx;
2687 cx = arg->bundle->links;
2688 while (cx) {
2690 dl = cx->next;
2692 arg->prompt, cx);
2693 for (cx = arg->bundle->links; cx; cx = cx->next)
2694 if (cx == dl)
2709 cx = bundle2datalink(arg->bundle, name);
2710 if (cx)
2712 arg->prompt, cx);
2729 if (arg->cx)
2730 return &arg->cx->physical->link;
2837 struct datalink *cx = arg->cx; /* LOCAL_CX uses this */
2845 if ((arg->cmd->lauth & LOCAL_CX) && !cx) {
2849 } else if (cx && !(arg->cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) {
2851 cmd, arg->cmd->name, cx->name);
2852 cx = NULL;
2857 cx->physical->link.lcp.cfg.acfcomp &= keep;
2858 cx->physical->link.lcp.cfg.acfcomp |= add;
2861 cx->physical->link.lcp.cfg.chap05 &= keep;
2862 cx->physical->link.lcp.cfg.chap05 |= add;
2866 cx->physical->link.lcp.cfg.chap80nt &= keep;
2867 cx->physical->link.lcp.cfg.chap80nt |= add;
2870 cx->physical->link.lcp.cfg.chap80lm &= keep;
2871 cx->physical->link.lcp.cfg.chap80lm |= add;
2874 cx->physical->link.lcp.cfg.chap81 &= keep;
2875 cx->physical->link.lcp.cfg.chap81 |= add;
2891 if (cx->physical->link.lcp.cfg.echo && !add) {
2892 cx->physical->link.lcp.cfg.echo = 0;
2893 cx->physical->hdlc.lqm.method &= ~LQM_ECHO;
2894 if (cx->physical->hdlc.lqm.method & LQM_ECHO &&
2895 !cx->physical->link.lcp.want_lqrperiod &&
2896 cx->physical->hdlc.lqm.timer.load) {
2897 cx->physical->hdlc.lqm.timer.load = 0;
2898 lqr_StopTimer(cx->physical);
2900 } else if (!cx->physical->link.lcp.cfg.echo && add) {
2901 cx->physical->link.lcp.cfg.echo = 1;
2902 cx->physical->hdlc.lqm.method |= LQM_ECHO;
2903 cx->physical->hdlc.lqm.timer.load =
2904 cx->physical->link.lcp.cfg.lqrperiod * SECTICKS;
2905 if (cx->physical->link.lcp.fsm.state == ST_OPENED)
2906 (*cx->physical->hdlc.lqm.timer.func)(&cx->physical->link.lcp);
2914 cx->physical->link.lcp.cfg.lqr &= keep;
2915 cx->physical->link.lcp.cfg.lqr |= add;
2918 cx->physical->link.lcp.cfg.pap &= keep;
2919 cx->physical->link.lcp.cfg.pap |= add;
2930 cx->physical->link.lcp.cfg.protocomp &= keep;
2931 cx->physical->link.lcp.cfg.protocomp |= add;
3080 0 : NEG_OPT_MAX), 2, 1, argv, arg->prompt, arg->cx);
3107 struct datalink *cx;
3114 cx = arg->cx;
3115 if (!cx)
3116 cx = bundle2datalink(arg->bundle, NULL);
3117 if (!cx) {
3121 t = &cx->physical->link.stats.total;
3166 arg->prompt, arg->cx);