? 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; }