public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] L2CAP raw socket patch
@ 2004-02-10 11:49 Collin R. Mulliner
  2004-02-10 22:16 ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Collin R. Mulliner @ 2004-02-10 11:49 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

Hi List,

I have written a small patch for l2cap.c to improve the capabilities of
L2CAP raw sockets. Currently only very few responses travel back to a
RAW socket (which is very bad if you need to see command responses).
The patch is very simple - it just puts all responses on the
Sig-Channel to all open RAW sockets. The owner of the raw socket just
needs to select his packets and in normal operation there shouldn't be
much use of RAW sockets so I don't think this is a performance issue.

I have attached the patch file to this email, hope this is ok.


thanks ... Collin

-- 
Collin Mulliner <collin@betaversion.net>
BATAVERSiON Systems [www.betaversion.net]
Don't ask why! Ask why not!


[-- Attachment #2: bluez_l2cap_rawsocket.patch --]
[-- Type: application/octet-stream, Size: 864 bytes --]

--- orig/l2cap.c	2003-08-25 13:44:44.000000000 +0200
+++ l2cap.c	2004-02-09 14:35:13.000000000 +0100
@@ -1663,6 +1663,12 @@
 			break;
 		}
 
+		/*  
+		 *  for better low-level access
+		 *  put command to all raw sockets
+		 */
+		l2cap_raw_recv(conn, skb);
+
 		switch (cmd.code) {
 		case L2CAP_CONN_REQ:
 			err = l2cap_connect_req(conn, &cmd, data);
@@ -1688,21 +1694,10 @@
 			err = l2cap_disconnect_rsp(conn, &cmd, data);
 			break;
 
-		case L2CAP_COMMAND_REJ:
-			/* FIXME: We should process this */
-			l2cap_raw_recv(conn, skb);
-			break;
-
 		case L2CAP_ECHO_REQ:
 			l2cap_send_rsp(conn, cmd.ident, L2CAP_ECHO_RSP, cmd.len, data);
 			break;
 
-		case L2CAP_ECHO_RSP:
-		case L2CAP_INFO_REQ:
-		case L2CAP_INFO_RSP:
-			l2cap_raw_recv(conn, skb);
-			break;
-
 		default:
 			BT_ERR("Uknown signaling command 0x%2.2x", cmd.code);
 			err = -EINVAL;

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-02-22 15:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-10 11:49 [Bluez-devel] L2CAP raw socket patch Collin R. Mulliner
2004-02-10 22:16 ` Marcel Holtmann
     [not found]   ` <20040210232330.4cf4935d.collin@betaversion.net>
2004-02-10 22:32     ` Marcel Holtmann
2004-02-10 23:07       ` Collin R. Mulliner
2004-02-22 15:31         ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox