public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Collin R. Mulliner" <collin@betaversion.net>
To: bluez-devel@lists.sf.net
Subject: [Bluez-devel] L2CAP raw socket patch
Date: Tue, 10 Feb 2004 12:49:42 +0100	[thread overview]
Message-ID: <20040210124942.393a6da0.collin@betaversion.net> (raw)

[-- 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;

             reply	other threads:[~2004-02-10 11:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-10 11:49 Collin R. Mulliner [this message]
2004-02-10 22:16 ` [Bluez-devel] L2CAP raw socket patch 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040210124942.393a6da0.collin@betaversion.net \
    --to=collin@betaversion.net \
    --cc=bluez-devel@lists.sf.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox