From: "Marcel J.E. Mol" <marcel@mesa.nl>
To: linux-bluetooth@vger.kernel.org
Subject: obexd TARGET_SIZE question
Date: Sun, 18 Jul 2010 22:04:29 +0200 [thread overview]
Message-ID: <20100718200429.GB17706@joshua.mesa.nl> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset*=utf-8''%E2%80%9Cus-ascii, Size: 1699 bytes --]
Hi,
I'm trying to understand a part of the obexd code, to see if somehow a
IrMC server can be implemented. Pierre Ossman already started a bit on this.
I am a bit confused about the obex_mime_type driver structure.
The find_driver() function does a memcmp0(target, driver->target, TARGET_SIZE),
but it seems not all drivers have target of size TARGET_SIZE.
The syncevolution plugin has a target of size 11 (whereas TARGET_SIZE=16).
So the find_driver() probably fails the memcmp0 for this driver as
the extra 5 bytes to compare my be undefined...
A IrMC Sync target will have a target_size of 9.
I also noticed the obex_service_driver, which is handled in a similar
way as the rbex_mime_type_driver. Forrest added a target_size element
in for this struct (commit b38537e5f12decc4b2444112f4363ff1aa5326c6):
Forrest Zhao [Mon, 16 Nov 2009 07:17:47 +0000]
Introduce target_size to struct obex_service_driver{}
Because the OBEX target header length for each OBEX service layer
may not be the same.
Shouldn't the same happen for the obex_mime_type_driver() ?
(actually Pierre Ossman did this in his local obexd tree to test IrMC
which also has a different target size, I copied these changes in
a clone of obexd 0.29)
-Marcel
--
======-------- Marcel J.E. Mol MESA Consulting B.V.
=======--------- ph. +31-(0)6-54724868 P.O. Box 112
=======--------- marcel@mesa.nl 2630 AC Nootdorp
__==== www.mesa.nl ---____U_n_i_x______I_n_t_e_r_n_e_t____ The Netherlands ____
They couldn't think of a number, Linux user 1148 -- counter.li.org
so they gave me a name! -- Rupert Hine -- www.ruperthine.com
next reply other threads:[~2010-07-18 20:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-18 20:04 Marcel J.E. Mol [this message]
2010-07-18 21:29 ` obexd TARGET_SIZE question 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=20100718200429.GB17706@joshua.mesa.nl \
--to=marcel@mesa.nl \
--cc=linux-bluetooth@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox