linux/include/net/bluetooth
Mat Martineau 796c86eec8 Bluetooth: Add common code for stream-oriented recvmsg()
This commit adds a bt_sock_stream_recvmsg() function for use by any
Bluetooth code that uses SOCK_STREAM sockets.  This code is copied
from rfcomm_sock_recvmsg() with minimal modifications to remove
RFCOMM-specific functionality and improve readability.

L2CAP (with the SOCK_STREAM socket type) and RFCOMM have common needs
when it comes to reading data.  Proper stream read semantics require
that applications can read from a stream one byte at a time and not
lose any data.  The RFCOMM code already operated on and pulled data
from the underlying L2CAP socket, so very few changes were required to
make the code more generic for use with non-RFCOMM data over L2CAP.

Applications that need more awareness of L2CAP frame boundaries are
still free to use SOCK_SEQPACKET sockets, and may verify that they
connection did not fall back to basic mode by calling getsockopt().

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2010-10-12 12:44:51 -03:00
..
bluetooth.h Bluetooth: Add common code for stream-oriented recvmsg() 2010-10-12 12:44:51 -03:00
hci_core.h net: return operator cleanup 2010-09-23 14:33:39 -07:00
hci.h Bluetooth: HCI devices are either BR/EDR or AMP radios 2010-10-12 12:44:51 -03:00
l2cap.h net: return operator cleanup 2010-09-23 14:33:39 -07:00
rfcomm.h Bluetooth: Use __packed annotation 2010-07-21 10:39:13 -07:00
sco.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00