Lines Matching refs:cx

217   const char *cx;
250 cx = showcx(cmd);
255 cmd->name, cxlen, cxlen, cx, dmax, dmax, cmd->helpmes);
268 Concatinate(arg->cx->physical->link.lcp.cfg.ident,
269 sizeof arg->cx->physical->link.lcp.cfg.ident,
277 if (arg->cx->state < DATALINK_LCP) {
281 return lcp_SendIdentification(&arg->cx->physical->link.lcp) ? 0 : 1;
298 bundle_DatalinkClone(arg->bundle, arg->cx, name);
310 if (arg->cx->state != DATALINK_CLOSED) {
315 bundle_DatalinkRemove(arg->bundle, arg->cx);
325 if (bundle_RenameDatalink(arg->bundle, arg->cx, arg->argv[arg->argn]))
329 arg->cx->name, arg->argv[arg->argn]);
350 system_Select(arg->bundle, arg->argv[n], CONFFILE, arg->prompt, arg->cx);
358 system_Select(arg->bundle, "default", CONFFILE, arg->prompt, arg->cx);
400 if ((arg->cx && !(arg->cx->physical->type & (PHYS_INTERACTIVE|PHYS_AUTO)))
401 || (!arg->cx &&
411 bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, 1);
919 if (arg->cx->physical->async.cfg.EscMap[32]) {
924 if (arg->cx->physical->async.cfg.EscMap[code])
926 if (arg->cx->physical->async.cfg.EscMap[code] & (1 << bit)) {
946 if (!arg->cx->physical->link.lcp.fsm.StoppedTimer.load)
950 arg->cx->physical->link.lcp.fsm.StoppedTimer.load / SECTICKS);
953 if (!arg->cx->physical->link.ccp.fsm.StoppedTimer.load)
957 arg->cx->physical->link.ccp.fsm.StoppedTimer.load / SECTICKS);
1090 char const *const *argv, struct prompt *prompt, struct datalink *cx)
1103 if ((cmd->lauth & LOCAL_CX) && !cx)
1105 cx = bundle2datalink(bundle, NULL);
1107 if ((cmd->lauth & LOCAL_CX) && !cx)
1111 if (cx && !(cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) {
1113 mkPrefix(argn+1, argv, prefix, sizeof prefix), cx->name);
1114 cx = NULL;
1122 arg.cx = cx;
1190 struct prompt *prompt, const char *label, struct datalink *cx)
1220 FindExec(bundle, Commands, argc, 0, argv, prompt, cx);
1245 arg->prompt, arg->cx);
1260 if (arg->cx->physical->link.lcp.fsm.state > ST_CLOSED) {
1262 State2Nam(arg->cx->physical->link.lcp.fsm.state));
1266 datalink_Up(arg->cx, 0, 0);
1267 prompt_TtyTermMode(arg->prompt, arg->cx);
1288 bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, 1);
1291 struct datalink *cx = arg->cx ?
1292 arg->cx : bundle2datalink(arg->bundle, NULL);
1293 if (cx) {
1294 if (cx->physical->link.lcp.fsm.state == ST_OPENED)
1295 fsm_Reopen(&cx->physical->link.lcp.fsm);
1297 bundle_Open(arg->bundle, cx->name, PHYS_ALL, 1);
1319 if (arg->cx)
1337 bundle_Close(arg->bundle, arg->cx ? arg->cx->name : NULL, CLOSE_STAYDOWN);
1340 bundle_Close(arg->bundle, arg->cx ? arg->cx->name : NULL, CLOSE_LCP);
1365 if (arg->cx)
1366 datalink_Down(arg->cx, CLOSE_STAYDOWN);
1371 if (arg->cx)
1372 datalink_Down(arg->cx, CLOSE_LCP);
1376 struct fsm *fp = arg->cx ? &arg->cx->physical->link.ccp.fsm :
1399 physical_SetSync(arg->cx->physical);
1409 if (physical_SetSpeed(arg->cx->physical, speed))
1421 struct link *l = &arg->cx->physical->link;
1550 arg->cx->physical->async.cfg.EscMap[code] = 0;
1555 arg->cx->physical->async.cfg.EscMap[code >> 3] |= (1 << (code & 7));
1556 arg->cx->physical->async.cfg.EscMap[32] = 1;
1656 struct datalink *cx = arg->cx; /* LOCAL_CX uses this */
1668 if ((arg->cmd->lauth & LOCAL_CX) && !cx) {
1672 } else if (cx && !(arg->cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) {
1674 arg->cmd->name, cx->name);
1675 cx = NULL;
1745 strncpy(cx->cfg.script.dial, argp, sizeof cx->cfg.script.dial - 1);
1746 cx->cfg.script.dial[sizeof cx->cfg.script.dial - 1] = '\0';
1750 strncpy(cx->cfg.script.login, argp, sizeof cx->cfg.script.login - 1);
1751 cx->cfg.script.login[sizeof cx->cfg.script.login - 1] = '\0';
1825 physical_SetDeviceList(cx->physical, arg->argc - arg->argn,
1833 cx->physical->link.lcp.cfg.accmap = (u_int32_t)ulong_val;
1847 bundle_SetMode(arg->bundle, cx, mode);
1997 cx->physical->link.lcp.cfg.openmode = arg->argc > arg->argn+1 ?
2000 cx->physical->link.lcp.cfg.openmode = OPEN_PASSIVE;
2008 strncpy(cx->cfg.phone.list, argp, sizeof cx->cfg.phone.list - 1);
2009 cx->cfg.phone.list[sizeof cx->cfg.phone.list - 1] = '\0';
2010 cx->phone.alt = cx->phone.next = NULL;
2014 strncpy(cx->cfg.script.hangup, argp, sizeof cx->cfg.script.hangup - 1);
2015 cx->cfg.script.hangup[sizeof cx->cfg.script.hangup - 1] = '\0';
2024 strncpy(cx->cfg.script.logout, argp, sizeof cx->cfg.script.logout - 1);
2025 cx->cfg.script.logout[sizeof cx->cfg.script.logout - 1] = '\0';
2081 &cx->physical->link.lcp.cfg.fsm.timeout,
2082 &cx->physical->link.lcp.cfg.fsm.maxreq,
2083 &cx->physical->link.lcp.cfg.fsm.maxtrm, DEF_FSMTRIES);
2088 &cx->chap.auth.cfg.fsm.timeout,
2089 &cx->chap.auth.cfg.fsm.maxreq, NULL, DEF_FSMAUTHTRIES);
2094 &cx->pap.cfg.fsm.timeout, &cx->pap.cfg.fsm.maxreq,
2152 cx->cfg.callback.opmask = 0;
2155 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_AUTH);
2157 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_CBCP);
2162 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_E164);
2163 strncpy(cx->cfg.callback.msg, arg->argv[++dummyint],
2164 sizeof cx->cfg.callback.msg - 1);
2165 cx->cfg.callback.msg[sizeof cx->cfg.callback.msg - 1] = '\0';
2168 cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_NONE);
2174 if (cx->cfg.callback.opmask == CALLBACK_BIT(CALLBACK_NONE))
2175 cx->cfg.callback.opmask = 0;
2179 cx->cfg.cbcp.delay = 0;
2180 *cx->cfg.cbcp.phone = '\0';
2181 cx->cfg.cbcp.fsmretry = DEF_FSMRETRY;
2183 strncpy(cx->cfg.cbcp.phone, arg->argv[arg->argn],
2184 sizeof cx->cfg.cbcp.phone - 1);
2185 cx->cfg.cbcp.phone[sizeof cx->cfg.cbcp.phone - 1] = '\0';
2187 cx->cfg.cbcp.delay = atoi(arg->argv[arg->argn + 1]);
2194 cx->cfg.cbcp.fsmretry = long_val;
2239 cx->physical->cfg.cd.delay = long_val;
2240 cx->physical->cfg.cd.necessity = argp[strlen(argp)-1] == '!' ?
2243 cx->physical->cfg.cd.necessity = CD_NOTREQUIRED;
2245 cx->physical->cfg.cd.delay = 0;
2246 cx->physical->cfg.cd.necessity = CD_DEFAULT;
2252 res = physical_SetParity(arg->cx->physical, argp);
2261 physical_SetRtsCts(arg->cx->physical, 1);
2263 physical_SetRtsCts(arg->cx->physical, 0);
2315 physical_SetPPPoEnonstandard(arg->cx->physical, 1);
2317 physical_SetPPPoEnonstandard(arg->cx->physical, 0);
2489 arg->prompt, arg->cx);
2689 struct datalink *cx;
2696 cx = arg->bundle->links;
2697 while (cx) {
2699 dl = cx->next;
2701 arg->prompt, cx);
2702 for (cx = arg->bundle->links; cx; cx = cx->next)
2703 if (cx == dl)
2718 cx = bundle2datalink(arg->bundle, name);
2719 if (cx)
2721 arg->prompt, cx);
2738 if (arg->cx)
2739 return &arg->cx->physical->link;
2846 struct datalink *cx = arg->cx; /* LOCAL_CX uses this */
2854 if ((arg->cmd->lauth & LOCAL_CX) && !cx) {
2858 } else if (cx && !(arg->cmd->lauth & (LOCAL_CX|LOCAL_CX_OPT))) {
2860 cmd, arg->cmd->name, cx->name);
2861 cx = NULL;
2866 cx->physical->link.lcp.cfg.acfcomp &= keep;
2867 cx->physical->link.lcp.cfg.acfcomp |= add;
2870 cx->physical->link.lcp.cfg.chap05 &= keep;
2871 cx->physical->link.lcp.cfg.chap05 |= add;
2875 cx->physical->link.lcp.cfg.chap80nt &= keep;
2876 cx->physical->link.lcp.cfg.chap80nt |= add;
2879 cx->physical->link.lcp.cfg.chap80lm &= keep;
2880 cx->physical->link.lcp.cfg.chap80lm |= add;
2883 cx->physical->link.lcp.cfg.chap81 &= keep;
2884 cx->physical->link.lcp.cfg.chap81 |= add;
2900 if (cx->physical->link.lcp.cfg.echo && !add) {
2901 cx->physical->link.lcp.cfg.echo = 0;
2902 cx->physical->hdlc.lqm.method &= ~LQM_ECHO;
2903 if (cx->physical->hdlc.lqm.method & LQM_ECHO &&
2904 !cx->physical->link.lcp.want_lqrperiod &&
2905 cx->physical->hdlc.lqm.timer.load) {
2906 cx->physical->hdlc.lqm.timer.load = 0;
2907 lqr_StopTimer(cx->physical);
2909 } else if (!cx->physical->link.lcp.cfg.echo && add) {
2910 cx->physical->link.lcp.cfg.echo = 1;
2911 cx->physical->hdlc.lqm.method |= LQM_ECHO;
2912 cx->physical->hdlc.lqm.timer.load =
2913 cx->physical->link.lcp.cfg.lqrperiod * SECTICKS;
2914 if (cx->physical->link.lcp.fsm.state == ST_OPENED)
2915 (*cx->physical->hdlc.lqm.timer.func)(&cx->physical->link.lcp);
2923 cx->physical->link.lcp.cfg.lqr &= keep;
2924 cx->physical->link.lcp.cfg.lqr |= add;
2927 cx->physical->link.lcp.cfg.pap &= keep;
2928 cx->physical->link.lcp.cfg.pap |= add;
2939 cx->physical->link.lcp.cfg.protocomp &= keep;
2940 cx->physical->link.lcp.cfg.protocomp |= add;
3089 0 : NEG_OPT_MAX), 2, 1, argv, arg->prompt, arg->cx);
3116 struct datalink *cx;
3123 cx = arg->cx;
3124 if (!cx)
3125 cx = bundle2datalink(arg->bundle, NULL);
3126 if (!cx) {
3130 t = &cx->physical->link.stats.total;
3175 arg->prompt, arg->cx);