Home | History | Annotate | Download | only in tools

Lines Matching refs:di

48 static struct hci_dev_info di;
51 static void print_dev_hdr(struct hci_dev_info *di);
52 static void print_dev_info(int ctl, struct hci_dev_info *di);
74 di.dev_id = (dr+i)->dev_id;
75 if (ioctl(ctl, HCIGETDEVINFO, (void *) &di) < 0)
77 if (hci_test_bit(HCI_RAW, &di.flags) &&
78 !bacmp(&di.bdaddr, BDADDR_ANY)) {
79 int dd = hci_open_dev(di.dev_id);
80 hci_read_bd_addr(dd, &di.bdaddr, 1000);
83 print_dev_info(ctl, &di);
87 static void print_pkt_type(struct hci_dev_info *di)
90 str = hci_ptypetostr(di->pkt_type);
95 static void print_link_policy(struct hci_dev_info *di)
97 printf("\tLink policy: %s\n", hci_lptostr(di->link_policy));
100 static void print_link_mode(struct hci_dev_info *di)
103 str = hci_lmtostr(di->link_mode);
108 static void print_dev_features(struct hci_dev_info *di, int format)
112 di->features[0], di->features[1], di->features[2],
113 di->features[3], di->features[4], di->features[5],
114 di->features[6], di->features[7]);
117 char *tmp = lmp_featurestostr(di->features, "\t\t", 63);
366 print_dev_hdr(&di);
463 print_dev_hdr(&di);
464 print_pkt_type(&di);
481 print_dev_hdr(&di);
482 print_link_policy(&di);
499 print_dev_hdr(&di);
500 print_link_mode(&di);
550 if (!(di.features[7] & LMP_EXT_FEAT)) {
551 print_dev_hdr(&di);
552 print_dev_features(&di, 1);
569 print_dev_hdr(&di);
576 tmp = lmp_featurestostr(di.features, "\t\t", 63);
628 print_dev_hdr(&di);
872 print_dev_hdr(&di);
940 print_dev_hdr(&di);
983 struct hci_dev_info di;
998 if (hci_devinfo(hdev, &di) < 0) {
1005 if (get_link_key(&di.bdaddr, &bdaddr, key) < 0) {
1070 print_dev_hdr(&di);
1101 print_dev_hdr(&di);
1143 print_dev_hdr(&di);
1187 print_dev_hdr(&di);
1222 print_dev_hdr(&di);
1286 print_dev_hdr(&di);
1377 print_dev_hdr(&di);
1445 print_dev_hdr(&di);
1514 print_dev_hdr(&di);
1581 print_dev_hdr(&di);
1617 print_dev_hdr(&di);
1650 print_dev_hdr(&di);
1757 print_dev_hdr(&di);
1836 static void print_dev_hdr(struct hci_dev_info *di)
1841 if (hdr == di->dev_id)
1843 hdr = di->dev_id;
1845 ba2str(&di->bdaddr, addr);
1847 printf("%s:\tType: %s Bus: %s\n", di->name,
1848 hci_typetostr(di->type >> 4),
1849 hci_bustostr(di->type & 0x0f));
1851 addr, di->acl_mtu, di->acl_pkts,
1852 di->sco_mtu, di->sco_pkts);
1855 static void print_dev_info(int ctl, struct hci_dev_info *di)
1857 struct hci_dev_stats *st = &di->stat;
1860 print_dev_hdr(di);
1862 str = hci_dflagstostr(di->flags);
1872 if (all && !hci_test_bit(HCI_RAW, &di->flags) &&
1873 bacmp(&di->bdaddr, BDADDR_ANY)) {
1874 print_dev_features(di, 0);
1875 print_pkt_type(di);
1876 print_link_policy(di);
1877 print_link_mode(di);
1879 if (hci_test_bit(HCI_UP, &di->flags)) {
1880 cmd_name(ctl, di->dev_id, NULL);
1881 cmd_class(ctl, di->dev_id, NULL);
1882 cmd_version(ctl, di->dev_id, NULL);
1994 di.dev_id = atoi(argv[0] + 3);
1997 if (ioctl(ctl, HCIGETDEVINFO, (void *) &di)) {
2002 if (hci_test_bit(HCI_RAW, &di.flags) &&
2003 !bacmp(&di.bdaddr, BDADDR_ANY)) {
2004 int dd = hci_open_dev(di.dev_id);
2005 hci_read_bd_addr(dd, &di.bdaddr, 1000);
2019 command[i].func(ctl, di.dev_id, *argv);
2032 print_dev_info(ctl, &di);