diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-01-15 15:52:16 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-02-27 00:14:23 -0500 |
commit | c4f912e155504e94dd4f3d63c378dab0ff03dbda (patch) | |
tree | db544bdd0dfc8ca890193a29b161b551f20f543c /include/net/bluetooth/bluetooth.h | |
parent | d58daf42d29a3a4a4d4be46cf47ceee096789680 (diff) |
Bluetooth: Add global deferred socket parameter
The L2CAP and RFCOMM applications require support for authorization
and the ability of rejecting incoming connection requests. The socket
interface is not really able to support this.
This patch does the ground work for a socket option to defer connection
setup. Setting this option allows calling of accept() and then the
first read() will trigger the final connection setup. Calling close()
would reject the connection.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth/bluetooth.h')
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index a04f8463ac7e..847e9e6df08b 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -53,6 +53,8 @@ | |||
53 | #define SOL_SCO 17 | 53 | #define SOL_SCO 17 |
54 | #define SOL_RFCOMM 18 | 54 | #define SOL_RFCOMM 18 |
55 | 55 | ||
56 | #define BT_DEFER_SETUP 7 | ||
57 | |||
56 | #define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg) | 58 | #define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg) |
57 | #define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg) | 59 | #define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg) |
58 | #define BT_DBG(fmt, arg...) pr_debug("%s: " fmt "\n" , __func__ , ## arg) | 60 | #define BT_DBG(fmt, arg...) pr_debug("%s: " fmt "\n" , __func__ , ## arg) |
@@ -108,6 +110,7 @@ struct bt_sock { | |||
108 | bdaddr_t dst; | 110 | bdaddr_t dst; |
109 | struct list_head accept_q; | 111 | struct list_head accept_q; |
110 | struct sock *parent; | 112 | struct sock *parent; |
113 | u32 defer_setup; | ||
111 | }; | 114 | }; |
112 | 115 | ||
113 | struct bt_sock_list { | 116 | struct bt_sock_list { |