Lines Matching defs:device

84 #include <sys/device.h>
395 pcap_create_interface(const char *device, char *ebuf)
399 p = pcap_create_common(device, ebuf);
409 * On success, returns a file descriptor for a BPF device.
417 static const char device[] = "/dev/bpf";
420 char device[sizeof "/dev/bpf0000000000"];
426 * and create the BPF device entries, if they don't
434 if ((fd = open(device, O_RDWR)) == -1 &&
435 (errno != EACCES || (fd = open(device, O_RDONLY)) == -1)) {
441 "(cannot open device) %s: %s", device, pcap_strerror(errno));
448 (void)snprintf(device, sizeof(device), "/dev/bpf%d", n++);
460 * the device in question) can be indicated at open
463 fd = open(device, O_RDWR);
465 fd = open(device, O_RDONLY);
487 * BPF device, so we have BPF
498 * Got EACCES on the last device we tried,
504 "(cannot open BPF device) %s: %s", device,
514 "(cannot open BPF device) %s: %s", device,
556 * A "real Ethernet device" is defined here as a device
566 * treat it as an indication that the device isn't an
593 * this device"; don't treat it as an error.
653 * whether the device exists.
657 * Not an enN device; no monitor mode.
671 * No such device?
683 * we just open the enN device, and check whether
686 * First, open a BPF device.
693 * Now bind to the device.
701 * There's no such device.
772 * "ps_drop" counts packets dropped inside the BPF device
881 * The device on which we're capturing
942 * but read() from a BPF device doesn't necessarily
1274 strncpy(req.ifm_name, p->md.device,
1289 p->md.device,
1332 if (p->md.device != NULL) {
1333 free(p->md.device);
1334 p->md.device = NULL;
1350 * No such device exists.
1356 * to open a "wltN" device. Assume that this
1358 * "enN" device; if that device exists, return
1359 * "monitor mode not supported on the device".
1370 * the underlying device doesn't
1379 * The underlying "enN" device
1381 * corresponding "wltN" device;
1383 * device doesn't support
1385 * it's an Ethernet device rather
1386 * than a wireless device.
1394 * an underlying "enN" device, so
1395 * just report "no such device".
1406 * No such device.
1481 if (strstr(device, "dag")) {
1482 return dag_open_live(device, snaplen, promisc, to_ms, ebuf);
1518 * Check if the given source network device has a '/' separated
1519 * zonename prefix string. The zonename prefixed source device
1539 p->md.device = strdup(p->opt.source);
1540 if (p->md.device == NULL) {
1586 * Not an enN device; check
1587 * whether the device even exists.
1599 * device doesn't
1613 * the device exists, so just
1614 * report "no such device".
1639 * we just open the enN device, and set the DLT.
1734 * Now bind to the device.
2003 * If this is an Ethernet device, and we don't have a DLT_ list,
2008 * device.)
2142 * doesn't get woken up for a BPF device until the buffer
2195 * Therefore, when we open the device, we install
2241 * the BPF device; in NetBSD, OpenBSD, and Darwin, a non-blocking
2315 * There's no such device.
2659 * single device? IN, OUT or both?