btsocket: add support for connect()

The original code was written to allow binding to the HCI Control
socket of a specific adapter, and the Kernel mgmt_ops control socket,
and receiving OOB data using recvmsg().

It was then extended to deal with the missing support for the L2CAP,
RFCOMM and SCO address types when binding and creating a server-side
socket.

This now adds support for connecting to L2CAP, RFCOMM and SCO sockets
on remote devices.

BUG=none
TEST=s.connect(...) on a socket created by btsocket.socket()

Change-Id: I6a935d2311c6118135e9ea8ec015564091b67023
2 files changed
tree: ac1bfbac11516d653dba1e7fdbfab569c14aba1f
  1. btsocket/
  2. src/
  3. .gitignore
  4. LICENSE
  5. PRESUBMIT.cfg
  6. setup.py