libhci

Iain Hibbert plunky at rya-online.net
Sat Feb 14 01:53:26 PST 2009


On Fri, 13 Feb 2009, Maksim Yevmenkin wrote:

> i kinda started to work on hci/bluetooth shims. please take a look at
> the attached patch. this is basically to implement bt_devname() and
> bt_devaddr() similar to netbsd and i also added bt_hci_devinfo() and
> bt_hci_devenum() inspired by linux-bluez.

some quick comments as I'm on battery and ENOTIME

- I think it should lose the "_hci" part of the name :)

- count = bt_devenum(cb, arg)

   no limits in API (no objection to underlying implementation limit :)
   the callback can signal, if it has seen enough.
   (could allow callback=NULL to just count the devices)

- len = bt_devinfo(name, buffer, sizeof(buffer))

   the calling program gives buffer and size, allowing the devinfo to
   be extended later without breaking ABI.
   len == 0 means not found
   also, reserved slots in the structure become unnecessary, let the
   compiler handle padding.
   (size and name could be passed in devinfo?)
   (is variable size struct perhaps too ugly to handle? what about
   'version' field?)

iain


More information about the freebsd-bluetooth mailing list