Linux bluetooth development
 help / color / mirror / Atom feed
From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Stephen Crane <steve.crane@rococosoft.com>,
	BlueZ mailing list <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] [PATCH] More SDP UUIDs...
Date: Mon, 15 Sep 2003 15:16:24 -0700	[thread overview]
Message-ID: <20030915221624.GA17085@bougret.hpl.hp.com> (raw)

	Hi Stephen,

	I've just realised that you didn't keep the UUID and attribute
list of sdptool in sync. The patch below correct this.

	Also : I believe that having in the sdp library all the
functions xxx2str() (uuid2str, sdp_proto_uuid2strn...) and their
associated data (struct tupla ServiceClass...) is not
necessary.
	Realistically, only sdptool or a graphical equivalent would
use those functions, the vast majority of users of the library would
be like 'pand' and only create or search SDP records.
	Moving this functionality to sdptool would allow to reduce
further the size of the SDP library.

	Have fun...

	Jean

-------------------------------------------------------

--- listattr.s1.c	Mon Sep 15 11:59:20 2003
+++ listattr.c	Mon Sep 15 14:55:42 2003
@@ -9,7 +9,7 @@
 /************************** DOCUMENTATION **************************/
 /*
  * This code use a "brute force" approach to parsing SDP records.
- * Instead of a top down approach in sdptool, which pick only know
+ * Instead of a top down approach in sdptool, which pick only known
  * attributes/members, we use a bottom up approach, printing every
  * single bit of the record and trying to associate its defintion
  * to it.
@@ -79,20 +79,27 @@ static char *indent_spaces = "          
  * we need to find what is the service (which is messy) - Jean II */
 #define SERVICE_ATTR	0x1
 
-/* Defintion of the optional arguments in protocol list */
+/* Definition of the optional arguments in protocol list */
 static struct member_def protocol_members[] = {
   { "Protocol" },
   { "Channel/Port" },
   { "Version" },
 };
 
-/* Defintion of the optional arguments in profile list */
+/* Definition of the optional arguments in profile list */
 static struct member_def profile_members[] = {
   { "Profile" },
   { "Version" },
 };
 
-/* Name of the various attributes. See BT assigned numbers */
+/* Definition of the optional arguments in Language list */
+static struct member_def language_members[] = {
+  { "Code ISO639" },
+  { "Encoding" },
+  { "Base Offset" },
+};
+
+/* Name of the various common attributes. See BT assigned numbers */
 static struct attrib_def attrib_names[] = {
   { 0x0, "ServiceRecordHandle", NULL, 0 },
   { 0x1, "ServiceClassIDList", NULL, 0 },
@@ -101,7 +108,8 @@ static struct attrib_def attrib_names[] 
   { 0x4, "ProtocolDescriptorList",
     protocol_members, sizeof(protocol_members)/sizeof(struct member_def) },
   { 0x5, "BrowseGroupList", NULL, 0 },
-  { 0x6, "LanguageBaseAttributeIDList", NULL, 0 },
+  { 0x6, "LanguageBaseAttributeIDList",
+    language_members, sizeof(language_members)/sizeof(struct member_def) },
   { 0x7, "ServiceInfoTimeToLive", NULL, 0 },
   { 0x8, "ServiceAvailability", NULL, 0 },
   { 0x9, "BluetoothProfileDescriptorList",
@@ -126,6 +134,17 @@ static struct attrib_def browse_attrib_n
   { 0x200, "GroupID", NULL, 0 },
 };
 
+/* Name of the various PAN attributes. See BT assigned numbers */
+/* Note : those need to be double checked - Jean II */
+static struct attrib_def pan_attrib_names[] = {
+  { 0x200, "IpSubnet", NULL, 0 },		/* Obsolete ??? */
+  { 0x30A, "SecurityDescription", NULL, 0 },
+  { 0x30B, "NetAccessType", NULL, 0 },
+  { 0x30C, "MaxNetAccessrate", NULL, 0 },
+  { 0x30D, "IPv4Subnet", NULL, 0 },
+  { 0x30E, "IPv6Subnet", NULL, 0 },
+};
+
 /* Same for the UUIDs. See BT assigned numbers */
 static struct uuid_def uuid16_names[] = {
   /* -- Protocols -- */
@@ -165,12 +184,40 @@ static struct uuid_def uuid16_names[] = 
   { 0x1105, "OBEXObjectPush", NULL, 0 },
   { 0x1106, "OBEXFileTransfer", NULL, 0 },
   { 0x1107, "IrMCSyncCommand", NULL, 0 },
+  { 0x1108, "Headset", NULL, 0 },
+  { 0x1109, "CordlessTelephony", NULL, 0 },
   /* ... */
-  { 0x1115, "PANU (PAN/BNEP)", NULL, 0 },
-  { 0x1116, "NAP (PAN/BNEP)", NULL, 0 },
-  { 0x1117, "GN (PAN/BNEP)", NULL, 0 },
+  { 0x110F, "VideoConferencing", NULL, 0 },
+  { 0x1110, "Intercom", NULL, 0 },
+  { 0x1111, "Fax", NULL, 0 },
+  { 0x1112, "HeadsetAudioGateway", NULL, 0 },
+  { 0x1113, "WAP", NULL, 0 },
+  { 0x1114, "WAP_CLIENT", NULL, 0 },
+  { 0x1115, "PANU (PAN/BNEP)",
+    pan_attrib_names, sizeof(pan_attrib_names)/sizeof(struct attrib_def) },
+  { 0x1116, "NAP (PAN/BNEP)",
+    pan_attrib_names, sizeof(pan_attrib_names)/sizeof(struct attrib_def) },
+  { 0x1117, "GN (PAN/BNEP)",
+    pan_attrib_names, sizeof(pan_attrib_names)/sizeof(struct attrib_def) },
+  { 0x1118, "DirectPrinting (BPP)", NULL, 0 },
+  { 0x1119, "ReferencePrinting (BPP)", NULL, 0 },
   /* ... */
+  { 0x1120, "DirectPrintingReferenceObjectsService (BPP)", NULL, 0 },
+  { 0x1121, "ReflectedUI (BPP)", NULL, 0 },
+  { 0x1122, "BasicPrinting (BPP)", NULL, 0 },
+  { 0x1123, "PrintingStatus (BPP)", NULL, 0 },
+  { 0x1124, "HumanInterfaceDeviceService (HID)", NULL, 0 },
+  { 0x1125, "HardcopyCableReplacement (HCR)", NULL, 0 },
+  { 0x1126, "HCR_Print (HCR)", NULL, 0 },
+  { 0x1127, "HCR_Scan (HCR)", NULL, 0 },
   { 0x1128, "Common ISDN Access (CIP)", NULL, 0 },
+  { 0x1129, "VideoConferencingGW (VCP)", NULL, 0 },
+  /* ... */
+  { 0x1200, "PnPInformation", NULL, 0 },
+  { 0x1201, "GenericNetworking", NULL, 0 },
+  { 0x1202, "GenericFileTransfer", NULL, 0 },
+  { 0x1203, "GenericAudio", NULL, 0 },
+  { 0x1204, "GenericTelephony", NULL, 0 },
 };
 
 const int uuid16_max = sizeof(uuid16_names)/sizeof(struct uuid_def);
@@ -340,7 +387,6 @@ void sdp_data_printf(sdp_data_t *sdpdata
 	case SDP_ALT16:
 	case SDP_ALT32:
 		printf("%.*sData Sequence Alternates\n", indent, indent_spaces);
-		/* Not tested, and I believe it's bogus - Jean II */
 		printf_dataseq(sdpdata->val.dataseq, context, indent);
 		break;
 	}



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

             reply	other threads:[~2003-09-15 22:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-15 22:16 Jean Tourrilhes [this message]
2003-09-16 11:33 ` [Bluez-devel] [PATCH] More SDP UUIDs Marcel Holtmann
2003-09-16 13:03   ` David Woodhouse
2003-09-16 15:40     ` Fred Schättgen
2003-09-16 23:45       ` Marcel Holtmann
2003-09-17 11:34         ` Fred Schättgen
2003-09-19 16:52           ` Marcel Holtmann
2003-09-16 23:49     ` Marcel Holtmann
2003-09-17  6:22       ` David Woodhouse
2003-09-16 19:53   ` Jean Tourrilhes
2003-09-16 23:42     ` Marcel Holtmann
2003-09-17  0:06       ` Jean Tourrilhes
2003-09-17  0:28         ` Marcel Holtmann
2003-09-17  0:36           ` Jean Tourrilhes
2003-09-17  0:58             ` 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=20030915221624.GA17085@bougret.hpl.hp.com \
    --to=jt@bougret.hpl.hp.com \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=jt@hpl.hp.com \
    --cc=steve.crane@rococosoft.com \
    /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