From: "Frédéric DALLEAU" <frederic.dalleau@access-company.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] pan profile sdp record
Date: Thu, 22 Feb 2007 10:53:01 +0100 [thread overview]
Message-ID: <45DD67FD.8050307@access-company.com> (raw)
In-Reply-To: <1172077056.7403.40.camel@violet>
[-- Attachment #1: Type: text/plain, Size: 173 bytes --]
Marcel,
> for an initial patch, I think we only change sdp.c with appropriate
> default values to make it specification conform.
>
Here is new patch proposal.
Frédéric
[-- Attachment #2: pand-sdp.patch --]
[-- Type: text/x-patch, Size: 3303 bytes --]
? Doxyfile
? Makefile.in
? aclocal.m4
? autom4te.cache
? bluezutils.kdevelop
? bluezutils.kdevelop.pcs
? bluezutils.kdevses
? config.guess
? config.h.in
? config.sub
? configure
? debug
? depcomp
? install-sh
? ltmain.sh
? missing
? stamp-h.in
? alsa/Makefile.in
? audio/Makefile.in
? common/Makefile.in
? cups/Makefile.in
? daemon/Makefile.in
? daemon/bt.echod
? daemon/service-agent-glue.h
? dund/Makefile.in
? eglib/Makefile.in
? fuse/Makefile.in
? hcid/Makefile.in
? hidd/Makefile.in
? input/Makefile.in
? network/Makefile.in
? pand/Makefile.in
? print/Makefile.in
? rfcomm/Makefile.in
? rfcomm/cvs
? sbc/Makefile.in
? scripts/Makefile.in
? sdpd/Makefile.in
? serial/Makefile.in
? sync/Makefile.in
? test/Makefile.in
? tools/Makefile.in
? transfer/Makefile.in
Index: pand/sdp.c
===================================================================
RCS file: /cvsroot/bluez/utils/pand/sdp.c,v
retrieving revision 1.8
diff -u -r1.8 sdp.c
--- pand/sdp.c 13 Jan 2007 17:48:25 -0000 1.8
+++ pand/sdp.c 22 Feb 2007 09:39:44 -0000
@@ -53,6 +53,20 @@
sdp_close(session);
}
+static void add_lang_attr(sdp_record_t *r)
+{
+ sdp_lang_attr_t base_lang;
+ sdp_list_t *langs = 0;
+
+ /* UTF-8 MIBenum (http://www.iana.org/assignments/character-sets) */
+ base_lang.code_ISO639 = (0x65 << 8) | 0x6e;
+ base_lang.encoding = 106;
+ base_lang.base_offset = SDP_PRIMARY_LANG_BASE;
+ langs = sdp_list_append(0, &base_lang);
+ sdp_set_lang_attr(r, langs);
+ sdp_list_free(langs, 0);
+}
+
int bnep_sdp_register(bdaddr_t *device, uint16_t role)
{
sdp_list_t *svclass, *pfseq, *apseq, *root, *aproto;
@@ -61,6 +75,11 @@
sdp_list_t *proto[2];
sdp_data_t *v, *p;
uint16_t psm = 15, version = 0x0100;
+ uint16_t security_desc = 0;
+ uint16_t net_access_type = 0xFFFE;
+ uint32_t max_net_access_rate = 0;
+ char *name = "BlueZ PAN";
+ char *desc = "BlueZ PAN Service";
int status;
session = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, 0);
@@ -118,12 +137,16 @@
aproto = sdp_list_append(NULL, apseq);
sdp_set_access_protos(record, aproto);
+
+ add_lang_attr(record);
+
sdp_list_free(proto[0], NULL);
sdp_list_free(proto[1], NULL);
sdp_list_free(apseq, NULL);
sdp_list_free(aproto, NULL);
sdp_data_free(p);
sdp_data_free(v);
+ sdp_attr_add_new(record, SDP_ATTR_SECURITY_DESC, SDP_UINT16, &security_desc);
switch (role) {
case BNEP_SVC_NAP:
@@ -136,7 +159,10 @@
pfseq = sdp_list_append(NULL, &profile[0]);
sdp_set_profile_descs(record, pfseq);
- sdp_set_info_attr(record, "Network Access Point", NULL, NULL);
+ sdp_set_info_attr(record, "Network Access Point", name, desc);
+
+ sdp_attr_add_new(record, SDP_ATTR_NET_ACCESS_TYPE, SDP_UINT16, &net_access_type);
+ sdp_attr_add_new(record, SDP_ATTR_MAX_NET_ACCESSRATE, SDP_UINT32, &max_net_access_rate);
break;
case BNEP_SVC_GN:
@@ -149,7 +175,7 @@
pfseq = sdp_list_append(NULL, &profile[0]);
sdp_set_profile_descs(record, pfseq);
- sdp_set_info_attr(record, "Group Network Service", NULL, NULL);
+ sdp_set_info_attr(record, "Group Network Service", name, desc);
break;
case BNEP_SVC_PANU:
@@ -164,7 +190,7 @@
sdp_set_profile_descs(record, pfseq);
sdp_list_free(pfseq, 0);
- sdp_set_info_attr(record, "PAN User", NULL, NULL);
+ sdp_set_info_attr(record, "PAN User", name, desc);
break;
}
[-- Attachment #3: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- 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
next prev parent reply other threads:[~2007-02-22 9:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-20 15:55 [Bluez-devel] pan profile sdp record Frédéric DALLEAU
2007-02-21 0:33 ` [Bluez-devel] Service API Denis KENZIOR
2007-02-21 9:20 ` Marcel Holtmann
2007-02-21 12:06 ` [Bluez-devel] pan profile sdp record Marcel Holtmann
2007-02-21 15:38 ` Frédéric DALLEAU
2007-02-21 15:51 ` Marcel Holtmann
2007-02-21 16:42 ` Frédéric DALLEAU
2007-02-21 16:57 ` Marcel Holtmann
2007-02-22 9:53 ` Frédéric DALLEAU [this message]
2007-02-26 0:01 ` 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=45DD67FD.8050307@access-company.com \
--to=frederic.dalleau@access-company.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox