Lines Matching refs:ppp_dev_fd
191 int ppp_dev_fd = -1; /* fd for /dev/ppp (new style driver) */ variable
271 ppp_dev_fd = new_fd; in set_ppp_fd()
367 if (new_style_driver && ppp_dev_fd >= 0) in sys_close()
368 close(ppp_dev_fd); in sys_close()
388 if (ppp_dev_fd < 0) in set_kdebugflag()
390 if (ioctl(ppp_dev_fd, PPPIOCSDEBUG, &requested_level) < 0) { in set_kdebugflag()
497 modify_flags(ppp_dev_fd, SC_LOOP_TRAFFIC, 0); in generic_establish_ppp()
500 add_fd(ppp_dev_fd); in generic_establish_ppp()
603 modify_flags(ppp_dev_fd, 0, SC_LOOP_TRAFFIC); in generic_disestablish_ppp()
605 } else if (!doing_multilink && ppp_dev_fd >= 0) { in generic_disestablish_ppp()
606 close(ppp_dev_fd); in generic_disestablish_ppp()
607 remove_fd(ppp_dev_fd); in generic_disestablish_ppp()
608 ppp_dev_fd = -1; in generic_disestablish_ppp()
615 ppp_dev_fd = -1; in generic_disestablish_ppp()
627 if (ppp_dev_fd >= 0) { in make_ppp_unit()
629 close(ppp_dev_fd); in make_ppp_unit()
631 ppp_dev_fd = open("/dev/ppp", O_RDWR); in make_ppp_unit()
632 if (ppp_dev_fd < 0) in make_ppp_unit()
634 flags = fcntl(ppp_dev_fd, F_GETFL); in make_ppp_unit()
636 || fcntl(ppp_dev_fd, F_SETFL, flags | O_NONBLOCK) == -1) in make_ppp_unit()
640 x = ioctl(ppp_dev_fd, PPPIOCNEWUNIT, &ifunit); in make_ppp_unit()
644 x = ioctl(ppp_dev_fd, PPPIOCNEWUNIT, &ifunit); in make_ppp_unit()
661 if (ioctl(ppp_dev_fd, PPPIOCSMRRU, &mrru) < 0) in cfg_bundle()
664 modify_flags(ppp_dev_fd, SC_MP_SHORTSEQ|SC_MP_XSHORTSEQ|SC_MULTILINK, in cfg_bundle()
671 add_fd(ppp_dev_fd); in cfg_bundle()
729 if (ppp_dev_fd >= 0) { in destroy_bundle()
730 close(ppp_dev_fd); in destroy_bundle()
731 remove_fd(ppp_dev_fd); in destroy_bundle()
732 ppp_dev_fd = -1; in destroy_bundle()
1061 if (ppp_dev_fd >= 0 && !(proto >= 0xc000 || proto == PPP_CCPFRAG)) in output()
1062 fd = ppp_dev_fd; in output()
1138 if (nr < 0 && new_style_driver && ppp_dev_fd >= 0 && !bundle_eof) { in read_packet()
1140 nr = read(ppp_dev_fd, buf, len); in read_packet()
1147 remove_fd(ppp_dev_fd); in read_packet()
1151 if (new_style_driver && ppp_fd < 0 && ppp_dev_fd < 0) in read_packet()
1283 if (new_style_driver && ppp_dev_fd >= 0 in tty_recv_config()
1284 && ioctl(ppp_dev_fd, PPPIOCSMRU, (caddr_t) &mru) < 0) in tty_recv_config()
1309 if (ioctl(ppp_dev_fd, PPPIOCSCOMPRESS, (caddr_t) &data) >= 0) in ccp_test()
1325 if (still_ppp() && ppp_dev_fd >= 0) in ccp_flags_set()
1326 modify_flags(ppp_dev_fd, SC_CCP_OPEN|SC_CCP_UP, x); in ccp_flags_set()
1339 if (ioctl(ppp_dev_fd, PPPIOCSPASS, &fp) < 0) { in set_filters()
1348 if (ioctl(ppp_dev_fd, PPPIOCSACTIVE, &fp) < 0) { in set_filters()
1365 return ioctl(ppp_dev_fd, PPPIOCGIDLE, ip) >= 0;
1405 if (ioctl(ppp_dev_fd, PPPIOCGFLAGS, &flags) < 0) { in ccp_fatal_error()
2251 if (ioctl(ppp_dev_fd, PPPIOCSMAXCID, (caddr_t) &maxcid) < 0) { in sifvjcomp()
2258 modify_flags(ppp_dev_fd, SC_COMP_TCP|SC_NO_TCP_CCID, x); in sifvjcomp()
2697 modify_flags(ppp_dev_fd, 0, SC_LOOP_TRAFFIC); in open_ppp_loopback()
2700 return ppp_dev_fd; in open_ppp_loopback()
2748 if (ioctl(ppp_dev_fd, PPPIOCSNPMODE, (caddr_t) &npi) < 0) {