Home | History | Annotate | Download | only in test

Lines Matching full:vdev

93 static struct vhci_device vdev;
265 write_snoop(vdev.dd, HCI_EVENT_PKT, 1, buf, ptr - buf);
267 if (write(vdev.fd, buf, ptr - buf) < 0)
297 write_snoop(vdev.dd, HCI_EVENT_PKT, 1, buf, ptr - buf);
299 if (write(vdev.fd, buf, ptr - buf) < 0)
325 write_snoop(vdev.dd, HCI_EVENT_PKT, 1, buf, ptr - buf);
327 if (write(vdev.fd, buf, ptr - buf) < 0)
355 write_snoop(vdev.dd, HCI_EVENT_PKT, 1, buf, ptr - buf);
357 if (write(vdev.fd, buf, ptr - buf) < 0)
383 write_snoop(vdev.dd, HCI_EVENT_PKT, 1, buf, ptr - buf);
385 if (write(vdev.fd, buf, ptr - buf) < 0)
389 vdev.acl_cnt = 0;
411 *((uint16_t *) ptr) = htobs(vdev.acl_cnt); ptr += 2;
413 write_snoop(vdev.dd, HCI_EVENT_PKT, 1, buf, ptr - buf);
415 if (write(vdev.fd, buf, ptr - buf) < 0)
428 if (vdev.scan) {
429 g_io_channel_shutdown(vdev.scan, TRUE, NULL);
430 vdev.scan = NULL;
435 if (vdev.scan)
447 baswap(&ba, &vdev.bdaddr);
465 vdev.scan = sk_io;
546 baswap(&ba, &vdev.bdaddr);
570 bacpy(&info.bdaddr, &vdev.bdaddr);
662 memcpy(vdev.name, data, sizeof(vdev.name));
668 memcpy(ln.name, vdev.name, sizeof(ln.name));
695 memcpy(cd.dev_class, vdev.dev_class, 3);
701 memcpy(vdev.dev_class, data, 3);
707 im.mode = vdev.inq_mode;
713 vdev.inq_mode = data[0];
719 ir.fec = vdev.eir_fec;
720 memcpy(ir.data, vdev.eir_data, HCI_MAX_EIR_LENGTH);
726 vdev.eir_fec = data[0];
727 memcpy(vdev.eir_data, data + 1, HCI_MAX_EIR_LENGTH);
762 memcpy(lf.features, vdev.features, 8);
771 memcpy(ef.features, vdev.features, 8);
791 bacpy(&ba.bdaddr, &vdev.bdaddr);
854 if (++vdev.acl_cnt > VHCI_ACL_MAX_PKT - 1) {
857 vdev.acl_cnt = 0;
902 write_snoop(vdev.dd, HCI_ACLDATA_PKT, 1, buf, len);
904 if (write(vdev.fd, buf, len) < 0)
982 write_snoop(vdev.dd, type, 0, buf, len);
1238 if (getbdaddrbyname(argv[0], &vdev.bdaddr) < 0)
1307 vdev.features[0] = 0xff;
1308 vdev.features[1] = 0xff;
1309 vdev.features[2] = 0x8f;
1310 vdev.features[3] = 0xfe;
1311 vdev.features[4] = 0x9b;
1312 vdev.features[5] = 0xf9;
1313 vdev.features[6] = 0x01;
1314 vdev.features[7] = 0x80;
1316 memset(vdev.name, 0, sizeof(vdev.name));
1317 strncpy((char *) vdev.name, "BlueZ (Virtual HCI)",
1318 sizeof(vdev.name) - 1);
1320 vdev.dev_class[0] = 0x00;
1321 vdev.dev_class[1] = 0x00;
1322 vdev.dev_class[2] = 0x00;
1324 vdev.inq_mode = 0x00;
1325 vdev.eir_fec = 0x00;
1326 memset(vdev.eir_data, 0, sizeof(vdev.eir_data));
1328 vdev.fd = fd;
1329 vdev.dd = dd;