Merge branch 'vendor/XZ' into HEAD
[dragonfly.git] / usr.bin / sdpquery / sdpquery.1
1 .\" $NetBSD: sdpquery.1,v 1.8 2007/02/17 09:39:11 wiz Exp $
2 .\" $DragonFly: src/usr.bin/sdpquery/sdpquery.1,v 1.1 2008/02/08 14:06:25 hasso Exp $
3 .\"
4 .\" Copyright (c) 2006 Itronix Inc.
5 .\" All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 3. The name of Itronix Inc. may not be used to endorse
16 .\"    or promote products derived from this software without specific
17 .\"    prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
23 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 .\" ON ANY THEORY OF LIABILITY, WHETHER IN
27 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 .\" POSSIBILITY OF SUCH DAMAGE.
30 .\"
31 .\" Copyright (c) 2003 Maksim Yevmenkin <m_evmenkin@yahoo.com>
32 .\" All rights reserved.
33 .\"
34 .\" Redistribution and use in source and binary forms, with or without
35 .\" modification, are permitted provided that the following conditions
36 .\" are met:
37 .\" 1. Redistributions of source code must retain the above copyright
38 .\"    notice, this list of conditions and the following disclaimer.
39 .\" 2. Redistributions in binary form must reproduce the above copyright
40 .\"    notice, this list of conditions and the following disclaimer in the
41 .\"    documentation and/or other materials provided with the distribution.
42 .\"
43 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
44 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
45 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
46 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
47 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
48 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
49 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 .\" SUCH DAMAGE.
54 .\"
55 .\" $Id: sdpquery.1,v 1.8 2007/02/17 09:39:11 wiz Exp $
56 .\" $FreeBSD: src/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8,v 1.6 2005/07/09 19:04:43 markus Exp $
57 .\"
58 .Dd February 17, 2007
59 .Dt SDPQUERY 1
60 .Os
61 .Sh NAME
62 .Nm sdpquery
63 .Nd SDP query utility
64 .Sh SYNOPSIS
65 .Nm
66 .Fl h
67 .Nm
68 .Op Fl d Ar device
69 .Fl a Ar address
70 .Ar command
71 .Op Ar parameters ...
72 .Nm
73 .Op Fl c Ar path
74 .Fl l
75 .Ar command
76 .Op Ar parameters ...
77 .Sh DESCRIPTION
78 The
79 .Nm
80 utility attempts to query the specified Service Discovery Protocol
81 (SDP) server.
82 Remote SDP servers are identified by their address.
83 Connection to the local SDP server is made via the control socket.
84 The
85 .Nm
86 utility uses Service Search Attribute Requests and prints results to
87 standard output and error messages to standard error.
88 .Pp
89 The options are as follows:
90 .Bl -tag -width ".Fl a Ar address"
91 .It Fl a Ar address
92 Connect to the remote device with the specified address.
93 The address can be specified as BD_ADDR or a name.
94 If a name was specified, the
95 .Nm
96 utility attempts to resolve the name via
97 .Xr bt_gethostbyname 3 .
98 If no remote address is given,
99 .Nm
100 attempts to contact a local SDP server via the control socket.
101 .It Fl c Ar path
102 Specify path to the control socket.
103 The default path is
104 .Pa /var/run/sdp .
105 .It Fl d Ar device
106 Connect from the local device with the specifed address.
107 The device can be specified by BD_ADDR or device name.
108 See
109 .Xr btconfig 8
110 for a list of devices available.
111 If no device is specified, the
112 .Nm
113 utility will use the best available.
114 .It Fl l
115 Query the local SDP server via the control socket.
116 .It Fl h
117 Display usage message and exit.
118 .El
119 .Pp
120 The currently supported commands in
121 .Nm
122 are:
123 .Pp
124 .Bl -tag -width ".Cm search Ar service" -compact
125 .It Cm Browse Op Ar group
126 Browse for services.
127 The
128 .Ar group
129 parameter is a 16-bit UUID of the group to browse.
130 If omitted, the Public Browse Group. is used.
131 .Pp
132 .It Cm Search Ar service
133 Search for the
134 .Ar service .
135 The
136 .Ar service
137 parameter is a 16-bit UUID of the service to search for.
138 For the following services it is possible to use service name
139 instead of service UUID:
140 .Pp
141 .Bl -tag -compact
142 .It CIP
143 Common ISDN Access
144 .It CTP
145 Cordless Telephony
146 .It DUN
147 DialUp Networking
148 .It FAX
149 Fax
150 .It FTRN
151 OBEX File Transfer
152 .It GN
153 Group ad-hoc Network
154 .It HID
155 Human Interface Device
156 .It HF
157 Handsfree
158 .It HSET
159 Headset
160 .It LAN
161 LAN Access Using PPP
162 .It NAP
163 Network Access Point
164 .It OPUSH
165 OBEX Object Push
166 .It PANU
167 Personal Area Networking User
168 .It SP
169 Serial Port
170 .El
171 .El
172 .Sh EXIT STATUS
173 .Ex -std
174 .Sh SEE ALSO
175 .Xr bluetooth 3 ,
176 .Xr sdp 3 ,
177 .Xr btconfig 8 ,
178 .Xr sdpd 8
179 .Sh HISTORY
180 The
181 .Nm
182 command first appeared in
183 .Fx 5.3
184 as
185 .Nm sdpcontrol .
186 It was ported to
187 .Nx 4.0
188 under its present name by
189 .An Iain Hibbert
190 under the sponsorship of Itronix, Inc and imported into
191 .Dx 1.11 .
192 .Sh AUTHORS
193 .An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
194 .An Iain Hibbert
195 for Itronix, Inc.
196 .Sh CAVEATS
197 The
198 .Nm
199 utility only requests the following attributes from the SDP server:
200 .Pp
201 .Bl -enum -offset indent -compact
202 .It
203 Service Record Handle
204 .It
205 Service Class ID List
206 .It
207 Protocol Descriptor List
208 .It
209 Bluetooth Profile Descriptor List
210 .El