From: Dimitry Andric <dimitry@andric.com>
To: Marcel Holtmann <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID
Date: Thu, 7 Apr 2005 14:08:38 +0200 [thread overview]
Message-ID: <1542380074.20050407140838@andric.com> (raw)
In-Reply-To: <1112714837.12406.51.camel@notepaq>
[-- Attachment #1: Type: text/plain, Size: 327 bytes --]
On 2005-04-05 at 17:27:17 Marcel Holtmann wrote:
> the patch is applied to the CVS. Maybe we should add another one to
> browse any UUID in general. Something like "--uuid 0x0003" for example.
Here is a patch that adds such an option. It will be interesting to
see what browse info is returned with various weird uuid's. :)
[-- Attachment #2: bluez-utils-2.15-sdpbrowse-uuid.patch --]
[-- Type: text/plain, Size: 1545 bytes --]
# bluez-utils-2.15-sdpbrowse-uuid.patch
#
# This patch adds a `--uuid' command line option to sdptool, to specify the
# uuid of an arbitrary protocol for browsing, instead of PUBLIC_BROWSE_GROUP.
# The uuid can be specified in decimal, hex (using a '0x' prefix) or octal
# (using a '0' prefix).
#
# Dimitry Andric <dimitry@andric.com>, 2005-04-07 13:59:21
Index: tools/sdptool.c
===================================================================
RCS file: /cvsroot/bluez/utils/tools/sdptool.c,v
retrieving revision 1.20
diff -u -d -r1.20 sdptool.c
--- tools/sdptool.c 5 Apr 2005 15:20:10 -0000 1.20
+++ tools/sdptool.c 7 Apr 2005 11:56:27 -0000
@@ -2097,12 +2097,13 @@
{ "help", 0,0, 'h' },
{ "tree", 0,0, 't' },
{ "l2cap", 0,0, 'l' },
+ { "uuid", 1,0, 'u' },
{ 0, 0, 0, 0 }
};
static char *browse_help =
"Usage:\n"
- "\tbrowse [--tree] [--l2cap] [bdaddr]\n";
+ "\tbrowse [--tree] [--l2cap] [--uuid uuid] [bdaddr]\n";
/*
* Browse the full SDP database (i.e. list all services starting from the
@@ -2112,6 +2113,7 @@
{
struct search_context context;
int opt;
+ int num;
/* Initialise context */
memset(&context, '\0', sizeof(struct search_context));
@@ -2126,6 +2128,13 @@
case 'l':
sdp_uuid16_create(&context.group, L2CAP_UUID);
break;
+ case 'u':
+ if (sscanf(optarg, "%i", &num) != 1 || num < 0 || num > 0xffff) {
+ printf("Invalid uuid %s\n", optarg);
+ return -1;
+ }
+ sdp_uuid16_create(&context.group, num);
+ break;
default:
printf(browse_help);
return -1;
next prev parent reply other threads:[~2005-04-07 12:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-04 15:16 [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID Dimitry Andric
2005-04-05 8:20 ` Johan Hedberg
2005-04-05 8:40 ` Peter Wippich
2005-04-05 15:27 ` Marcel Holtmann
2005-04-07 12:08 ` Dimitry Andric [this message]
2005-04-07 13:44 ` Marcel Holtmann
2005-04-07 19:19 ` Dimitry Andric
2005-04-11 16:22 ` 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=1542380074.20050407140838@andric.com \
--to=dimitry@andric.com \
--cc=bluez-devel@lists.sourceforge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.