• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/ppp-786.1.1/Helpers/pppd/

Lines Matching refs:ioctl

60 #include <sys/ioctl.h>
139 /* We can get an EIO error on an ioctl if the modem has hung up */
895 if (ioctl(ip_sockfd, SIOCGIFFLAGS, &ifr) >= 0
898 ioctl(ip_sockfd, SIOCSIFFLAGS, &ifr);
998 if (ioctl(fd, PPPIOCGFLAGS, (caddr_t) &flags) < 0) {
1002 fatal("ioctl(PPPIOCGFLAGS): %m");
1015 if (ioctl(fd, PPPIOCSFLAGS, (caddr_t) &flags) < 0) {
1017 fatal("ioctl(PPPIOCSFLAGS, %x): %m", flags, errno);
1127 // using get option or ioctl
1149 if (ioctl(ppp_sockfd, PPPIOCSDEBUG, &requested_level) < 0) {
1151 error("ioctl(PPPIOCSDEBUG): %m");
1168 x = ioctl(ppp_sockfd, PPPIOCNEWUNIT, &ifunit);
1172 x = ioctl(ppp_sockfd, PPPIOCNEWUNIT, &ifunit);
1224 ioctl(tty_fd, TIOCEXCL, 0);
1228 if (ioctl(tty_fd, TIOCSETD, &pppdisc) < 0) {
1240 if (ioctl(tty_fd, TIOCSETD, &ttydisc) < 0)
1242 error("ioctl(TIOCSETD, TTYDISC): %m");
1265 if (ioctl(tty_fd, TIOCSETD, &ttydisc) < 0) {
1267 error("ioctl(TIOCSETD, TTYDISC): %m");
1270 if (ioctl(tty_fd, TIOCNXCL, 0) < 0) {
1272 warning("ioctl(TIOCNXCL): %m(%d)", errno);
1295 if (ioctl(fd, PPPIOCGCHAN, &link) == -1) {
1309 if (ioctl(s, PPPIOCATTCHAN, &link) < 0) {
1331 if (ioctl(ppp_sockfd, PPPIOCSDELEGATE, delegate) < 0) {
1344 if (ioctl(s, PPPIOCCONNECT, &ifunit) < 0) {
1379 if (ifunit >= 0 && ioctl(ppp_sockfd, PPPIOCDETACH, &x) < 0)
1397 if (ioctl(ppp_fd, PPPIOCGFLAGS, (caddr_t) &x) == 0) {
1432 if (ioctl(fd, TIOCSCTTY, (char *)NULL) == -1)
1442 ioctl(fd, TIOCGWINSZ, &wsinfo);
1541 ioctl(fd, TIOCSWINSZ, &wsinfo);
1555 ioctl(fd, (on? TIOCMBIS: TIOCMBIC), &modembits);
1661 if (ioctl(fd, FIONREAD, &n) == -1)
1749 if (ioctl(ppp_fd, PPPIOCSASYNCMAP, (caddr_t) &asyncmap) < 0)
1750 fatal("ioctl(PPPIOCSASYNCMAP): %m");
1752 if (ioctl(ppp_fd, PPPIOCGFLAGS, (caddr_t) &x) < 0)
1753 fatal("ioctl (PPPIOCGFLAGS): %m");
1757 if (ioctl(ppp_fd, PPPIOCSFLAGS, (caddr_t) &x) < 0)
1758 fatal("ioctl(PPPIOCSFLAGS): %m");
1776 if (ioctl(ppp_fd, PPPIOCGFLAGS, (caddr_t) &x) < 0)
1777 fatal("ioctl (PPPIOCGFLAGS): %m");
1780 if (ioctl(ppp_fd, PPPIOCSFLAGS, (caddr_t) &x) < 0)
1781 fatal("ioctl(PPPIOCSFLAGS): %m");
1796 if (ioctl(ip_sockfd, SIOCSIFMTU, (caddr_t) &ifr) < 0)
1797 error("ioctl (SIOCSIFMTU): %m");
1810 if (ioctl(ip_sockfd, SIOCGIFMTU, (caddr_t) &ifr) < 0) {
1811 error("ioctl (SIOCGIFMTU): %m");
1825 if (ioctl(ppp_fd, PPPIOCGFLAGS, (caddr_t) &x) < 0) {
1826 warning("ioctl (PPPIOCGFLAGS): %m");
1830 if (ioctl(ppp_fd, PPPIOCSFLAGS, (caddr_t) &x) < 0)
1831 warning("ioctl(PPPIOCSFLAGS): %m");
1841 if (ioctl(ppp_fd, PPPIOCGFLAGS, (caddr_t) &x) < 0) {
1842 warning("ioctl (PPPIOCGFLAGS): %m");
1846 if (ioctl(ppp_fd, PPPIOCSFLAGS, (caddr_t) &x) < 0)
1847 warning("ioctl(PPPIOCSFLAGS): %m");
1857 if (ioctl(ppp_fd, PPPIOCSXASYNCMAP, accm) < 0 && errno != ENOTTY)
1858 warning("ioctl(set extended ACCM): %m");
1871 if (ioctl(ppp_fd, PPPIOCSMRU, (caddr_t) &mru) < 0)
1872 fatal("ioctl(PPPIOCSMRU): %m");
1873 if (ioctl(ppp_fd, PPPIOCSRASYNCMAP, (caddr_t) &asyncmap) < 0)
1874 fatal("ioctl(PPPIOCSRASYNCMAP): %m");
1875 if (ioctl(ppp_fd, PPPIOCGFLAGS, (caddr_t) &x) < 0)
1876 fatal("ioctl (PPPIOCGFLAGS): %m");
1878 if (ioctl(ppp_fd, PPPIOCSFLAGS, (caddr_t) &x) < 0)
1879 fatal("ioctl(PPPIOCSFLAGS): %m");
1896 if (ioctl(ppp_fd, PPPIOCSMRU, (caddr_t) &mru) < 0)
1897 fatal("ioctl(PPPIOCSMRU): %m");
1898 if (ioctl(ppp_fd, PPPIOCGFLAGS, (caddr_t) &x) < 0)
1899 fatal("ioctl (PPPIOCGFLAGS): %m");
1901 if (ioctl(ppp_fd, PPPIOCSFLAGS, (caddr_t) &x) < 0)
1902 fatal("ioctl(PPPIOCSFLAGS): %m");
1920 if (ioctl(ppp_sockfd, PPPIOCSCOMPRESS, (caddr_t) &data) >= 0)
1935 if (ioctl(ppp_sockfd, PPPIOCGFLAGS, (caddr_t) &x) < 0) {
1936 error("ioctl (PPPIOCGFLAGS): %m");
1942 if (ioctl(ppp_sockfd, PPPIOCSFLAGS, (caddr_t) &x) < 0)
1943 error("ioctl(PPPIOCSFLAGS): %m");
1955 if (ioctl(ppp_fd, PPPIOCGFLAGS, (caddr_t) &x) < 0) {
1956 error("ioctl(PPPIOCGFLAGS): %m");
1967 return ioctl(ppp_sockfd, PPPIOCGIDLE, ip) >= 0;
1979 if (ioctl(ip_sockfd, SIOCGPPPSTATS, &req) < 0) {
2000 if (ioctl(ppp_fd, PPPIOCSPASS, pass) < 0) {
2006 if (ioctl(ppp_fd, PPPIOCSACTIVE, active) < 0) {
2022 if (ioctl(ppp_sockfd, PPPIOCGFLAGS, (caddr_t) &x) < 0) {
2023 error("ioctl (PPPIOCGFLAGS): %m");
2028 if (ioctl(ppp_sockfd, PPPIOCSFLAGS, (caddr_t) &x) < 0) {
2029 error("ioctl(PPPIOCSFLAGS): %m");
2032 if (vjcomp && ioctl(ppp_sockfd, PPPIOCSMAXCID, (caddr_t) &maxcid) < 0) {
2033 error("ioctl(PPPIOCSMAXCID): %m");
2048 if (ioctl(ip_sockfd, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) {
2049 error("ioctl (SIOCGIFFLAGS): %m");
2053 if (ioctl(ip_sockfd, SIOCSIFFLAGS, (caddr_t) &ifr) < 0) {
2054 error("ioctl(SIOCSIFFLAGS): %m");
2070 if (ioctl(ppp_sockfd, PPPIOCSNPMODE, &npi) < 0) {
2071 error("ioctl(set NP %d mode to %d): %m", proto, mode);
2086 if (ioctl(ppp_sockfd, PPPIOCSNPAFMODE, &npi) < 0) {
2087 error("ioctl(set NPAF %d mode to %d): %m", proto, mode);
2103 if ((ioctl(ppp_sockfd, PPPIOCGNPMODE, (caddr_t) &npi) == 0)
2109 if ((ioctl(ppp_sockfd, PPPIOCGNPMODE, (caddr_t) &npi) == 0)
2119 if (ioctl(ip_sockfd, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) {
2120 error("ioctl (SIOCGIFFLAGS): %m");
2124 if (ioctl(ip_sockfd, SIOCSIFFLAGS, (caddr_t) &ifr) < 0) {
2125 error("ioctl(SIOCSIFFLAGS): %m");
2184 if (ioctl(ip_sockfd, SIOCPROTOATTACH, (caddr_t) &ifr) < 0) {
2203 if (ioctl(ip_sockfd, SIOCDIFADDR, (caddr_t) &ifr) < 0) {
2207 if (ioctl(ip_sockfd, SIOCAIFADDR, (caddr_t) &ifra) < 0) {
2267 if (ioctl(ip_sockfd, SIOCDIFADDR, (caddr_t) &ifr) < 0) {
2271 if (ioctl(ip_sockfd, SIOCAIFADDR, (caddr_t) &ifra) < 0) {
2310 if (ioctl(ip_sockfd, SIOCDIFADDR, (caddr_t) &ifra) < 0) {
2319 if (ioctl(ip_sockfd, SIOCPROTODETACH, (caddr_t) &ifr) < 0) {
2363 if (ioctl(s, SIOCPROTOATTACH_IN6, &ifr6) < 0) {
2402 if (ioctl(s, SIOCLL_START, &addreq6) < 0) {
2436 /* first try old ioctl */
2438 if (ioctl(s, SIOCPROTODETACH, &ifr) < 0) {
2439 /* then new ioctl */
2441 if (ioctl(s, SIOCLL_STOP, &ifr6) < 0) {
2445 if (ioctl(s, SIOCPROTODETACH_IN6, &ifr6) < 0) {
3162 if (ioctl(ip_sockfd, SIOCGIFCONF, &ifc) < 0) {
3163 error("ioctl(SIOCGIFCONF): %m");
3181 if (ioctl(ip_sockfd, SIOCGIFFLAGS, &ifreq) < 0)
3190 if (ioctl(ip_sockfd, SIOCGIFNETMASK, &ifreq) < 0)
3255 if (ioctl(ip_sockfd, SIOCGIFCONF, &ifc) < 0) {
3256 warning("ioctl(SIOCGIFCONF): %m");
3274 if (ioctl(ip_sockfd, SIOCGIFFLAGS, &ifreq) < 0)
3282 if (ioctl(ip_sockfd, SIOCGIFNETMASK, &ifreq) < 0)