Bluetooth: Add get_connections managment interface command

This patch adds a get_connections command to the management interface.
With this command userspace can get the current list of connected
devices. Typically this command would only be used once when enumerating
existing adapters. After that the connected and disconnected events are
used to track connections.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
Johan Hedberg
2011-01-21 13:56:35 +02:00
committed by Gustavo F. Padovan
parent 17d5c04cb5
commit 2784eb41b1
2 changed files with 82 additions and 0 deletions

View File

@@ -130,6 +130,16 @@ struct mgmt_rp_disconnect {
bdaddr_t bdaddr;
} __packed;
#define MGMT_OP_GET_CONNECTIONS 0x0010
struct mgmt_cp_get_connections {
__le16 index;
} __packed;
struct mgmt_rp_get_connections {
__le16 index;
__le16 conn_count;
bdaddr_t conn[0];
} __packed;
#define MGMT_EV_CMD_COMPLETE 0x0001
struct mgmt_ev_cmd_complete {
__le16 opcode;