From owner-freebsd-bluetooth@FreeBSD.ORG Sun Jun 11 11:32:53 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D7CC16A418 for ; Sun, 11 Jun 2006 11:32:53 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from mail.ukfsn.org (s2.ukfsn.org [217.158.120.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB3FB43D48 for ; Sun, 11 Jun 2006 11:32:51 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from rya-online.net (du213-130-142-15.as15444.net [213.130.142.15]) by mail.ukfsn.org (Postfix) with SMTP id F2AA4E6FD8 for ; Sun, 11 Jun 2006 12:23:07 +0100 (BST) Received: (nullmailer pid 1648 invoked by uid 1000); Sun, 11 Jun 2006 10:52:13 -0000 Date: Sun, 11 Jun 2006 11:52:13 +0100 (BST) To: freebsd-bluetooth@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1150023133.421908.1633.nullmailer@galant.ukfsn.org> From: Iain Hibbert Subject: SDP 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: Sun, 11 Jun 2006 11:32:53 -0000 Hi, in part of my work in Bluetooth for NetBSD* I just took the SDP implementation from FreeBSD direct to get a leg up and didnt look at it very much at first though I did make some changes, which basically comprised: 1. whitespace space-tab, whitespace at EOL, and empty line at EOF 2. lint errors and compiler warnings mostly warnings about casting and const which may not be errors in reality. I managed to remove all these though and now compile at WARNS=4 (for GCC3) 3. NetBSD does not have LOCAL_PEERCRED socket options, so I converted sdpd to use LOCAL_CREDS 4. I added something for Headset/Headset Audio Gateway profile. so what I have is still compatible at source level with FreeBSD. However, in adding the headset support I took a better look and I'm not sure I like the API exactly. I havent especially looked at the competing implementations, took a glance at the BlueZ one but they dont seem strong on documentation (and I didnt see any) and I'm hesitant to change the API as what we really dont need is yet another incompatible implementation. Some things I am uneasy with then: 1. sdp_open[_local]() may return a handle even though there is an error. Really, this is terrible! If there is an error in open, it should just return NULL and set errno accordingly. sdp_error() should not be necessary.. 2. to register a profile with the sdp daemon, the daemon itself must already know about the profile, even though its just a string of binary. It would be nice if a client program could just prepare this array and send it. 3. parsing results of an sdp query is annoyingly ugly, it would be nice if there was some lib function that could be used to extract values from the result in a generic way. So well, I'm not so sure if anybody else besides Max has done any work in this arena, but any input is good.. iain *latest archive is http://homepages.rya-online.net/plunky/netbt.32.tar.gz