All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Anderson Lizardo <anderson.lizardo@openbossa.org>,
	Claudio Takahasi <claudio.takahasi@openbossa.org>,
	linux-bluetooth@vger.kernel.org,
	Marcel Holtmann <marcel@holtmann.org>
Subject: Re: [RFC v2 00/14] Store UUID-128 on host order
Date: Mon, 21 Feb 2011 13:54:31 -0300	[thread overview]
Message-ID: <20110221165431.GA9130@jh-x301> (raw)
In-Reply-To: <AANLkTimR3cpHEVBUOrPH9LRnmszNdmfg37hN__PWkYUQ@mail.gmail.com>

Hi Luiz,

On Mon, Feb 21, 2011, Luiz Augusto von Dentz wrote:
> > Just throwing my own bits on this: I think making the internal
> > representation for uuid_t consistent is important to avoid bugs when
> > handling the different UUID types.
> >
> > currently uuid_t stores 16/32-bit uuids and 128-bit uuid differently.
> 
> The problem is not the internal representation, but things like this:
> 
> -       sdp_uuid128_create(&svclass_uuid, SYNCMLC_UUID);
> +       ntoh128(SYNCMLC_UUID, &h128);
> +       sdp_uuid128_create(&svclass_uuid, &h128);
> 
> This means the API has changed, it now takes host order where it used
> to be network order. We could have a new function e.g.
> sdp_uuid128h_create to handle such cases and not break existing
> applications using this API.

In this particular case the prefix sdp_ already implies that this is for
SDP and shouldn't be used in other code. I think what makes sense (and
Marcel supported it in IRC) is to a new bt_uuid_t struct and bt_uuid_*
helper functions which internally store everything in host byte order.
Then in the first phase we can make the ATT code use the new API and
later in a second phase start converting existing SDP code to use it.

Johan

  reply	other threads:[~2011-02-21 16:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18 22:29 [RFC v2 00/14] Store UUID-128 on host order Claudio Takahasi
2011-02-18 22:29 ` [RFC v2 01/14] Move 64 and 128 bits byte order functions to bluetooth.h Claudio Takahasi
2011-02-22 17:16   ` Anderson Lizardo
2011-02-18 22:29 ` [RFC v2 02/14] Use host byte order when converting UUID16/32 to UUID128 Claudio Takahasi
2011-02-18 22:50   ` Anderson Lizardo
2011-02-18 22:29 ` [RFC v2 03/14] Add att_get_u128 Claudio Takahasi
2011-02-22 17:24   ` Anderson Lizardo
2011-02-18 22:29 ` [RFC v2 04/14] Convert UUID128 value to host order when extracting SDP data Claudio Takahasi
2011-02-18 22:29 ` [RFC v2 05/14] Convert to network order before use it on sdp_uuid128_to_uuid Claudio Takahasi
2011-02-19  0:53   ` Anderson Lizardo
2011-02-18 22:29 ` [RFC v2 06/14] Convert from host to network order before to print UUID128 values Claudio Takahasi
2011-02-18 22:29 ` [RFC v2 07/14] Convert from network to host order on bt_string2uuid function Claudio Takahasi
2011-02-18 22:29 ` [RFC v2 08/14] Change UUID128 host order on SDP PDU generation function Claudio Takahasi
2011-02-18 22:29 ` [RFC v2 09/14] Replace UUID128 values from char array to uint128_t on sdptool Claudio Takahasi
2011-02-19  0:50   ` Anderson Lizardo
2011-02-18 22:29 ` [RFC v2 10/14] Create UUID128 on host order " Claudio Takahasi
2011-02-19  0:57   ` Anderson Lizardo
2011-02-18 22:29 ` [RFC v2 11/14] Change SDP XML parser to create UUID128 values on host order Claudio Takahasi
2011-02-18 22:29 ` [RFC v2 12/14] Convert from little endian to host order when parsing EIR data Claudio Takahasi
2011-02-18 22:29 ` [RFC v2 13/14] Add att_put_u128 Claudio Takahasi
2011-02-22 17:27   ` Anderson Lizardo
2011-02-18 22:29 ` [RFC v2 14/14] Change Attribute example to create UUID128 on host order Claudio Takahasi
2011-02-19  1:24   ` Anderson Lizardo
2011-02-18 23:51 ` [RFC v2 00/14] Store UUID-128 " Elvis Pfützenreuter
2011-02-19  1:29 ` Anderson Lizardo
2011-02-19 18:07 ` Luiz Augusto von Dentz
2011-02-21 13:14   ` Claudio Takahasi
2011-02-21 13:43     ` Anderson Lizardo
2011-02-21 13:52       ` Luiz Augusto von Dentz
2011-02-21 16:54         ` Johan Hedberg [this message]
2011-02-21 18:37           ` Luiz Augusto von Dentz

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=20110221165431.GA9130@jh-x301 \
    --to=johan.hedberg@gmail.com \
    --cc=anderson.lizardo@openbossa.org \
    --cc=claudio.takahasi@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    /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.