Lines Matching full:ppp_fd
176 static int ppp_fd = -1; /* fd which is set to PPP discipline */
185 * For the old-style kernel driver, this is the same as ppp_fd.
265 ppp_fd = new_fd;
273 return !hungup && ppp_fd >= 0;
274 if (!hungup || ppp_fd == slave_fd)
437 modify_flags(ppp_fd, SC_RCVB | SC_LOGB,
534 return ppp_fd;
593 close(ppp_fd);
594 ppp_fd = -1;
662 if (ioctl(ppp_fd, PPPIOCCONNECT, &ifunit) < 0)
708 if (ioctl(ppp_fd, PPPIOCCONNECT, &ifnum) < 0)
740 if (ioctl(ppp_fd, PPPIOCGFLAGS, (caddr_t) &x) == 0) {
1015 int fd = ppp_fd;
1096 if (ppp_fd >= 0) {
1097 nr = read(ppp_fd, buf, len);
1105 /* N.B. we read ppp_fd first since LCP packets come in there. */
1117 if (new_style_driver && ppp_fd < 0 && ppp_dev_fd < 0)
1201 if (ioctl(ppp_fd, PPPIOCSASYNCMAP, (caddr_t) &asyncmap) < 0) {
1210 modify_flags(ppp_fd, SC_COMP_PROT|SC_COMP_AC|SC_SYNC, x);
1222 if (ioctl(ppp_fd, PPPIOCSXASYNCMAP, accm) < 0 && errno != ENOTTY) {
1245 if (ioctl(ppp_fd, PPPIOCSMRU, (caddr_t) &mru) < 0) {
1253 if (ioctl(ppp_fd, PPPIOCSRASYNCMAP, (caddr_t) &asyncmap) < 0) {
2633 ppp_fd = -1;
2647 flags = fcntl(ppp_fd, F_GETFL);
2649 fcntl(ppp_fd, F_SETFL, flags | O_NONBLOCK) == -1)
2652 if (ioctl(ppp_fd, TIOCSETD, &ppp_disc) < 0)
2657 if (ioctl(ppp_fd, PPPIOCGUNIT, &ifunit) < 0)