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);
547 emac->tap = open ("/dev/net/tun", O_RDWR);
548 if (emac->tap == -1)
556 strcpy (emac->ifr.ifr_name, "tap-gdb");
559 if (ioctl (emac->tap, TUNSETIFF, &emac->ifr) < 0
561 || ioctl (emac->tap, TUNSETNOCSUM) < 0
564 || ioctl (emac->tap, TUNSETSNDBUF, &flags) < 0
568 HW_TRACE ((me, "tap ioctl setup failed: %s", strerror (errno)));
569 close (emac->tap);
573 flags = fcntl (emac->tap, F_GETFL);
574 fcntl (emac->tap, F_SETFL, flags | O_NONBLOCK);