Subject: Re: Bluetooth update
To: Iain Hibbert <email@example.com>
From: Hubert Feyrer <firstname.lastname@example.org>
Date: 12/18/2005 11:02:04
On Sat, 17 Dec 2005, Iain Hibbert wrote:
> 2. I removed the libbt code that I had, and substituted libbluetooth from
> FreeBSD more or less directly (just fixed few linty complaints) which
> brings the need (?) for an /etc/bluetooth directory - etc/Makefile looked
> very complex, and I didnt want to burn my fingers there.. how to add that
> (if its desireable)?
Put sources in src/etc/bluetooth, and have a Makefile in there with an
'install' target, then call this from src/etc/Makefile's install-etc-files
target - see the examples for the "mtree" and "defaults" directories.
> 3. reading the style guide, it says use getopt (and presumably
> getopt_long) - I didnt in btconfig, because I had it in mind to use
> btconfig <device> pscan (enable pscan)
> btconfig <device> -pscan (disable pscan)
> but I am wavering on that...
> btconfig --device <device> --pscan (enable pscan)
> btconfig -d <device> --pscan=off (disable pscan)
> might be preferable and is not difficult though not as easy to type (using
> --pscan to enable seems counter intuitive to me :)
Seeing all those comments about --long options - if that code comes from
(e.g.) FreeBSD, it's probably not so good changing the user interface and
rather keep it as it is. Even if it's ugly.
> 4. Initially I used 134/135/136 for protocol numbers for bluetooth
> protocol family because they were the next available ones in
> /etc/protocols and also were the numbers that FreeBSD used. I think this
> was misapplied now though after importing libbt and snooping about, seems
> that /etc/protocols is merely for IP protocols and there is no real
> intersection, so I've reverted to 1/2/3 - I dont think we have a generic
> file anywhere containing a list of protocol family/numbers ?
If you mean the 3rd parameter to socket(2) by "protocol number", then at
least the socket(2) manpage points to protocols(5) as source for that,
which is /etc/protocols.
SUSv3 just says it's "implementation-defined"
Again following prior art here may be good. Are there other systems than
FreeBSD which can be looked at? What do they do?