Home | History | Annotate | Download | only in src

Lines Matching refs:physical

58 #include "physical.h"
117 if (dl->physical->type == PHYS_DEDICATED && !dl->bundle->CleaningUp &&
118 dl->physical->fd != -1) {
125 physical_Close(dl->physical);
140 if (!physical_SetMode(dl->physical, PHYS_BACKGROUND))
153 (dl->physical->type == PHYS_DIRECT) ||
155 !(dl->physical->type & (PHYS_DDIAL|PHYS_DEDICATED)))) {
162 !(dl->physical->type & (PHYS_DIRECT|PHYS_BACKGROUND|PHYS_FOREGROUND)))
219 } else if (!physical_Raw(dl->physical)) {
227 physical_StopDeviceTimer(dl->physical);
228 if (dl->physical->type == PHYS_DEDICATED)
230 physical_Close(dl->physical);
237 hdlc_Init(&dl->physical->hdlc, &dl->physical->link.lcp);
238 async_Setup(&dl->physical->async);
240 lcp_Setup(&dl->physical->link.lcp, dl->state == DATALINK_READY ?
241 0 : dl->physical->link.lcp.cfg.openmode);
242 ccp_Setup(&dl->physical->link.ccp);
245 fsm_Up(&dl->physical->link.lcp.fsm);
246 fsm_Open(&dl->physical->link.lcp.fsm);
260 if ((dl->physical->type & (PHYS_DIRECT|PHYS_DEDICATED|PHYS_BACKGROUND|
278 if (physical_Open(dl->physical) >= 0) {
281 dl->physical->name.full);
288 if (!(dl->physical->type & (PHYS_DDIAL|PHYS_DEDICATED)) &&
297 if (!(dl->physical->type & (PHYS_DDIAL|PHYS_DEDICATED)) &&
305 (!(dl->physical->type & (PHYS_DDIAL|PHYS_DEDICATED)) &&
311 dl->physical->name.full);
320 dl->physical->name.full, timeout);
328 switch (physical_AwaitCarrier(dl->physical)) {
343 physical_Offline(dl->physical); /* Is this required ? */
372 physical_Offline(dl->physical);
393 physical_Offline(dl->physical);
408 descriptor_UpdateSet(&dl->physical->desc, r, w, e, n);
417 return physical_RemoveFromSet(dl->physical, r, w, e);
442 descriptor_IsSet(&dl->physical->desc, fdset);
471 if (descriptor_IsSet(&dl->physical->desc, fdset))
472 descriptor_Read(&dl->physical->desc, bundle, fdset);
512 if (descriptor_IsSet(&dl->physical->desc, fdset))
513 switch (descriptor_Write(&dl->physical->desc, bundle, fdset)) {
540 physical_StopDeviceTimer(dl->physical);
543 physical_Offline(dl->physical);
574 struct lcp *lcp = &dl->physical->link.lcp;
593 (*dl->parent->LayerUp)(dl->parent->object, &dl->physical->link.ccp.fsm);
614 int ccpok = ccp_SetOpenMode(&dl->physical->link.ccp);
616 if (dl->physical->link.lcp.want_mrru && dl->physical->link.lcp.his_mrru) {
629 dl->physical->link.ccp.fsm.open_mode = OPEN_PASSIVE; /* override */
640 (*dl->parent->LayerUp)(dl->parent->object, &dl->physical->link.lcp.fsm);
644 ncp_SetLink(&dl->bundle->ncp, &dl->physical->link);
649 fsm_Up(&dl->physical->link.ccp.fsm);
650 fsm_Open(&dl->physical->link.ccp.fsm);
654 (*dl->parent->LayerUp)(dl->parent->object, &dl->physical->link.lcp.fsm);
662 fsm_Close(&dl->physical->link.lcp.fsm);
675 if ((dl->physical->link.lcp.his_callback.opmask &
677 dl->physical->link.lcp.want_callback.opmask &
679 !(dl->physical->link.lcp.want_callback.opmask &
684 } else if (dl->physical->link.lcp.want_callback.opmask) {
689 fsm_Close(&dl->physical->link.lcp.fsm);
691 switch (dl->physical->link.lcp.his_callback.opmask) {
714 fsm_Close(&dl->physical->link.lcp.fsm);
718 strncpy(dl->cbcp.fsm.phone, dl->physical->link.lcp.his_callback.msg,
727 fsm_Close(&dl->physical->link.lcp.fsm);
735 fsm_Close(&dl->physical->link.lcp.fsm);
745 fsm_Close(&dl->physical->link.lcp.fsm);
758 fsm2initial(&dl->physical->link.ccp.fsm);
852 if ((dl->physical = physical_Create(dl, type)) == NULL) {
858 pap_Init(&dl->pap, dl->physical);
859 chap_Init(&dl->chap, dl->physical);
860 cbcp_Init(&dl->cbcp, dl->physical);
863 chat_Init(&dl->chat, dl->physical);
905 if ((dl->physical = physical_Create(dl, PHYS_INTERACTIVE)) == NULL) {
910 pap_Init(&dl->pap, dl->physical);
913 chap_Init(&dl->chap, dl->physical);
916 memcpy(&dl->physical->cfg, &odl->physical->cfg, sizeof dl->physical->cfg);
917 memcpy(&dl->physical->link.lcp.cfg, &odl->physical->link.lcp.cfg,
918 sizeof dl->physical->link.lcp.cfg);
919 memcpy(&dl->physical->link.ccp.cfg, &odl->physical->link.ccp.cfg,
920 sizeof dl->physical->link.ccp.cfg);
921 memcpy(&dl->physical->async.cfg, &odl->physical->async.cfg,
922 sizeof dl->physical->async.cfg);
924 cbcp_Init(&dl->cbcp, dl->physical);
927 chat_Init(&dl->chat, dl->physical);
955 physical_Destroy(dl->physical);
966 (dl->physical->type & (PHYS_DIRECT|PHYS_DEDICATED)))
977 dl->physical->type == PHYS_DIRECT ? 0 : dl->cfg.reconnect.max;
1009 fsm2initial(&dl->physical->link.ccp.fsm);
1020 fsm_Close(&dl->physical->link.lcp.fsm);
1035 fsm2initial(&dl->physical->link.ccp.fsm);
1041 fsm2initial(&dl->physical->link.lcp.fsm);
1107 prompt_Printf(arg->prompt, " Callback %s ", arg->cx->physical->type ==
1124 if (arg->cx->physical->type != PHYS_DIRECT)
1134 if (arg->cx->physical->type & PHYS_DIRECT)
1358 dl->physical = iov2physical(dl, iov, niov, maxiov, fd, auxfd, nauxfd);
1360 if (!dl->physical) {
1366 pap_Init(&dl->pap, dl->physical);
1370 chap_Init(&dl->chap, dl->physical);
1373 cbcp_Init(&dl->cbcp, dl->physical);
1376 chat_Init(&dl->chat, dl->physical);
1414 link_fd = physical2iov(dl ? dl->physical : NULL, iov, niov, maxiov, auxfd,
1429 dl->physical->link.name = dl->name = strdup(name);
1450 /* our physical link name isn't updated (it probably isn't created yet) */
1457 if (!physical_SetMode(dl->physical, mode))
1459 if (dl->physical->type & (PHYS_DIRECT|PHYS_DEDICATED))
1461 if (dl->physical->type == PHYS_DIRECT)