summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bluetooth
diff options
context:
space:
mode:
authoremax <emax@FreeBSD.org>2004-08-05 16:32:41 +0000
committeremax <emax@FreeBSD.org>2004-08-05 16:32:41 +0000
commitc114a6212c8d37d1e410305436dd847a4270ca3b (patch)
tree6ef9a102c06ce353d524074a6e33e485a88f1c21 /usr.sbin/bluetooth
parent73d1afd6fde41cc69bc50752883e40b6fd763b5c (diff)
downloadFreeBSD-src-c114a6212c8d37d1e410305436dd847a4270ca3b.zip
FreeBSD-src-c114a6212c8d37d1e410305436dd847a4270ca3b.tar.gz
- One can use both BD_ADDR or name to specify address of the Bluetooth device.
Update man pages to document this fact. - Update usage messages - Change u_intXXX to uintXXX
Diffstat (limited to 'usr.sbin/bluetooth')
-rw-r--r--usr.sbin/bluetooth/bthidd/bthidd.c2
-rw-r--r--usr.sbin/bluetooth/hccontrol/hccontrol.87
-rw-r--r--usr.sbin/bluetooth/hccontrol/host_controller_baseband.c14
-rw-r--r--usr.sbin/bluetooth/hccontrol/link_control.c6
-rw-r--r--usr.sbin/bluetooth/hccontrol/link_policy.c6
-rw-r--r--usr.sbin/bluetooth/hcsecd/parser.y6
-rw-r--r--usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.816
-rw-r--r--usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c2
-rw-r--r--usr.sbin/bluetooth/sdpcontrol/sdpcontrol.816
-rw-r--r--usr.sbin/bluetooth/sdpcontrol/sdpcontrol.c2
10 files changed, 47 insertions, 30 deletions
diff --git a/usr.sbin/bluetooth/bthidd/bthidd.c b/usr.sbin/bluetooth/bthidd/bthidd.c
index 0782a36..2a0206b 100644
--- a/usr.sbin/bluetooth/bthidd/bthidd.c
+++ b/usr.sbin/bluetooth/bthidd/bthidd.c
@@ -243,7 +243,7 @@ usage(void)
fprintf(stderr,
"Usage: %s [options]\n" \
"Where options are:\n" \
-" -a bdaddr specify BDADDR to listen on (default ANY)\n" \
+" -a address specify address to listen on (default ANY)\n" \
" -c file specify config file name\n" \
" -d run in foreground\n" \
" -H file specify known HIDs file name\n" \
diff --git a/usr.sbin/bluetooth/hccontrol/hccontrol.8 b/usr.sbin/bluetooth/hccontrol/hccontrol.8
index 559b5f6..65cc53f 100644
--- a/usr.sbin/bluetooth/hccontrol/hccontrol.8
+++ b/usr.sbin/bluetooth/hccontrol/hccontrol.8
@@ -69,6 +69,12 @@ To get more information about specific command use
.Cm help Ar command .
.It Ar parameters
One or more optional space separated command parameters.
+Many commands require remote device address as one of the parameters.
+The remote device address can be specified as BD_ADDR or name.
+If name was specified then the
+.Nm
+utility will attempt to resolve the name via
+.Xr bt_gethostbyname 3 .
.El
.Sh COMMANDS
The currently supported HCI commands in
@@ -168,6 +174,7 @@ Please report if found.
.Sh DIAGNOSTICS
.Ex -std
.Sh SEE ALSO
+.Xr bluetooth 3 ,
.Xr netgraph 3 ,
.Xr netgraph 4 ,
.Xr ng_hci 4 ,
diff --git a/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c b/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c
index 5998e5c..38f77eb 100644
--- a/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c
+++ b/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c
@@ -1513,32 +1513,32 @@ struct hci_command host_controller_baseband_commands[] = {
&hci_write_pin_type
},
{
-"read_stored_link_key [<bdaddr>]",
+"read_stored_link_key [<BD_ADDR>]",
"\nThe Read_Stored_Link_Key command provides the ability to read one or\n" \
"more link keys stored in the Bluetooth Host Controller. The Bluetooth Host\n" \
"Controller can store a limited number of link keys for other Bluetooth\n" \
"devices.\n\n" \
-"\t<bdaddr> - xx:xx:xx:xx:xx:xx BD_ADDR",
+"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name",
&hci_read_stored_link_key
},
{
-"write_stored_link_key <bdaddr> <key>",
+"write_stored_link_key <BD_ADDR> <key>",
"\nThe Write_Stored_Link_Key command provides the ability to write one\n" \
"or more link keys to be stored in the Bluetooth Host Controller. The\n" \
"Bluetooth Host Controller can store a limited number of link keys for other\n"\
"Bluetooth devices. If no additional space is available in the Bluetooth\n"\
"Host Controller then no additional link keys will be stored.\n\n" \
-"\t<bdaddr> - xx:xx:xx:xx:xx:xx BD_ADDR\n" \
-"\t<key> - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx up to 16 bytes link key",
+"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name\n" \
+"\t<key> - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx up to 16 bytes link key",
&hci_write_stored_link_key
},
{
-"delete_stored_link_key [<bdaddr>]",
+"delete_stored_link_key [<BD_ADDR>]",
"\nThe Delete_Stored_Link_Key command provides the ability to remove one\n" \
"or more of the link keys stored in the Bluetooth Host Controller. The\n" \
"Bluetooth Host Controller can store a limited number of link keys for other\n"\
"Bluetooth devices.\n\n" \
-"\t<bdaddr> - xx:xx:xx:xx:xx:xx BD_ADDR",
+"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name",
&hci_delete_stored_link_key
},
{
diff --git a/usr.sbin/bluetooth/hccontrol/link_control.c b/usr.sbin/bluetooth/hccontrol/link_control.c
index 34dae7b..b90ce00 100644
--- a/usr.sbin/bluetooth/hccontrol/link_control.c
+++ b/usr.sbin/bluetooth/hccontrol/link_control.c
@@ -831,7 +831,7 @@ struct hci_command link_control_commands[] = {
{
"create_connection <BD_ADDR> <pkt> <rep_mode> <ps_mode> <clck_off> <role_sw>",
"" \
-"\t<BD_ADDR> - remote unit address\n\n" \
+"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name\n\n" \
"\t<pkt> - xxxx; packet type\n" \
"" \
"\t\tACL packets\n" \
@@ -929,10 +929,10 @@ struct hci_command link_control_commands[] = {
&hci_change_connection_packet_type
},
{
-"remote_name_request <bdaddr> <ps_rep_mode> <ps_mode> <clock_offset>",
+"remote_name_request <BD_ADDR> <ps_rep_mode> <ps_mode> <clock_offset>",
"\nThe Remote_Name_Request command is used to obtain the user-friendly\n" \
"name of another Bluetooth unit.\n\n" \
-"\t<bdaddr> - xx:xx:xx:xx:xx:xx remote unit BD_ADDR\n" \
+"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name\n" \
"\t<ps_rep_mode> - dd; page scan repetition mode [0-2]\n" \
"\t<ps_mode> - dd; page scan mode [0-3]\n" \
"\t<clock_offset> - xxxx; clock offset [0 - 0xffff]",
diff --git a/usr.sbin/bluetooth/hccontrol/link_policy.c b/usr.sbin/bluetooth/hccontrol/link_policy.c
index e00bac5..67b32d5 100644
--- a/usr.sbin/bluetooth/hccontrol/link_policy.c
+++ b/usr.sbin/bluetooth/hccontrol/link_policy.c
@@ -251,7 +251,7 @@ struct hci_command link_policy_commands[] = {
&hci_role_discovery
},
{
-"switch_role <bdaddr> <role>",
+"switch_role <BD_ADDR> <role>",
"\nThe Switch_Role command is used for a Bluetooth device to switch the\n" \
"current role the device is performing for a particular connection with\n" \
"another specified Bluetooth device. The BD_ADDR command parameter indicates\n"\
@@ -259,8 +259,8 @@ struct hci_command link_policy_commands[] = {
"the requested new role that the local device performs. Note: the BD_ADDR\n" \
"command parameter must specify a Bluetooth device for which a connection\n"
"already exists.\n\n" \
-"\t<bdaddr> - xx:xx:xx:xx:xx:xx; device bdaddr\n" \
-"\t<role> - dd; role; 0 - Master, 1 - Slave",
+"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name\n" \
+"\t<role> - dd; role; 0 - Master, 1 - Slave",
&hci_switch_role
},
{
diff --git a/usr.sbin/bluetooth/hcsecd/parser.y b/usr.sbin/bluetooth/hcsecd/parser.y
index d2e3696..634d37a 100644
--- a/usr.sbin/bluetooth/hcsecd/parser.y
+++ b/usr.sbin/bluetooth/hcsecd/parser.y
@@ -106,7 +106,7 @@ option: bdaddr
bdaddr: T_BDADDR T_BDADDRSTRING
{
if (!bt_aton($2, &key->bdaddr)) {
- syslog(LOG_ERR, "Cound not parse BDADDR " \
+ syslog(LOG_ERR, "Cound not parse BD_ADDR " \
"'%s'", $2);
exit(1);
}
@@ -134,7 +134,7 @@ key: T_KEY T_HEXSTRING
if (key->key != NULL)
free(key->key);
- key->key = (u_int8_t *) malloc(NG_HCI_KEY_SIZE);
+ key->key = (uint8_t *) malloc(NG_HCI_KEY_SIZE);
if (key->key == NULL) {
syslog(LOG_ERR, "Could not allocate new " \
"link key");
@@ -318,7 +318,7 @@ read_keys_file(void)
continue;
if (key->key == NULL) {
- key->key = (u_int8_t *) malloc(NG_HCI_KEY_SIZE);
+ key->key = (uint8_t *) malloc(NG_HCI_KEY_SIZE);
if (key->key == NULL) {
syslog(LOG_ERR, "Could not allocate link key");
exit(1);
diff --git a/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8 b/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8
index 207f471..bba4016 100644
--- a/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8
+++ b/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8
@@ -35,14 +35,14 @@
.Nm
.Fl c
.Op Fl dh
-.Fl a Ar BD_ADDR
+.Fl a Ar address
.Fl C Ar channel
.Fl l Ar label
.Fl u Ar N
.Nm
.Fl s
.Op Fl dhS
-.Op Fl a Ar BD_ADDR
+.Op Fl a Ar address
.Fl C Ar channel
.Fl l Ar label
.Sh DESCRIPTION
@@ -92,14 +92,19 @@ the standard serial port thus providing network connectivity to remote clients.
.Pp
The options are as follows:
.Bl -tag -width indent
-.It Fl a Ar BD_ADDR
-In the client mode, this required option specifies the remote BD_ADDR of the
+.It Fl a Ar address
+In the client mode, this required option specifies the address of the remote
RFCOMM server.
In the server mode, this option can be used to specify the local
-BD_ADDR to listen on.
+address to listen on.
By default, server will listen on
.Dv ANY
address.
+The address can be specified as BD_ADDR or name.
+If name was specified then the
+.Nm
+utility will attempt to resolve the name via
+.Xr bt_gethostbyname 3 .
.It Fl C Ar channel
In both client and server modes, this required option specifies RFCOMM channel
to connect to or listen on.
@@ -312,6 +317,7 @@ If local SDP daemon is not running the
utility will exit with error.
.Sh SEE ALSO
.Xr rfcomm_sppd 1 ,
+.Xr bluetooth 3 ,
.Xr ng_btsocket 4 ,
.Xr ppp 8 ,
.Xr sdpcontrol 8 ,
diff --git a/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c b/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c
index d8881c0..79c48c1 100644
--- a/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c
+++ b/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c
@@ -434,7 +434,7 @@ usage(void)
fprintf(stdout,
"Usage: %s options\n" \
"Where options are:\n" \
-"\t-a bdaddr BDADDR to listen on or connect to (required for client)\n" \
+"\t-a address Address to listen on or connect to (required for client)\n" \
"\t-c Act as a clinet (default)\n" \
"\t-C channel RFCOMM channel to listen on or connect to (required)\n" \
"\t-d Run in foreground\n" \
diff --git a/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 b/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8
index 1478aee..1f75eea 100644
--- a/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8
+++ b/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8
@@ -35,7 +35,7 @@
.Nm
.Fl h
.Nm
-.Fl a Ar BD_ADDR
+.Fl a Ar address
.Ar command
.Op Ar parameters ...
.Nm
@@ -47,7 +47,7 @@
The
.Nm
utility attempts to query specified Service Discovery Protocol (SDP) server.
-Remote SDP servers are identified by their BD_ADDRs.
+Remote SDP servers are identified by their address.
Connection to the local SDP server is made via control socket.
The
.Nm
@@ -56,10 +56,13 @@ the standard output and error messages to the standard error.
.Pp
The options are as follows:
.Bl -tag -width indent
-.It Fl a Ar BD_ADDR
-Connect to the remote device with the specified BD_ADDR.
-Example:
-.Fl a Li 00:01:02:03:04:05 .
+.It Fl a Ar address
+Connect to the remote device with the specified address.
+The address can be specified as BD_ADDR or name.
+If name was specified then the
+.Nm
+utility will attempt to resolve the name via
+.Xr bt_gethostbyname 3 .
.It Fl c Ar path
Specify path to the control socket.
The default path is
@@ -109,6 +112,7 @@ Bluetooth Profile Descriptor List
.Sh DIAGNOSTICS
.Ex -std
.Sh SEE ALSO
+.Xr bluetooth 3 ,
.Xr sdp 3
.Sh AUTHORS
.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
diff --git a/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.c b/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.c
index 6cb4863..fca2015 100644
--- a/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.c
+++ b/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.c
@@ -209,7 +209,7 @@ usage(void)
fprintf(stderr,
"Usage: sdpcontrol options command\n" \
"Where options are:\n"
-" -a bdaddr specify bdaddr\n" \
+" -a address address to connect to\n" \
" -c path path to the control socket (default is %s)\n" \
" -h display usage and quit\n" \
" -l connect to the local SDP server via control socket\n" \
OpenPOWER on IntegriCloud