From owner-freebsd-bluetooth@FreeBSD.ORG Sat Feb 14 09:53:25 2009 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92ABE1065674 for ; Sat, 14 Feb 2009 09:53:25 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smtp01.one2one.net (smtp01.one2one.net [149.254.200.196]) by mx1.freebsd.org (Postfix) with ESMTP id 275FE8FC15 for ; Sat, 14 Feb 2009 09:53:19 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from [127.0.0.1] (helo=localhost) by smtpbarns01 with esmtp (Exim 4.50) id 1LYHCv-0004Xl-Nm; Sat, 14 Feb 2009 09:53:09 +0000 Received: from smtpbarns01 ([127.0.0.1]) by localhost (smtpbarns01 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17357-04; Sat, 14 Feb 2009 09:53:09 +0000 (GMT) Received: from [10.33.144.213] (helo=rya-online.net) by smtpbarns01 with smtp (Exim 4.50) id 1LYHCt-0004Xg-3I; Sat, 14 Feb 2009 09:53:09 +0000 Received: (nullmailer pid 692 invoked by uid 1000); Sat, 14 Feb 2009 09:52:59 -0000 Date: Sat, 14 Feb 2009 09:52:58 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: References: <1233365217.00068654.1233354838@10.7.7.3> <4988DCCC.80201@mavhome.dp.ua> <4988EBAC.3080202@mavhome.dp.ua> <1233758519.360141.162.nullmailer@galant.ukfsn.org> <1233845167.798942.24919.nullmailer@galant.ukfsn.org> <1233919880.530235.10843.nullmailer@galant.ukfsn.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1234605178.990729.799.nullmailer@galant.ukfsn.org> From: Iain Hibbert X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at example.com X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: plunky@rya-online.net X-SA-Exim-Scanned: No (on smtpbarns01); SAEximRunCond expanded to false Cc: "freebsd-bluetooth@freebsd.org" Subject: Re: libhci X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2009 09:53:26 -0000 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