Index: head/etc/Makefile =================================================================== --- head/etc/Makefile +++ head/etc/Makefile @@ -142,9 +142,6 @@ echo "./var/db/services.db type=file mode=0644 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif -.if ${MK_BLUETOOTH} != "no" - ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install -.endif ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/mtree; ${MAKE} install Index: head/etc/bluetooth/Makefile =================================================================== --- head/etc/bluetooth/Makefile +++ head/etc/bluetooth/Makefile @@ -1,9 +0,0 @@ -# $Id: Makefile,v 1.2 2003/10/21 22:22:27 max Exp $ -# $FreeBSD$ - -FILESDIR= /etc/bluetooth -FILES= hcsecd.conf hosts protocols -FILESMODE_hcsecd.conf= 600 -FILESMODE_hosts= 644 - -.include Index: head/etc/bluetooth/hcsecd.conf =================================================================== --- head/etc/bluetooth/hcsecd.conf +++ head/etc/bluetooth/hcsecd.conf @@ -1,56 +0,0 @@ -# $Id: hcsecd.conf,v 1.1 2003/05/26 22:50:47 max Exp $ -# $FreeBSD$ -# -# HCI security daemon configuration file -# -# Format: -# -# device { -# option value ; -# } -# -# Possible options and values -# -# Options Values -# ---------------------------------- -# bdaddr xx:xx:xx:xx:xx:xx ; - remote device BD_ADDR -# name "any char" ; - to set user friendly device name -# key 0x11223344 | nokey ; - to set link key for the device -# pin "secret" | nopin ; - to PIN code for the device -# -# Notes: -# -# Currently there is no way to select keys/PIN code based on which -# local device received the request. Everything is based on remote -# device BD_ADDR. -# -# "nokey" means that no link key has been defined and we should -# send Link_Key_Negative_Reply command to the device. -# -# "nopin" means that no PIN code has been defined and we should -# send PIN_Code_Negative_Reply command to the device -# - -# Default entry is applied if no better match found -# It MUST have 00:00:00:00:00:00 as bdaddr -device { - bdaddr 00:00:00:00:00:00; - name "Default entry"; - key nokey; - pin nopin; -} - -device { - bdaddr 00:01:02:03:04:05; - name "Dummy"; - key nokey; - pin "0000"; -} - -device { - bdaddr 00:11:22:33:44:55; - name "Dummy"; - key 0x00112233445566778899aabbccddeeff; # 16 bytes key (hex string) - pin nopin; -} - Index: head/etc/bluetooth/hosts =================================================================== --- head/etc/bluetooth/hosts +++ head/etc/bluetooth/hosts @@ -1,10 +0,0 @@ -# $Id: hosts,v 1.1 2003/05/21 17:48:40 max Exp $ -# $FreeBSD$ -# -# Bluetooth Host Database -# -# This file should contain the Bluetooth addresses and aliases for hosts. -# -# BD_ADDR Name [ alias0 alias1 ... ] - -# 00:11:22:33:44:55 phone Index: head/etc/bluetooth/protocols =================================================================== --- head/etc/bluetooth/protocols +++ head/etc/bluetooth/protocols @@ -1,22 +0,0 @@ -# $Id: protocols,v 1.2 2003/05/21 22:17:14 max Exp $ -# $FreeBSD$ -# -# Bluetooth Protocol/Service Multiplexor (PSM) names and numbers -# -# See also -# https://www.bluetooth.org/foundry/assignnumb/document/assigned_numbers -# -# Protocol PSM Alias Reference - -sdp 1 SDP # Service Discovery Protocol -rfcomm 3 RFCOMM # RFCOMM with TS 07.10 -tcs-bin 5 TCS-BIN # Telephony Control Specification -tcs-bin-cordless 7 TCS-BIN-CORDLESS # Telephony Control Specification -bnep 15 BNEP # Bluetooth Network Encapsulation Protocol -hid-control 17 HID-Control # Human Interface Device (control) -hid-interrupt 19 HID-Interrupt # Human Interface Device (interrupt) -upnp 21 UPnP # See ESDP, Bluetooth SIG -avctp 23 AVCTP # Audio/Video Control Transport Protocol -avdtp 25 AVDTP # Audio/Video Distribution Transport Protocol -udi-c-plane 29 UDI-C-Plane # Unrestricted Digital Information Profile - Index: head/etc/defaults/Makefile =================================================================== --- head/etc/defaults/Makefile +++ head/etc/defaults/Makefile @@ -5,8 +5,4 @@ FILES= devfs.rules FILESDIR= /etc/defaults -.if ${MK_BLUETOOTH} != "no" -FILES+= bluetooth.device.conf -.endif - .include Index: head/etc/defaults/bluetooth.device.conf =================================================================== --- head/etc/defaults/bluetooth.device.conf +++ head/etc/defaults/bluetooth.device.conf @@ -1,111 +0,0 @@ -# Copyright (c) 2005 Maksim Yevmenkin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ - -# The authentication_enable parameter controls if the device requires to -# authenticate the remote device at connection setup. At connection setup, -# only the devices with the authentication_enable parameter enabled will -# try to authenticate the other device. -# -# Possible values: -# -# NO or 0 authentication disabled (default); -# YES or 1 authentication enabled. - -# authentication_enable="NO" - -# The class parameter is used to indicate the capabilities of the device to -# other devices. -# -# For more details see "Assigned Numbers - Bluetooth Baseband" document -# -# Possible value: -# -# xx:xx:xx where xx is a hex number - -# class="ff:01:0c" - -# The connectable parameter controls whether or not the device should -# periodically scan for page attempts from other devices. -# -# Possible values: -# -# NO or 0 do not scan for page attempts; -# YES or 1 scan for page attempts (default). - -# connectable="YES" - -# The discoverable parameter controls whether or not the device should -# periodically scan for inquiry requests from other devices. -# -# Possible values: -# -# NO or 0 do not scan for inquiry requests; -# YES or 1 scan for inquiry requests (default). - -# discoverable="NO" - -# The encryption_mode parameter controls if the device requires encryption -# to the remote device at connection setup. At connection setup, only the -# devices with the authentication_enable parameter enabled and encryption_mode -# parameter enabled will try to encrypt the connection to the other device. -# -# Possible values: -# -# NONE or 0 encryption disabled (default); -# P2P or 1 encryption only for point-to-point packets; -# ALL or 2 encryption for both point-to-point and broadcast packets. - -# encryption_mode="NONE" - -# HCI node debug level. Higher values mean more verbose output. -# -# Possible values: 0 - 4 - -# hci_debug_level="3" - -# L2CAP node debug level. Higher values mean more verbose output. -# -# Possible values: 0 - 4 - -# l2cap_debug_level="3" - -# The local_name parameter provides the ability to modify the user friendly -# name for the device. - -# local_name="My device" - -# The role_switch parameter controls whether the local device should perform -# role switch. By default, if role switch is supported, the local device will -# try to perform role switch and become Master on incoming connection. Some -# devices do not support role switch and thus incoming connections from such -# devices will fail. If role switch is disabled then accepting device will -# remain Slave. -# -# NO or 0 do not perform role switch; -# YES or 1 perform role switch (default). - -# role_switch="YES" - Index: head/lib/libbluetooth/Makefile =================================================================== --- head/lib/libbluetooth/Makefile +++ head/lib/libbluetooth/Makefile @@ -2,6 +2,9 @@ # $FreeBSD$ PACKAGE= lib${LIB} +CONFS= hosts protocols +CONFSDIR= /etc/bluetooth +CONFSMODE_protocols= 444 LIB= bluetooth MAN= bluetooth.3 Index: head/lib/libbluetooth/hosts =================================================================== --- head/lib/libbluetooth/hosts +++ head/lib/libbluetooth/hosts @@ -0,0 +1,10 @@ +# $Id: hosts,v 1.1 2003/05/21 17:48:40 max Exp $ +# $FreeBSD$ +# +# Bluetooth Host Database +# +# This file should contain the Bluetooth addresses and aliases for hosts. +# +# BD_ADDR Name [ alias0 alias1 ... ] + +# 00:11:22:33:44:55 phone Index: head/lib/libbluetooth/protocols =================================================================== --- head/lib/libbluetooth/protocols +++ head/lib/libbluetooth/protocols @@ -0,0 +1,22 @@ +# $Id: protocols,v 1.2 2003/05/21 22:17:14 max Exp $ +# $FreeBSD$ +# +# Bluetooth Protocol/Service Multiplexor (PSM) names and numbers +# +# See also +# https://www.bluetooth.org/foundry/assignnumb/document/assigned_numbers +# +# Protocol PSM Alias Reference + +sdp 1 SDP # Service Discovery Protocol +rfcomm 3 RFCOMM # RFCOMM with TS 07.10 +tcs-bin 5 TCS-BIN # Telephony Control Specification +tcs-bin-cordless 7 TCS-BIN-CORDLESS # Telephony Control Specification +bnep 15 BNEP # Bluetooth Network Encapsulation Protocol +hid-control 17 HID-Control # Human Interface Device (control) +hid-interrupt 19 HID-Interrupt # Human Interface Device (interrupt) +upnp 21 UPnP # See ESDP, Bluetooth SIG +avctp 23 AVCTP # Audio/Video Control Transport Protocol +avdtp 25 AVDTP # Audio/Video Distribution Transport Protocol +udi-c-plane 29 UDI-C-Plane # Unrestricted Digital Information Profile + Index: head/usr.sbin/bluetooth/hccontrol/Makefile =================================================================== --- head/usr.sbin/bluetooth/hccontrol/Makefile +++ head/usr.sbin/bluetooth/hccontrol/Makefile @@ -1,6 +1,8 @@ # $Id: Makefile,v 1.7 2003/08/14 20:06:17 max Exp $ # $FreeBSD$ +CONFS= bluetooth.device.conf +CONFSDIR= /etc/defaults PROG= hccontrol MAN= hccontrol.8 SRCS= send_recv.c link_policy.c link_control.c le.c\ Index: head/usr.sbin/bluetooth/hccontrol/bluetooth.device.conf =================================================================== --- head/usr.sbin/bluetooth/hccontrol/bluetooth.device.conf +++ head/usr.sbin/bluetooth/hccontrol/bluetooth.device.conf @@ -0,0 +1,111 @@ +# Copyright (c) 2005 Maksim Yevmenkin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +# The authentication_enable parameter controls if the device requires to +# authenticate the remote device at connection setup. At connection setup, +# only the devices with the authentication_enable parameter enabled will +# try to authenticate the other device. +# +# Possible values: +# +# NO or 0 authentication disabled (default); +# YES or 1 authentication enabled. + +# authentication_enable="NO" + +# The class parameter is used to indicate the capabilities of the device to +# other devices. +# +# For more details see "Assigned Numbers - Bluetooth Baseband" document +# +# Possible value: +# +# xx:xx:xx where xx is a hex number + +# class="ff:01:0c" + +# The connectable parameter controls whether or not the device should +# periodically scan for page attempts from other devices. +# +# Possible values: +# +# NO or 0 do not scan for page attempts; +# YES or 1 scan for page attempts (default). + +# connectable="YES" + +# The discoverable parameter controls whether or not the device should +# periodically scan for inquiry requests from other devices. +# +# Possible values: +# +# NO or 0 do not scan for inquiry requests; +# YES or 1 scan for inquiry requests (default). + +# discoverable="NO" + +# The encryption_mode parameter controls if the device requires encryption +# to the remote device at connection setup. At connection setup, only the +# devices with the authentication_enable parameter enabled and encryption_mode +# parameter enabled will try to encrypt the connection to the other device. +# +# Possible values: +# +# NONE or 0 encryption disabled (default); +# P2P or 1 encryption only for point-to-point packets; +# ALL or 2 encryption for both point-to-point and broadcast packets. + +# encryption_mode="NONE" + +# HCI node debug level. Higher values mean more verbose output. +# +# Possible values: 0 - 4 + +# hci_debug_level="3" + +# L2CAP node debug level. Higher values mean more verbose output. +# +# Possible values: 0 - 4 + +# l2cap_debug_level="3" + +# The local_name parameter provides the ability to modify the user friendly +# name for the device. + +# local_name="My device" + +# The role_switch parameter controls whether the local device should perform +# role switch. By default, if role switch is supported, the local device will +# try to perform role switch and become Master on incoming connection. Some +# devices do not support role switch and thus incoming connections from such +# devices will fail. If role switch is disabled then accepting device will +# remain Slave. +# +# NO or 0 do not perform role switch; +# YES or 1 perform role switch (default). + +# role_switch="YES" + Index: head/usr.sbin/bluetooth/hcsecd/Makefile =================================================================== --- head/usr.sbin/bluetooth/hcsecd/Makefile +++ head/usr.sbin/bluetooth/hcsecd/Makefile @@ -1,6 +1,8 @@ # $Id: Makefile,v 1.8 2003/08/14 20:06:20 max Exp $ # $FreeBSD$ +CONFS= hcsecd.conf +CONFSMODE_hcsecd.conf= 600 PROG= hcsecd MAN= hcsecd.8 hcsecd.conf.5 SRCS= hcsecd.c lexer.l parser.y Index: head/usr.sbin/bluetooth/hcsecd/hcsecd.conf =================================================================== --- head/usr.sbin/bluetooth/hcsecd/hcsecd.conf +++ head/usr.sbin/bluetooth/hcsecd/hcsecd.conf @@ -1,5 +1,4 @@ -# -# $Id: hcsecd.conf,v 1.1 2002/11/24 20:22:39 max Exp $ +# $Id: hcsecd.conf,v 1.1 2003/05/26 22:50:47 max Exp $ # $FreeBSD$ # # HCI security daemon configuration file @@ -25,14 +24,14 @@ # local device received the request. Everything is based on remote # device BD_ADDR. # -# "nokey" means that no link key has been defined and we should +# "nokey" means that no link key has been defined and we should # send Link_Key_Negative_Reply command to the device. # -# "nopin" means that no PIN code has been defined and we should +# "nopin" means that no PIN code has been defined and we should # send PIN_Code_Negative_Reply command to the device # -# Default entry applied if no better match found +# Default entry is applied if no better match found # It MUST have 00:00:00:00:00:00 as bdaddr device { bdaddr 00:00:00:00:00:00; @@ -42,15 +41,8 @@ } device { - bdaddr 00:80:37:5e:4d:d4; - name "Ericsson T68 phone"; - key nokey; - pin "0000"; # PIN code (string up to 16 character) -} - -device { - bdaddr 00:01:03:fc:6e:ec; - name "3COM PCCARD"; + bdaddr 00:01:02:03:04:05; + name "Dummy"; key nokey; pin "0000"; }