Introduce ng_hci_inquiry_response structure and use it in the hccontrol(8)
This commit is contained in:
parent
ab3ce7c4d9
commit
726a7fca00
@ -1436,15 +1436,18 @@ typedef struct {
|
||||
#define NG_HCI_EVENT_INQUIRY_RESULT 0x02
|
||||
typedef struct {
|
||||
u_int8_t num_responses; /* number of responses */
|
||||
/* these are repeated "num_responses" times
|
||||
bdaddr_t bdaddr; --- unit address(es)
|
||||
u_int8_t page_scan_rep_mode; --- page scan rep. mode(s)
|
||||
u_int8_t page_scan_period_mode; --- page scan period mode(s)
|
||||
u_int8_t page_scan_mode; --- page scan mode(s)
|
||||
u_int8_t uclass[NG_HCI_CLASS_SIZE]; --- unit class(es)
|
||||
u_int16_t clock_offset; --- clock offset(s) */
|
||||
/* ng_hci_inquiry_response[num_responses] -- see below */
|
||||
} __attribute__ ((packed)) ng_hci_inquiry_result_ep;
|
||||
|
||||
typedef struct {
|
||||
bdaddr_t bdaddr; /* unit address */
|
||||
u_int8_t page_scan_rep_mode; /* page scan rep. mode */
|
||||
u_int8_t page_scan_period_mode; /* page scan period mode */
|
||||
u_int8_t page_scan_mode; /* page scan mode */
|
||||
u_int8_t class[NG_HCI_CLASS_SIZE]; /* unit class */
|
||||
u_int16_t clock_offset; /* clock offset */
|
||||
} __attribute__ ((packed)) ng_hci_inquiry_response;
|
||||
|
||||
#define NG_HCI_EVENT_CON_COMPL 0x03
|
||||
typedef struct {
|
||||
u_int8_t status; /* 0x00 - success */
|
||||
|
@ -146,14 +146,7 @@ wait_for_more:
|
||||
static void
|
||||
hci_inquiry_response(int n, uint8_t **b)
|
||||
{
|
||||
struct inquiry_response {
|
||||
bdaddr_t bdaddr;
|
||||
uint8_t page_scan_rep_mode;
|
||||
uint8_t page_scan_period_mode;
|
||||
uint8_t page_scan_mode;
|
||||
uint8_t class[NG_HCI_CLASS_SIZE];
|
||||
uint16_t clock_offset;
|
||||
} *ir = (struct inquiry_response *)(*b);
|
||||
ng_hci_inquiry_response *ir = (ng_hci_inquiry_response *)(*b);
|
||||
|
||||
fprintf(stdout, "Inquiry result #%d\n", n);
|
||||
fprintf(stdout, "\tBD_ADDR: %s\n", hci_bdaddr2str(&ir->bdaddr));
|
||||
|
Loading…
x
Reference in New Issue
Block a user