Hi Luiz, On Sat, Feb 19, 2011 at 6:07 PM, Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx> wrote: > Hi Claudio, > > On Sat, Feb 19, 2011 at 12:29 AM, Claudio Takahasi > <claudio.takahasi@xxxxxxxxxxxxx> wrote: >> It must NOT be included in the next release until proper testing. >> >> Any good soul wants to test it if I am not breaking SDP? >> >> The following patches convert the internal UUID128 values representation >> to host order. Currently, SDP functions use host order to store UUID-16 >> /UUID32 and network order to store UUID-128 values. The reason is to >> keep the consistency and re-use the UUID functions for ATT protocol >> which uses little endian. >> >> Changes from the first RFC: >> Â- Changes sdptool >> Â- Changes SDP XML parsing function >> Â- Changes attribute example >> >> Claudio Takahasi (14): >> ÂMove 64 and 128 bits byte order functions to bluetooth.h >> ÂUse host byte order when converting UUID16/32 to UUID128 >> ÂAdd att_get_u128 >> ÂConvert UUID128 value to host order when extracting SDP data >> ÂConvert to network order before use it on sdp_uuid128_to_uuid >> ÂConvert from host to network order before to print UUID128 values >> ÂConvert from network to host order on bt_string2uuid function >> ÂChange UUID128 host order on SDP PDU generation function >> ÂReplace UUID128 values from char array to uint128_t on sdptool >> ÂCreate UUID128 on host order on sdptool >> ÂChange SDP XML parser to create UUID128 values on host order >> ÂConvert from little endian to host order when parsing EIR data >> ÂAdd att_put_u128 >> ÂChange Attribute example to create UUID128 on host order >> >> Âattrib/att.c     |  16 ++++-- >> Âattrib/att.h     |  17 ++++++ >> Âattrib/example.c   |  24 +++++--- >> Âattrib/gatt.c    Â|  14 +++-- >> Âattrib/gatttool.c  Â|  Â6 ++- >> Âattrib/interactive.c |  Â1 + >> Âhealth/hdp_manager.c |  Â1 + >> Âhealth/mcap_sync.c  |  17 ------ >> Âlib/bluetooth.h   Â|  41 ++++++++++++++ >> Âlib/sdp.c      Â| Â108 ++++++++++++++----------------------- >> Âlib/sdp.h      Â|  Â4 -- >> Âsrc/event.c     Â|  Â6 +-- >> Âsrc/glib-helper.c  Â|  31 ++++++----- >> Âsrc/sdp-xml.c    Â|  74 +++++++++++-------------- >> Âtest/hciemu.c    Â|  16 ------ >> Âtools/sdptool.c   Â| Â145 ++++++++++++++++++++++++++++++------------------- >> Â16 files changed, 280 insertions(+), 241 deletions(-) >> >> -- >> 1.7.4.1 > > IMO it would be easier to have specific functions for uuid128 that can > take data in host order, so that we don't break existing API. Note > that the internal representation could be changed to host order, that > is fine, but then you convert the existing function to do the > conversion internally without breaking compatibility. > > -- > Luiz Augusto von Dentz > Computer Engineer > Yes, it is easier. It will be necessary to add a function to convert from little endian to big endian for ATT when the data is received. I am not changing the API, it changes only the internal representation(to host order) of the UUID128 values. We got "blessing" from Marcel to proceed with this change, but I can implement the easier solution ;-) Marcel/Johan: comments? BR, Claudio -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html