summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Panter <vadmium>2015-09-09 06:47:58 (GMT)
committerMartin Panter <vadmium>2015-09-09 06:47:58 (GMT)
commitd1a98587fe3bc60985c6d6c36b8cf52f1f57750b (patch)
tree3ac074a566101b91f867a78a26b5a67e04fc91a9
parent9499413508b7ff4e7806f8f8e59ba9176d98b39c (diff)
downloadcpython-d1a98587fe3bc60985c6d6c36b8cf52f1f57750b.zip
cpython-d1a98587fe3bc60985c6d6c36b8cf52f1f57750b.tar.gz
cpython-d1a98587fe3bc60985c6d6c36b8cf52f1f57750b.tar.bz2
Issue #24984: Document AF_BLUETOOTH socket address formats
Patch from Tim Tisdall.
-rw-r--r--Doc/library/socket.rst26
-rw-r--r--Misc/ACKS1
2 files changed, 25 insertions, 2 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 827191e..d78705c 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -103,8 +103,30 @@ created. Socket addresses are represented as follows:
.. versionadded:: 3.3
-- Certain other address families (:const:`AF_BLUETOOTH`, :const:`AF_PACKET`,
- :const:`AF_CAN`) support specific representations.
+- :const:`AF_BLUETOOTH` supports the following protocols and address
+ formats:
+
+ - :const:`BTPROTO_L2CAP` accepts ``(bdaddr, psm)`` where ``bdaddr`` is
+ the Bluetooth address as a string and ``psm`` is an integer.
+
+ - :const:`BTPROTO_RFCOMM` accepts ``(bdaddr, channel)`` where ``bdaddr``
+ is the Bluetooth address as a string and ``channel`` is an integer.
+
+ - :const:`BTPROTO_HCI` accepts ``(device_id,)`` where ``device_id`` is
+ either an integer or a string with the Bluetooth address of the
+ interface. (This depends on your OS; NetBSD and DragonFlyBSD expect
+ a Bluetooth address while everything else expects an integer.)
+
+ .. versionchanged:: 3.2
+ NetBSD and DragonFlyBSD support added.
+
+ - :const:`BTPROTO_SCO` accepts ``bdaddr`` where ``bdaddr`` is a
+ :term:`bytes-like object` containing the Bluetooth address in a
+ string format. (ex. ``b'12:23:34:45:56:67'``) This protocol is not
+ supported under FreeBSD.
+
+- Certain other address families (:const:`AF_PACKET`, :const:`AF_CAN`)
+ support specific representations.
.. XXX document them!
diff --git a/Misc/ACKS b/Misc/ACKS
index 84fd499..1a00ae3 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1385,6 +1385,7 @@ Eric Tiedemann
July Tikhonov
Tracy Tims
Oren Tirosh
+Tim Tisdall
Jason Tishler
Christian Tismer
Jim Tittsler