public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] [PATCH] bluez-libs UUID-128 support for Protocol Descriptor List
@ 2006-08-21 12:28 Markus Becker
  2006-08-23 17:35 ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Becker @ 2006-08-21 12:28 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1486 bytes --]

Hello Marcel et al.,

I've created a patch for bluez-libs/src/sdp.c to support the finding of
UUID128 encoded protocols. So that also kdebluetooth and others can
recognize those protocols. It changes the display of the Protocol
Descriptor List for example from:

Service Name: ATEmulator
Service RecHandle: 0x10010
Service Class ID List:
  "Error: This is UUID-128" (0x7dd6b763-99a9-4a92-87b5-bc8efe565c37)
  "Error: This is UUID-128" (0x00001101-0000-1000-8000-00805f9b34fb)
Protocol Descriptor List:
  "Error: " (0x00000100-0000-1000-8000-00805f9b34fb)
  "Error: " (0x00000003-0000-1000-8000-00805f9b34fb)
    Channel: 25

to:

Service Name: ATEmulator
Service RecHandle: 0x10010
Service Class ID List:
  UUID 128: 7dd6b763-99a9-4a92-87b5-bc8efe565c37
  UUID 128: 00001101-0000-1000-8000-00805f9b34fb
Protocol Descriptor List:
  "L2CAP" (0x00000100-0000-1000-8000-00805f9b34fb)
  "RFCOMM" (0x00000003-0000-1000-8000-00805f9b34fb)
    Channel: 25

Please consider it for integration into mainline bluez-libs.

Best regards,
Markus Becker

P.S.: When replying please CC me, because I'm not subscribed to the list.

------------------------------------------------
| Dipl.-Ing. Markus Becker 
| Communication Networks
| University Bremen
| Germany
------------------------------------------------
| web: http://www.comnets.uni-bremen.de/~mab/
| mailto: mab@comnets.uni-bremen.de 
| telephone: +49 421 218 2287
| building: NW1 room: N2260
------------------------------------------------

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1055 bytes --]

diff -u bluez-libs-3.2/src/sdp.c bluez-libs-3.2.mod/src/sdp.c
--- bluez-libs-3.2/src/sdp.c	2006-07-27 06:36:59.000000000 +0200
+++ bluez-libs-3.2.mod/src/sdp.c	2006-08-21 13:45:46.000000000 +0200
@@ -208,6 +208,25 @@
 	return "";
 }
 
+static char *string_lookup128(struct tupla *pt0, uint128_t index)
+{
+  	struct tupla *pt;
+
+	int i_index = index.data[0];
+	i_index = i_index <<8;
+	i_index += index.data[1];
+	i_index = i_index  <<8;
+	i_index += index.data[2];
+	i_index = i_index  <<8;
+	i_index += index.data[3];
+
+	for (pt = pt0; pt->index; pt++) {
+	  if (pt->index == i_index)
+	    return pt->str;
+	}
+	return "";
+}
+
 /*
  * Prints into a string the Protocol UUID
  * coping a maximum of n characters.
@@ -231,7 +250,8 @@
 		snprintf(str, n, str2);
 		break;
 	case SDP_UUID128:
-		snprintf(str, n, "Error: This is UUID-128");
+		str2 = string_lookup128(message, uuid->value.uuid128);
+		snprintf(str, n, str2);
 		return -4;
 	default:
 		snprintf(str, n, "Type of UUID (%x) unknown.", uuid->type);

[-- Attachment #3: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

end of thread, other threads:[~2006-08-24 14:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-21 12:28 [Bluez-devel] [PATCH] bluez-libs UUID-128 support for Protocol Descriptor List Markus Becker
2006-08-23 17:35 ` Marcel Holtmann
2006-08-24 10:35   ` Markus Becker
2006-08-24 14:43     ` Marcel Holtmann
2006-08-24 13:51       ` Markus Becker

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