Home | History | Annotate | Download | only in libpcap

Lines Matching defs:device

61 #include <sys/device.h>
121 * "ps_drop" counts packets dropped inside the BPF device
527 static const char device[] = "/dev/bpf";
530 char device[sizeof "/dev/bpf0000000000"];
536 * and create the BPF device entries, if they don't
544 if ((fd = open(device, O_RDWR)) == -1 &&
545 (errno != EACCES || (fd = open(device, O_RDONLY)) == -1))
547 "(cannot open device) %s: %s", device, pcap_strerror(errno));
553 (void)snprintf(device, sizeof(device), "/dev/bpf%d", n++);
565 * the device in question) can be indicated at open
568 fd = open(device, O_RDWR);
570 fd = open(device, O_RDONLY);
578 device, pcap_strerror(errno));
593 pcap_open_live(const char *device, int snaplen, int promisc, int to_ms,
612 if (strstr(device, "dag")) {
613 return dag_open_live(device, snaplen, promisc, to_ms, ebuf);
666 (void)strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
672 device, pcap_strerror(errno));
679 "BIOCSBLEN: %s: No buffer size worked", device);
783 * A "real Ethernet device" is defined here as a device
820 * If this is an Ethernet device, and we don't have a DLT_ list,
825 * device.)
917 * doesn't get woken up for a BPF device until the buffer
960 * Therefore, when we open the device, we install
1005 * the BPF device; in NetBSD, OpenBSD, and Darwin, a non-blocking
1100 * single device? IN, OUT or both?