Lines Matching refs:tap
60 int tap;
413 ret = read (emac->tap, data, nr_bytes);
484 ret = write (emac->tap, data + 2, len);
534 close (emac->tap);
544 emac->tap = open ("/dev/net/tun", O_RDWR);
545 if (emac->tap == -1)
553 strcpy (emac->ifr.ifr_name, "tap-gdb");
556 if (ioctl (emac->tap, TUNSETIFF, &emac->ifr) < 0
558 || ioctl (emac->tap, TUNSETNOCSUM) < 0
561 || ioctl (emac->tap, TUNSETSNDBUF, &flags) < 0
565 HW_TRACE ((me, "tap ioctl setup failed: %s", strerror (errno)));
566 close (emac->tap);
570 flags = fcntl (emac->tap, F_GETFL);
571 fcntl (emac->tap, F_SETFL, flags | O_NONBLOCK);