sdp.h revision 1.3 1 1.3 rillig /* $NetBSD: sdp.h,v 1.3 2022/04/19 20:32:14 rillig Exp $ */
2 1.1 plunky
3 1.1 plunky /*-
4 1.1 plunky * Copyright (c) 2006 Itronix Inc.
5 1.1 plunky * All rights reserved.
6 1.1 plunky *
7 1.1 plunky * Written by Iain Hibbert for Itronix Inc.
8 1.1 plunky *
9 1.1 plunky * Redistribution and use in source and binary forms, with or without
10 1.1 plunky * modification, are permitted provided that the following conditions
11 1.1 plunky * are met:
12 1.1 plunky * 1. Redistributions of source code must retain the above copyright
13 1.1 plunky * notice, this list of conditions and the following disclaimer.
14 1.1 plunky * 2. Redistributions in binary form must reproduce the above copyright
15 1.1 plunky * notice, this list of conditions and the following disclaimer in the
16 1.1 plunky * documentation and/or other materials provided with the distribution.
17 1.1 plunky * 3. The name of Itronix Inc. may not be used to endorse
18 1.1 plunky * or promote products derived from this software without specific
19 1.1 plunky * prior written permission.
20 1.1 plunky *
21 1.1 plunky * THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
22 1.1 plunky * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23 1.1 plunky * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 1.1 plunky * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
25 1.1 plunky * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 1.1 plunky * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 1.1 plunky * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28 1.1 plunky * ON ANY THEORY OF LIABILITY, WHETHER IN
29 1.1 plunky * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 1.1 plunky * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 1.1 plunky * POSSIBILITY OF SUCH DAMAGE.
32 1.1 plunky */
33 1.1 plunky /*
34 1.1 plunky * Copyright (c) 2001-2003, 2008 Maksim Yevmenkin <m_evmenkin (at) yahoo.com>
35 1.1 plunky * All rights reserved.
36 1.1 plunky *
37 1.1 plunky * Redistribution and use in source and binary forms, with or without
38 1.1 plunky * modification, are permitted provided that the following conditions
39 1.1 plunky * are met:
40 1.1 plunky * 1. Redistributions of source code must retain the above copyright
41 1.1 plunky * notice, this list of conditions and the following disclaimer.
42 1.1 plunky * 2. Redistributions in binary form must reproduce the above copyright
43 1.1 plunky * notice, this list of conditions and the following disclaimer in the
44 1.1 plunky * documentation and/or other materials provided with the distribution.
45 1.1 plunky *
46 1.1 plunky * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
47 1.1 plunky * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
48 1.1 plunky * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
49 1.1 plunky * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
50 1.1 plunky * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
51 1.1 plunky * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
52 1.1 plunky * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
53 1.1 plunky * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
54 1.1 plunky * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
55 1.1 plunky * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
56 1.1 plunky * SUCH DAMAGE.
57 1.1 plunky *
58 1.1 plunky * $FreeBSD: src/lib/libsdp/sdp.h,v 1.5 2005/05/27 19:11:33 emax Exp $
59 1.1 plunky */
60 1.1 plunky
61 1.1 plunky #ifndef _SDP_H_
62 1.1 plunky #define _SDP_H_
63 1.1 plunky
64 1.1 plunky #include <stdbool.h>
65 1.1 plunky #include <uuid.h>
66 1.1 plunky
67 1.1 plunky #include <bluetooth.h>
68 1.1 plunky
69 1.1 plunky /*
70 1.1 plunky * SDP Data Element types
71 1.1 plunky */
72 1.1 plunky
73 1.1 plunky #define SDP_DATA_TYPE(b) ((b) & 0xf8)
74 1.1 plunky #define SDP_DATA_SIZE(b) ((b) & 0x07)
75 1.1 plunky
76 1.1 plunky /* data size descriptors */
77 1.1 plunky #define SDP_DATA_8 0x00
78 1.1 plunky #define SDP_DATA_16 0x01
79 1.1 plunky #define SDP_DATA_32 0x02
80 1.1 plunky #define SDP_DATA_64 0x03
81 1.1 plunky #define SDP_DATA_128 0x04
82 1.1 plunky #define SDP_DATA_EXT8 0x05
83 1.1 plunky #define SDP_DATA_EXT16 0x06
84 1.1 plunky #define SDP_DATA_EXT32 0x07
85 1.1 plunky
86 1.1 plunky /* data type descriptors */
87 1.1 plunky #define SDP_DATA_NIL 0x00
88 1.1 plunky #define SDP_DATA_UINT 0x08
89 1.1 plunky #define SDP_DATA_INT 0x10
90 1.1 plunky #define SDP_DATA_UUID 0x18
91 1.1 plunky #define SDP_DATA_STR 0x20
92 1.1 plunky #define SDP_DATA_BOOL 0x28
93 1.1 plunky #define SDP_DATA_SEQ 0x30
94 1.1 plunky #define SDP_DATA_ALT 0x38
95 1.1 plunky #define SDP_DATA_URL 0x40
96 1.1 plunky
97 1.1 plunky /* Unsigned integer */
98 1.1 plunky #define SDP_DATA_UINT8 (SDP_DATA_UINT | SDP_DATA_8)
99 1.1 plunky #define SDP_DATA_UINT16 (SDP_DATA_UINT | SDP_DATA_16)
100 1.1 plunky #define SDP_DATA_UINT32 (SDP_DATA_UINT | SDP_DATA_32)
101 1.1 plunky #define SDP_DATA_UINT64 (SDP_DATA_UINT | SDP_DATA_64)
102 1.1 plunky #define SDP_DATA_UINT128 (SDP_DATA_UINT | SDP_DATA_128)
103 1.1 plunky
104 1.1 plunky /* Signed two's-complement integer */
105 1.1 plunky #define SDP_DATA_INT8 (SDP_DATA_INT | SDP_DATA_8)
106 1.1 plunky #define SDP_DATA_INT16 (SDP_DATA_INT | SDP_DATA_16)
107 1.1 plunky #define SDP_DATA_INT32 (SDP_DATA_INT | SDP_DATA_32)
108 1.1 plunky #define SDP_DATA_INT64 (SDP_DATA_INT | SDP_DATA_64)
109 1.1 plunky #define SDP_DATA_INT128 (SDP_DATA_INT | SDP_DATA_128)
110 1.1 plunky
111 1.1 plunky /* UUID, a universally unique identifier */
112 1.1 plunky #define SDP_DATA_UUID16 (SDP_DATA_UUID | SDP_DATA_16)
113 1.1 plunky #define SDP_DATA_UUID32 (SDP_DATA_UUID | SDP_DATA_32)
114 1.1 plunky #define SDP_DATA_UUID128 (SDP_DATA_UUID | SDP_DATA_128)
115 1.1 plunky
116 1.1 plunky /* Text string */
117 1.1 plunky #define SDP_DATA_STR8 (SDP_DATA_STR | SDP_DATA_EXT8)
118 1.1 plunky #define SDP_DATA_STR16 (SDP_DATA_STR | SDP_DATA_EXT16)
119 1.1 plunky #define SDP_DATA_STR32 (SDP_DATA_STR | SDP_DATA_EXT32)
120 1.1 plunky
121 1.1 plunky /* Data element sequence */
122 1.1 plunky #define SDP_DATA_SEQ8 (SDP_DATA_SEQ | SDP_DATA_EXT8)
123 1.1 plunky #define SDP_DATA_SEQ16 (SDP_DATA_SEQ | SDP_DATA_EXT16)
124 1.1 plunky #define SDP_DATA_SEQ32 (SDP_DATA_SEQ | SDP_DATA_EXT32)
125 1.1 plunky
126 1.1 plunky /* Data element alternative */
127 1.1 plunky #define SDP_DATA_ALT8 (SDP_DATA_ALT | SDP_DATA_EXT8)
128 1.1 plunky #define SDP_DATA_ALT16 (SDP_DATA_ALT | SDP_DATA_EXT16)
129 1.1 plunky #define SDP_DATA_ALT32 (SDP_DATA_ALT | SDP_DATA_EXT32)
130 1.1 plunky
131 1.1 plunky /* URL, a uniform resource locator */
132 1.1 plunky #define SDP_DATA_URL8 (SDP_DATA_URL | SDP_DATA_EXT8)
133 1.1 plunky #define SDP_DATA_URL16 (SDP_DATA_URL | SDP_DATA_EXT16)
134 1.1 plunky #define SDP_DATA_URL32 (SDP_DATA_URL | SDP_DATA_EXT32)
135 1.1 plunky
136 1.1 plunky /*
137 1.1 plunky * Protocol UUIDs (short alias version)
138 1.1 plunky *
139 1.1 plunky * BLUETOOTH BASE UUID 00000000-0000-1000-8000-00805F9B34FB
140 1.1 plunky */
141 1.1 plunky #define SDP_UUID_PROTOCOL_SDP 0x0001
142 1.1 plunky #define SDP_UUID_PROTOCOL_UDP 0x0002
143 1.1 plunky #define SDP_UUID_PROTOCOL_RFCOMM 0x0003
144 1.1 plunky #define SDP_UUID_PROTOCOL_TCP 0x0004
145 1.1 plunky #define SDP_UUID_PROTOCOL_TCS_BIN 0x0005
146 1.1 plunky #define SDP_UUID_PROTOCOL_TCS_AT 0x0006
147 1.1 plunky #define SDP_UUID_PROTOCOL_OBEX 0x0008
148 1.1 plunky #define SDP_UUID_PROTOCOL_IP 0x0009
149 1.1 plunky #define SDP_UUID_PROTOCOL_FTP 0x000A
150 1.1 plunky #define SDP_UUID_PROTOCOL_HTTP 0x000C
151 1.1 plunky #define SDP_UUID_PROTOCOL_WSP 0x000E
152 1.1 plunky #define SDP_UUID_PROTOCOL_BNEP 0x000F
153 1.1 plunky #define SDP_UUID_PROTOCOL_UPNP 0x0010
154 1.1 plunky #define SDP_UUID_PROTOCOL_HIDP 0x0011
155 1.1 plunky #define SDP_UUID_PROTOCOL_HARDCOPY_CONTROL_CHANNEL 0x0012
156 1.1 plunky #define SDP_UUID_PROTOCOL_HARDCOPY_DATA_CHANNEL 0x0014
157 1.1 plunky #define SDP_UUID_PROTOCOL_HARDCOPY_NOTIFICATION 0x0016
158 1.1 plunky #define SDP_UUID_PROTOCOL_AVCTP 0x0017
159 1.1 plunky #define SDP_UUID_PROTOCOL_AVDTP 0x0019
160 1.1 plunky #define SDP_UUID_PROTOCOL_CMPT 0x001B
161 1.1 plunky #define SDP_UUID_PROTOCOL_UDI_C_PLANE 0x001D
162 1.2 plunky #define SDP_UUID_PROTOCOL_MCAP_CONTROL_CHANNEL 0x001E
163 1.2 plunky #define SDP_UUID_PROTOCOL_MCAP_DATA_CHANNEL 0x001F
164 1.1 plunky #define SDP_UUID_PROTOCOL_L2CAP 0x0100
165 1.1 plunky
166 1.1 plunky /*
167 1.1 plunky * Service Class IDs
168 1.1 plunky */
169 1.1 plunky #define SDP_SERVICE_CLASS_SERVICE_DISCOVERY_SERVER 0x1000
170 1.1 plunky #define SDP_SERVICE_CLASS_BROWSE_GROUP_DESCRIPTOR 0x1001
171 1.1 plunky #define SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP 0x1002
172 1.1 plunky #define SDP_SERVICE_CLASS_SERIAL_PORT 0x1101
173 1.1 plunky #define SDP_SERVICE_CLASS_LAN_ACCESS_USING_PPP 0x1102
174 1.1 plunky #define SDP_SERVICE_CLASS_DIALUP_NETWORKING 0x1103
175 1.1 plunky #define SDP_SERVICE_CLASS_IR_MC_SYNC 0x1104
176 1.1 plunky #define SDP_SERVICE_CLASS_OBEX_OBJECT_PUSH 0x1105
177 1.1 plunky #define SDP_SERVICE_CLASS_OBEX_FILE_TRANSFER 0x1106
178 1.1 plunky #define SDP_SERVICE_CLASS_IR_MC_SYNC_COMMAND 0x1107
179 1.1 plunky #define SDP_SERVICE_CLASS_HEADSET 0x1108
180 1.1 plunky #define SDP_SERVICE_CLASS_CORDLESS_TELEPHONY 0x1109
181 1.1 plunky #define SDP_SERVICE_CLASS_AUDIO_SOURCE 0x110A
182 1.1 plunky #define SDP_SERVICE_CLASS_AUDIO_SINK 0x110B
183 1.1 plunky #define SDP_SERVICE_CLASS_AV_REMOTE_CONTROL_TARGET 0x110C
184 1.1 plunky #define SDP_SERVICE_CLASS_ADVANCED_AUDIO_DISTRIBUTION 0x110D
185 1.1 plunky #define SDP_SERVICE_CLASS_AV_REMOTE_CONTROL 0x110E
186 1.1 plunky #define SDP_SERVICE_CLASS_VIDEO_CONFERENCING 0x110F
187 1.1 plunky #define SDP_SERVICE_CLASS_INTERCOM 0x1110
188 1.1 plunky #define SDP_SERVICE_CLASS_FAX 0x1111
189 1.1 plunky #define SDP_SERVICE_CLASS_HEADSET_AUDIO_GATEWAY 0x1112
190 1.1 plunky #define SDP_SERVICE_CLASS_WAP 0x1113
191 1.1 plunky #define SDP_SERVICE_CLASS_WAP_CLIENT 0x1114
192 1.1 plunky #define SDP_SERVICE_CLASS_PANU 0x1115
193 1.1 plunky #define SDP_SERVICE_CLASS_NAP 0x1116
194 1.1 plunky #define SDP_SERVICE_CLASS_GN 0x1117
195 1.1 plunky #define SDP_SERVICE_CLASS_DIRECT_PRINTING 0x1118
196 1.1 plunky #define SDP_SERVICE_CLASS_REFERENCE_PRINTING 0x1119
197 1.1 plunky #define SDP_SERVICE_CLASS_IMAGING 0x111A
198 1.1 plunky #define SDP_SERVICE_CLASS_IMAGING_RESPONDER 0x111B
199 1.1 plunky #define SDP_SERVICE_CLASS_IMAGING_AUTOMATIC_ARCHIVE 0x111C
200 1.1 plunky #define SDP_SERVICE_CLASS_IMAGING_REFERENCED_OBJECTS 0x111D
201 1.1 plunky #define SDP_SERVICE_CLASS_HANDSFREE 0x111E
202 1.1 plunky #define SDP_SERVICE_CLASS_HANDSFREE_AUDIO_GATEWAY 0x111F
203 1.1 plunky #define SDP_SERVICE_CLASS_DIRECT_PRINTING_REFERENCE_OBJECTS 0x1120
204 1.1 plunky #define SDP_SERVICE_CLASS_REFLECTED_UI 0x1121
205 1.1 plunky #define SDP_SERVICE_CLASS_BASIC_PRINTING 0x1122
206 1.1 plunky #define SDP_SERVICE_CLASS_PRINTING_STATUS 0x1123
207 1.1 plunky #define SDP_SERVICE_CLASS_HUMAN_INTERFACE_DEVICE 0x1124
208 1.1 plunky #define SDP_SERVICE_CLASS_HARDCOPY_CABLE_REPLACEMENT 0x1125
209 1.1 plunky #define SDP_SERVICE_CLASS_HCR_PRINT 0x1126
210 1.1 plunky #define SDP_SERVICE_CLASS_HCR_SCAN 0x1127
211 1.1 plunky #define SDP_SERVICE_CLASS_COMMON_ISDN_ACCESS 0x1128
212 1.1 plunky #define SDP_SERVICE_CLASS_VIDEO_CONFERENCING_GW 0x1129
213 1.1 plunky #define SDP_SERVICE_CLASS_UDI_MT 0x112A
214 1.1 plunky #define SDP_SERVICE_CLASS_UDI_TA 0x112B
215 1.1 plunky #define SDP_SERVICE_CLASS_AUDIO_VIDEO 0x112C
216 1.1 plunky #define SDP_SERVICE_CLASS_SIM_ACCESS 0x112D
217 1.2 plunky #define SDP_SERVICE_CLASS_PHONEBOOK_ACCESS_PCE 0x112E
218 1.2 plunky #define SDP_SERVICE_CLASS_PHONEBOOK_ACCESS_PSE 0x112F
219 1.2 plunky #define SDP_SERVICE_CLASS_PHONEBOOK_ACCESS 0x1130
220 1.2 plunky #define SDP_SERVICE_CLASS_HEADSET_HS 0x1131
221 1.2 plunky #define SDP_SERVICE_CLASS_MESSAGE_ACCESS_SERVER 0x1132
222 1.2 plunky #define SDP_SERVICE_CLASS_MESSAGE_NOTIFICATION_SERVER 0x1133
223 1.2 plunky #define SDP_SERVICE_CLASS_MESSAGE_ACCESS_PROFILE 0x1134
224 1.1 plunky #define SDP_SERVICE_CLASS_PNP_INFORMATION 0x1200
225 1.1 plunky #define SDP_SERVICE_CLASS_GENERIC_NETWORKING 0x1201
226 1.1 plunky #define SDP_SERVICE_CLASS_GENERIC_FILE_TRANSFER 0x1202
227 1.1 plunky #define SDP_SERVICE_CLASS_GENERIC_AUDIO 0x1203
228 1.1 plunky #define SDP_SERVICE_CLASS_GENERIC_TELEPHONY 0x1204
229 1.1 plunky #define SDP_SERVICE_CLASS_UPNP 0x1205
230 1.1 plunky #define SDP_SERVICE_CLASS_UPNP_IP 0x1206
231 1.1 plunky #define SDP_SERVICE_CLASS_ESDP_UPNP_IP_PAN 0x1300
232 1.1 plunky #define SDP_SERVICE_CLASS_ESDP_UPNP_IP_LAP 0x1301
233 1.1 plunky #define SDP_SERVICE_CLASS_ESDP_UPNP_L2CAP 0x1302
234 1.2 plunky #define SDP_SERVICE_CLASS_VIDEO_SOURCE 0x1303
235 1.2 plunky #define SDP_SERVICE_CLASS_VIDEO_SINK 0x1304
236 1.2 plunky #define SDP_SERVICE_CLASS_VIDEO_DISTRIBUTION 0x1305
237 1.2 plunky #define SDP_SERVICE_CLASS_HDP 0x1400
238 1.2 plunky #define SDP_SERVICE_CLASS_HDP_SOURCE 0x1401
239 1.2 plunky #define SDP_SERVICE_CLASS_HDP_SINK 0x1402
240 1.1 plunky
241 1.1 plunky /*
242 1.1 plunky * Universal Attribute definitions valid in all service classes
243 1.1 plunky */
244 1.1 plunky #define SDP_ATTR_SERVICE_RECORD_HANDLE 0x0000
245 1.1 plunky #define SDP_ATTR_SERVICE_CLASS_ID_LIST 0x0001
246 1.1 plunky #define SDP_ATTR_SERVICE_RECORD_STATE 0x0002
247 1.1 plunky #define SDP_ATTR_SERVICE_ID 0x0003
248 1.1 plunky #define SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST 0x0004
249 1.1 plunky #define SDP_ATTR_BROWSE_GROUP_LIST 0x0005
250 1.1 plunky #define SDP_ATTR_LANGUAGE_BASE_ATTRIBUTE_ID_LIST 0x0006
251 1.1 plunky #define SDP_ATTR_SERVICE_INFO_TIME_TO_LIVE 0x0007
252 1.1 plunky #define SDP_ATTR_SERVICE_AVAILABILITY 0x0008
253 1.1 plunky #define SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST 0x0009
254 1.1 plunky #define SDP_ATTR_DOCUMENTATION_URL 0x000A
255 1.1 plunky #define SDP_ATTR_CLIENT_EXECUTABLE_URL 0x000B
256 1.1 plunky #define SDP_ATTR_ICON_URL 0x000C
257 1.1 plunky #define SDP_ATTR_ADDITIONAL_PROTOCOL_DESCRIPTOR_LISTS 0x000D
258 1.1 plunky /* 0x000E-0x01ff are reserved */
259 1.1 plunky
260 1.1 plunky /*
261 1.1 plunky * The offset must be added to the attribute ID base (contained in the
262 1.1 plunky * LANGUAGE_BASE_ATTRIBUTE_ID_LIST attribute value) in order to compute
263 1.1 plunky * the attribute ID for these attributes.
264 1.1 plunky * The primary language base is always 0x0100.
265 1.1 plunky */
266 1.1 plunky #define SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID 0x0100
267 1.1 plunky #define SDP_ATTR_SERVICE_NAME_OFFSET 0x0000
268 1.1 plunky #define SDP_ATTR_SERVICE_DESCRIPTION_OFFSET 0x0001
269 1.1 plunky #define SDP_ATTR_PROVIDER_NAME_OFFSET 0x0002
270 1.1 plunky
271 1.1 plunky /* ServiceDiscoveryServer profile attribute definitions */
272 1.1 plunky #define SDP_ATTR_VERSION_NUMBER_LIST 0x0200
273 1.1 plunky #define SDP_ATTR_SERVICE_DATABASE_STATE 0x0201
274 1.1 plunky
275 1.1 plunky /* BrowseGroupDescriptor profile attribute definitions */
276 1.1 plunky #define SDP_ATTR_GROUP_ID 0x0200
277 1.1 plunky
278 1.1 plunky /* Other profile attribute definitions */
279 1.1 plunky #define SDP_ATTR_IP_SUBNET 0x0200
280 1.2 plunky #define SDP_ATTR_SUPPORT_FEATURES_LIST 0x0200
281 1.1 plunky #define SDP_ATTR_SERVICE_VERSION 0x0300
282 1.2 plunky #define SDP_ATTR_DATA_EXCHANGE_SPECIFICATION 0x0301
283 1.1 plunky #define SDP_ATTR_EXTERNAL_NETWORK 0x0301
284 1.1 plunky #define SDP_ATTR_NETWORK 0x0301
285 1.1 plunky #define SDP_ATTR_SUPPORTED_DATA_STORES_LIST 0x0301
286 1.1 plunky #define SDP_ATTR_FAX_CLASS1_SUPPORT 0x0302
287 1.1 plunky #define SDP_ATTR_REMOTE_AUDIO_VOLUME_CONTROL 0x0302
288 1.2 plunky #define SDP_ATTR_MCAP_SUPPORTED_PROCEDURES 0x0302
289 1.1 plunky #define SDP_ATTR_FAX_CLASS20_SUPPORT 0x0303
290 1.1 plunky #define SDP_ATTR_SUPPORTED_FORMATS_LIST 0x0303
291 1.1 plunky #define SDP_ATTR_FAX_CLASS2_SUPPORT 0x0304
292 1.1 plunky #define SDP_ATTR_AUDIO_FEEDBACK_SUPPORT 0x0305
293 1.1 plunky #define SDP_ATTR_NETWORK_ADDRESS 0x0306
294 1.1 plunky #define SDP_ATTR_WAP_GATEWAY 0x0307
295 1.1 plunky #define SDP_ATTR_HOME_PAGE_URL 0x0308
296 1.1 plunky #define SDP_ATTR_WAP_STACK_TYPE 0x0309
297 1.1 plunky #define SDP_ATTR_SECURITY_DESCRIPTION 0x030A
298 1.1 plunky #define SDP_ATTR_NET_ACCESS_TYPE 0x030B
299 1.1 plunky #define SDP_ATTR_MAX_NET_ACCESS_RATE 0x030C
300 1.1 plunky #define SDP_ATTR_IPV4_SUBNET 0x030D
301 1.1 plunky #define SDP_ATTR_IPV6_SUBNET 0x030E
302 1.1 plunky #define SDP_ATTR_SUPPORTED_CAPABALITIES 0x0310
303 1.1 plunky #define SDP_ATTR_SUPPORTED_FEATURES 0x0311
304 1.1 plunky #define SDP_ATTR_SUPPORTED_FUNCTIONS 0x0312
305 1.1 plunky #define SDP_ATTR_TOTAL_IMAGING_DATA_CAPACITY 0x0313
306 1.2 plunky #define SDP_ATTR_SUPPORTED_REPOSITORIES 0x0314
307 1.2 plunky #define SDP_ATTR_MAS_INSTANCE_ID 0x0315
308 1.2 plunky #define SDP_ATTR_SUPPORTED_MESSAGE_TYPES 0x0316
309 1.1 plunky
310 1.1 plunky /*
311 1.1 plunky * Protocol Data Unit (PDU) header format
312 1.1 plunky */
313 1.1 plunky
314 1.1 plunky typedef struct {
315 1.1 plunky uint8_t pid; /* PDU ID - SDP_PDU_xxx */
316 1.1 plunky uint16_t tid; /* transaction ID */
317 1.1 plunky uint16_t len; /* parameters length (in bytes) */
318 1.1 plunky } __packed sdp_pdu_t;
319 1.1 plunky
320 1.1 plunky /* PDU IDs */
321 1.1 plunky #define SDP_PDU_ERROR_RESPONSE 0x01
322 1.1 plunky #define SDP_PDU_SERVICE_SEARCH_REQUEST 0x02
323 1.1 plunky #define SDP_PDU_SERVICE_SEARCH_RESPONSE 0x03
324 1.1 plunky #define SDP_PDU_SERVICE_ATTRIBUTE_REQUEST 0x04
325 1.1 plunky #define SDP_PDU_SERVICE_ATTRIBUTE_RESPONSE 0x05
326 1.1 plunky #define SDP_PDU_SERVICE_SEARCH_ATTRIBUTE_REQUEST 0x06
327 1.1 plunky #define SDP_PDU_SERVICE_SEARCH_ATTRIBUTE_RESPONSE 0x07
328 1.1 plunky
329 1.1 plunky /* Error codes for SDP_PDU_ERROR_RESPONSE */
330 1.1 plunky #define SDP_ERROR_CODE_INVALID_SDP_VERSION 0x0001
331 1.1 plunky #define SDP_ERROR_CODE_INVALID_SERVICE_RECORD_HANDLE 0x0002
332 1.1 plunky #define SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX 0x0003
333 1.1 plunky #define SDP_ERROR_CODE_INVALID_PDU_SIZE 0x0004
334 1.1 plunky #define SDP_ERROR_CODE_INVALID_CONTINUATION_STATE 0x0005
335 1.1 plunky #define SDP_ERROR_CODE_INSUFFICIENT_RESOURCES 0x0006
336 1.1 plunky
337 1.1 plunky
338 1.1 plunky /*****************************************************************************
339 1.1 plunky * sdpd(8) interface
340 1.1 plunky */
341 1.1 plunky
342 1.1 plunky #define SDP_LOCAL_PATH "/var/run/sdp"
343 1.1 plunky #define SDP_LOCAL_MTU L2CAP_MTU_DEFAULT
344 1.1 plunky
345 1.1 plunky /*
346 1.1 plunky * These are NOT defined in spec and the requests are only accepted
347 1.1 plunky * by sdpd(8) on the control socket. The response will be an Error
348 1.1 plunky * Response with an ErrorCode of 0x0000 indicating success.
349 1.1 plunky */
350 1.1 plunky #define SDP_PDU_RECORD_INSERT_REQUEST 0x84
351 1.1 plunky #define SDP_PDU_RECORD_UPDATE_REQUEST 0x86
352 1.1 plunky #define SDP_PDU_RECORD_REMOVE_REQUEST 0x82
353 1.1 plunky
354 1.1 plunky
355 1.1 plunky /******************************************************************************
356 1.1 plunky * Service Discovery API in libbluetooth(3)
357 1.1 plunky */
358 1.1 plunky
359 1.1 plunky typedef struct {
360 1.1 plunky uint8_t *next;
361 1.1 plunky uint8_t *end;
362 1.1 plunky } sdp_data_t;
363 1.1 plunky
364 1.1 plunky typedef struct sdp_session *sdp_session_t;
365 1.1 plunky
366 1.1 plunky /* sdp_uuid.c */
367 1.1 plunky extern const uuid_t BLUETOOTH_BASE_UUID;
368 1.1 plunky
369 1.1 plunky #ifndef SDP_COMPAT
370 1.1 plunky /* sdp_session.c */
371 1.1 plunky sdp_session_t sdp_open(const bdaddr_t *, const bdaddr_t *) __RENAME(_sdp_open);
372 1.1 plunky sdp_session_t sdp_open_local(const char *) __RENAME(_sdp_open_local);
373 1.1 plunky void sdp_close(sdp_session_t) __RENAME(_sdp_close);
374 1.1 plunky
375 1.1 plunky /* sdp_record.c */
376 1.1 plunky bool sdp_record_insert(sdp_session_t, bdaddr_t *, uint32_t *, const sdp_data_t *);
377 1.1 plunky bool sdp_record_update(sdp_session_t, uint32_t, const sdp_data_t *);
378 1.1 plunky bool sdp_record_remove(sdp_session_t, uint32_t);
379 1.1 plunky
380 1.1 plunky /* sdp_service.c */
381 1.1 plunky bool sdp_service_search(sdp_session_t, const sdp_data_t *, uint32_t *, int *);
382 1.1 plunky bool sdp_service_attribute(sdp_session_t, uint32_t, const sdp_data_t *, sdp_data_t *);
383 1.1 plunky bool sdp_service_search_attribute(sdp_session_t, const sdp_data_t *, const sdp_data_t *, sdp_data_t *);
384 1.1 plunky #endif
385 1.1 plunky
386 1.1 plunky /* sdp_match.c */
387 1.1 plunky bool sdp_match_uuid16(sdp_data_t *, uint16_t);
388 1.1 plunky
389 1.1 plunky /* sdp_get.c */
390 1.1 plunky bool sdp_get_data(sdp_data_t *, sdp_data_t *);
391 1.1 plunky bool sdp_get_attr(sdp_data_t *, uint16_t *, sdp_data_t *);
392 1.1 plunky bool sdp_get_uuid(sdp_data_t *, uuid_t *);
393 1.1 plunky bool sdp_get_bool(sdp_data_t *, bool *);
394 1.1 plunky bool sdp_get_seq(sdp_data_t *, sdp_data_t *);
395 1.1 plunky bool sdp_get_alt(sdp_data_t *, sdp_data_t *);
396 1.1 plunky bool sdp_get_uint(sdp_data_t *, uintmax_t *);
397 1.1 plunky bool sdp_get_int(sdp_data_t *, intmax_t *);
398 1.1 plunky bool sdp_get_str(sdp_data_t *, char **, size_t *);
399 1.1 plunky bool sdp_get_url(sdp_data_t *, char **, size_t *);
400 1.1 plunky
401 1.1 plunky /* sdp_put.c */
402 1.1 plunky bool sdp_put_data(sdp_data_t *, sdp_data_t *);
403 1.1 plunky bool sdp_put_attr(sdp_data_t *, uint16_t, sdp_data_t *);
404 1.1 plunky bool sdp_put_uuid(sdp_data_t *, const uuid_t *);
405 1.1 plunky bool sdp_put_uuid16(sdp_data_t *, uint16_t);
406 1.1 plunky bool sdp_put_uuid32(sdp_data_t *, uint32_t);
407 1.1 plunky bool sdp_put_uuid128(sdp_data_t *, const uuid_t *);
408 1.1 plunky bool sdp_put_bool(sdp_data_t *, bool);
409 1.1 plunky bool sdp_put_uint(sdp_data_t *, uintmax_t);
410 1.1 plunky bool sdp_put_uint8(sdp_data_t *, uint8_t);
411 1.1 plunky bool sdp_put_uint16(sdp_data_t *, uint16_t);
412 1.1 plunky bool sdp_put_uint32(sdp_data_t *, uint32_t);
413 1.1 plunky bool sdp_put_uint64(sdp_data_t *, uint64_t);
414 1.1 plunky bool sdp_put_int(sdp_data_t *, intmax_t);
415 1.1 plunky bool sdp_put_int8(sdp_data_t *, int8_t);
416 1.1 plunky bool sdp_put_int16(sdp_data_t *, int16_t);
417 1.1 plunky bool sdp_put_int32(sdp_data_t *, int32_t);
418 1.1 plunky bool sdp_put_int64(sdp_data_t *, int64_t);
419 1.1 plunky bool sdp_put_seq(sdp_data_t *, ssize_t);
420 1.1 plunky bool sdp_put_alt(sdp_data_t *, ssize_t);
421 1.1 plunky bool sdp_put_str(sdp_data_t *, const char *, ssize_t);
422 1.1 plunky bool sdp_put_url(sdp_data_t *, const char *, ssize_t);
423 1.1 plunky
424 1.1 plunky /* sdp_set.c */
425 1.1 plunky bool sdp_set_bool(const sdp_data_t *, bool);
426 1.1 plunky bool sdp_set_uint(const sdp_data_t *, uintmax_t);
427 1.1 plunky bool sdp_set_int(const sdp_data_t *, intmax_t);
428 1.1 plunky bool sdp_set_seq(const sdp_data_t *, ssize_t);
429 1.1 plunky bool sdp_set_alt(const sdp_data_t *, ssize_t);
430 1.1 plunky
431 1.1 plunky /* sdp_data.c */
432 1.1 plunky ssize_t sdp_data_size(const sdp_data_t *);
433 1.1 plunky int sdp_data_type(const sdp_data_t *);
434 1.1 plunky bool sdp_data_valid(const sdp_data_t *);
435 1.1 plunky void sdp_data_print(const sdp_data_t *, int);
436 1.1 plunky
437 1.1 plunky /******************************************************************************
438 1.1 plunky *
439 1.1 plunky * Source level compatibility with old API
440 1.1 plunky *
441 1.1 plunky * enable with -DSDP_COMPAT but it will be removed eventually
442 1.1 plunky *
443 1.1 plunky ******************************************************************************/
444 1.1 plunky
445 1.1 plunky #ifdef SDP_COMPAT
446 1.1 plunky #include <strings.h>
447 1.1 plunky
448 1.1 plunky typedef sdp_pdu_t *sdp_pdu_p;
449 1.1 plunky
450 1.1 plunky #define SDP_PDU_SERVICE_REGISTER_REQUEST 0x81
451 1.1 plunky #define SDP_PDU_SERVICE_UNREGISTER_REQUEST 0x82
452 1.1 plunky #define SDP_PDU_SERVICE_CHANGE_REQUEST 0x83
453 1.1 plunky
454 1.1 plunky /*
455 1.1 plunky * SDP int128/uint128 parameter
456 1.1 plunky */
457 1.1 plunky
458 1.1 plunky struct int128 {
459 1.1 plunky int8_t b[16];
460 1.1 plunky };
461 1.1 plunky typedef struct int128 int128_t;
462 1.1 plunky typedef struct int128 uint128_t;
463 1.1 plunky
464 1.1 plunky /*
465 1.1 plunky * SDP attribute
466 1.1 plunky */
467 1.1 plunky
468 1.1 plunky struct sdp_attr {
469 1.1 plunky uint16_t flags;
470 1.1 plunky #define SDP_ATTR_OK (0 << 0)
471 1.1 plunky #define SDP_ATTR_INVALID (1 << 0)
472 1.1 plunky #define SDP_ATTR_TRUNCATED (1 << 1)
473 1.1 plunky uint16_t attr; /* SDP_ATTR_xxx */
474 1.1 plunky uint32_t vlen; /* length of the value[] in bytes */
475 1.1 plunky uint8_t *value; /* base pointer */
476 1.1 plunky };
477 1.1 plunky typedef struct sdp_attr sdp_attr_t;
478 1.1 plunky typedef struct sdp_attr * sdp_attr_p;
479 1.1 plunky
480 1.1 plunky #define SDP_ATTR_RANGE(lo, hi) \
481 1.1 plunky (uint32_t)(((uint16_t)(lo) << 16) | ((uint16_t)(hi)))
482 1.1 plunky
483 1.1 plunky /* sdp_compat.c */
484 1.1 plunky void *sdp_open(bdaddr_t const *, bdaddr_t const *);
485 1.1 plunky void *sdp_open_local(char const *);
486 1.1 plunky int32_t sdp_close(void *);
487 1.1 plunky int32_t sdp_error(void *);
488 1.1 plunky int32_t sdp_search(void *, uint32_t, uint16_t const *, uint32_t, uint32_t const *, uint32_t, sdp_attr_t *);
489 1.1 plunky int32_t sdp_register_service(void *, uint16_t, bdaddr_t *, uint8_t *, uint32_t, uint32_t *);
490 1.1 plunky int32_t sdp_unregister_service(void *, uint32_t);
491 1.1 plunky int32_t sdp_change_service(void *, uint32_t, uint8_t *, uint32_t);
492 1.1 plunky const char *sdp_attr2desc(uint16_t);
493 1.1 plunky const char *sdp_uuid2desc(uint16_t);
494 1.1 plunky void sdp_print(uint32_t, uint8_t *, uint8_t const *);
495 1.1 plunky
496 1.1 plunky /* Inline versions of get/put byte/short/long. Pointer is advanced */
497 1.1 plunky #define SDP_GET8(b, cp) do { \
498 1.1 plunky (b) = *(const uint8_t *)(cp); \
499 1.1 plunky (cp) += sizeof(uint8_t); \
500 1.3 rillig } while (0)
501 1.1 plunky
502 1.1 plunky #define SDP_GET16(s, cp) do { \
503 1.1 plunky (s) = be16dec(cp); \
504 1.1 plunky (cp) += sizeof(uint16_t); \
505 1.3 rillig } while (0)
506 1.1 plunky
507 1.1 plunky #define SDP_GET32(l, cp) do { \
508 1.1 plunky (l) = be32dec(cp); \
509 1.1 plunky (cp) += sizeof(uint32_t); \
510 1.3 rillig } while (0)
511 1.1 plunky
512 1.1 plunky #define SDP_GET64(l, cp) do { \
513 1.1 plunky (l) = be64dec(cp); \
514 1.1 plunky (cp) += sizeof(uint64_t); \
515 1.3 rillig } while (0)
516 1.1 plunky
517 1.1 plunky #if BYTE_ORDER == LITTLE_ENDIAN
518 1.1 plunky #define SDP_GET128(l, cp) do { \
519 1.1 plunky register const uint8_t *t_cp = (const uint8_t *)(cp); \
520 1.1 plunky (l)->b[15] = *t_cp++; \
521 1.1 plunky (l)->b[14] = *t_cp++; \
522 1.1 plunky (l)->b[13] = *t_cp++; \
523 1.1 plunky (l)->b[12] = *t_cp++; \
524 1.1 plunky (l)->b[11] = *t_cp++; \
525 1.1 plunky (l)->b[10] = *t_cp++; \
526 1.1 plunky (l)->b[9] = *t_cp++; \
527 1.1 plunky (l)->b[8] = *t_cp++; \
528 1.1 plunky (l)->b[7] = *t_cp++; \
529 1.1 plunky (l)->b[6] = *t_cp++; \
530 1.1 plunky (l)->b[5] = *t_cp++; \
531 1.1 plunky (l)->b[4] = *t_cp++; \
532 1.1 plunky (l)->b[3] = *t_cp++; \
533 1.1 plunky (l)->b[2] = *t_cp++; \
534 1.1 plunky (l)->b[1] = *t_cp++; \
535 1.1 plunky (l)->b[0] = *t_cp++; \
536 1.1 plunky (cp) += 16; \
537 1.3 rillig } while (0)
538 1.1 plunky
539 1.1 plunky #define SDP_GET_UUID128(l, cp) do { \
540 1.1 plunky memcpy(&((l)->b), (cp), 16); \
541 1.1 plunky (cp) += 16; \
542 1.3 rillig } while (0)
543 1.1 plunky #elif BYTE_ORDER == BIG_ENDIAN
544 1.1 plunky #define SDP_GET128(l, cp) do { \
545 1.1 plunky memcpy(&((l)->b), (cp), 16); \
546 1.1 plunky (cp) += 16; \
547 1.3 rillig } while (0)
548 1.1 plunky
549 1.1 plunky #define SDP_GET_UUID128(l, cp) SDP_GET128(l, cp)
550 1.1 plunky #else
551 1.1 plunky #error "Unsupported BYTE_ORDER"
552 1.1 plunky #endif /* BYTE_ORDER */
553 1.1 plunky
554 1.1 plunky #define SDP_PUT8(b, cp) do { \
555 1.1 plunky *(uint8_t *)(cp) = (b); \
556 1.1 plunky (cp) += sizeof(uint8_t); \
557 1.3 rillig } while (0)
558 1.1 plunky
559 1.1 plunky #define SDP_PUT16(s, cp) do { \
560 1.1 plunky be16enc((cp), (s)); \
561 1.1 plunky (cp) += sizeof(uint16_t); \
562 1.3 rillig } while (0)
563 1.1 plunky
564 1.1 plunky #define SDP_PUT32(s, cp) do { \
565 1.1 plunky be32enc((cp), (s)); \
566 1.1 plunky (cp) += sizeof(uint32_t); \
567 1.3 rillig } while (0)
568 1.1 plunky
569 1.1 plunky #define SDP_PUT64(s, cp) do { \
570 1.1 plunky be64enc((cp), (s)); \
571 1.1 plunky (cp) += sizeof(uint64_t); \
572 1.3 rillig } while (0)
573 1.1 plunky
574 1.1 plunky #if BYTE_ORDER == LITTLE_ENDIAN
575 1.1 plunky #define SDP_PUT128(l, cp) do { \
576 1.1 plunky register const uint8_t *t_cp = (const uint8_t *)(cp); \
577 1.1 plunky *t_cp++ = (l)->b[15]; \
578 1.1 plunky *t_cp++ = (l)->b[14]; \
579 1.1 plunky *t_cp++ = (l)->b[13]; \
580 1.1 plunky *t_cp++ = (l)->b[12]; \
581 1.1 plunky *t_cp++ = (l)->b[11]; \
582 1.1 plunky *t_cp++ = (l)->b[10]; \
583 1.1 plunky *t_cp++ = (l)->b[9]; \
584 1.1 plunky *t_cp++ = (l)->b[8]; \
585 1.1 plunky *t_cp++ = (l)->b[7]; \
586 1.1 plunky *t_cp++ = (l)->b[6]; \
587 1.1 plunky *t_cp++ = (l)->b[5]; \
588 1.1 plunky *t_cp++ = (l)->b[4]; \
589 1.1 plunky *t_cp++ = (l)->b[3]; \
590 1.1 plunky *t_cp++ = (l)->b[2]; \
591 1.1 plunky *t_cp++ = (l)->b[1]; \
592 1.1 plunky *t_cp = (l)->b[0]; \
593 1.1 plunky (cp) += 16; \
594 1.3 rillig } while (0)
595 1.1 plunky
596 1.1 plunky #define SDP_PUT_UUID128(l, cp) do { \
597 1.1 plunky memcpy((cp), &((l)->b), 16); \
598 1.1 plunky (cp) += 16; \
599 1.3 rillig } while (0)
600 1.1 plunky #elif BYTE_ORDER == BIG_ENDIAN
601 1.1 plunky #define SDP_PUT128(l, cp) do { \
602 1.1 plunky memcpy((cp), &((l)->b), 16); \
603 1.1 plunky (cp) += 16; \
604 1.3 rillig } while (0)
605 1.1 plunky
606 1.1 plunky #define SDP_PUT_UUID128(l, cp) SDP_PUT128(l, cp)
607 1.1 plunky #else
608 1.1 plunky #error "Unsupported BYTE_ORDER"
609 1.1 plunky #endif /* BYTE_ORDER */
610 1.1 plunky
611 1.1 plunky struct sdp_dun_profile
612 1.1 plunky {
613 1.1 plunky uint8_t server_channel;
614 1.1 plunky uint8_t audio_feedback_support;
615 1.1 plunky uint8_t reserved[2];
616 1.1 plunky };
617 1.1 plunky typedef struct sdp_dun_profile sdp_dun_profile_t;
618 1.1 plunky typedef struct sdp_dun_profile * sdp_dun_profile_p;
619 1.1 plunky
620 1.1 plunky struct sdp_ftrn_profile
621 1.1 plunky {
622 1.1 plunky uint8_t server_channel;
623 1.1 plunky uint8_t reserved[3];
624 1.1 plunky };
625 1.1 plunky typedef struct sdp_ftrn_profile sdp_ftrn_profile_t;
626 1.1 plunky typedef struct sdp_ftrn_profile * sdp_ftrn_profile_p;
627 1.1 plunky
628 1.1 plunky struct sdp_hset_profile
629 1.1 plunky {
630 1.1 plunky uint8_t server_channel;
631 1.1 plunky uint8_t reserved[3];
632 1.1 plunky };
633 1.1 plunky typedef struct sdp_hset_profile sdp_hset_profile_t;
634 1.1 plunky typedef struct sdp_hset_profile * sdp_hset_profile_p;
635 1.1 plunky
636 1.1 plunky struct sdp_hf_profile
637 1.1 plunky {
638 1.1 plunky uint8_t server_channel;
639 1.1 plunky uint16_t supported_features;
640 1.1 plunky };
641 1.1 plunky typedef struct sdp_hf_profile sdp_hf_profile_t;
642 1.1 plunky typedef struct sdp_hf_profile * sdp_hf_profile_p;
643 1.1 plunky
644 1.1 plunky /* Keep this in sync with sdp_opush_profile */
645 1.1 plunky struct sdp_irmc_profile
646 1.1 plunky {
647 1.1 plunky uint8_t server_channel;
648 1.1 plunky uint8_t supported_formats_size;
649 1.1 plunky uint8_t supported_formats[30];
650 1.1 plunky };
651 1.1 plunky typedef struct sdp_irmc_profile sdp_irmc_profile_t;
652 1.1 plunky typedef struct sdp_irmc_profile * sdp_irmc_profile_p;
653 1.1 plunky
654 1.1 plunky struct sdp_irmc_command_profile
655 1.1 plunky {
656 1.1 plunky uint8_t server_channel;
657 1.1 plunky uint8_t reserved[3];
658 1.1 plunky };
659 1.1 plunky typedef struct sdp_irmc_command_profile sdp_irmc_command_profile_t;
660 1.1 plunky typedef struct sdp_irmc_command_profile * sdp_irmc_command_profile_p;
661 1.1 plunky
662 1.1 plunky struct sdp_lan_profile
663 1.1 plunky {
664 1.1 plunky uint8_t server_channel;
665 1.1 plunky uint8_t load_factor;
666 1.1 plunky uint8_t reserved;
667 1.1 plunky uint8_t ip_subnet_radius;
668 1.1 plunky uint32_t ip_subnet;
669 1.1 plunky };
670 1.1 plunky typedef struct sdp_lan_profile sdp_lan_profile_t;
671 1.1 plunky typedef struct sdp_lan_profile * sdp_lan_profile_p;
672 1.1 plunky
673 1.1 plunky /* Keep this in sync with sdp_irmc_profile */
674 1.1 plunky struct sdp_opush_profile
675 1.1 plunky {
676 1.1 plunky uint8_t server_channel;
677 1.1 plunky uint8_t supported_formats_size;
678 1.1 plunky uint8_t supported_formats[30];
679 1.1 plunky };
680 1.1 plunky typedef struct sdp_opush_profile sdp_opush_profile_t;
681 1.1 plunky typedef struct sdp_opush_profile * sdp_opush_profile_p;
682 1.1 plunky
683 1.1 plunky struct sdp_sp_profile
684 1.1 plunky {
685 1.1 plunky uint8_t server_channel;
686 1.1 plunky uint8_t reserved[3];
687 1.1 plunky };
688 1.1 plunky typedef struct sdp_sp_profile sdp_sp_profile_t;
689 1.1 plunky typedef struct sdp_sp_profile * sdp_sp_profile_p;
690 1.1 plunky
691 1.1 plunky struct sdp_nap_profile
692 1.1 plunky {
693 1.1 plunky uint8_t reserved;
694 1.1 plunky uint8_t load_factor;
695 1.1 plunky uint16_t psm;
696 1.1 plunky uint16_t security_description;
697 1.1 plunky uint16_t net_access_type;
698 1.1 plunky uint32_t max_net_access_rate;
699 1.1 plunky };
700 1.1 plunky typedef struct sdp_nap_profile sdp_nap_profile_t;
701 1.1 plunky typedef struct sdp_nap_profile * sdp_nap_profile_p;
702 1.1 plunky
703 1.1 plunky struct sdp_gn_profile
704 1.1 plunky {
705 1.1 plunky uint8_t reserved;
706 1.1 plunky uint8_t load_factor;
707 1.1 plunky uint16_t psm;
708 1.1 plunky uint16_t security_description;
709 1.1 plunky uint16_t reserved2;
710 1.1 plunky uint32_t reserved3;
711 1.1 plunky };
712 1.1 plunky typedef struct sdp_gn_profile sdp_gn_profile_t;
713 1.1 plunky typedef struct sdp_gn_profile * sdp_gn_profile_p;
714 1.1 plunky
715 1.1 plunky struct sdp_panu_profile
716 1.1 plunky {
717 1.1 plunky uint8_t reserved;
718 1.1 plunky uint8_t load_factor;
719 1.1 plunky uint16_t psm;
720 1.1 plunky uint16_t security_description;
721 1.1 plunky uint16_t reserved2;
722 1.1 plunky uint32_t reserved3;
723 1.1 plunky };
724 1.1 plunky typedef struct sdp_panu_profile sdp_panu_profile_t;
725 1.1 plunky typedef struct sdp_panu_profile * sdp_panu_profile_p;
726 1.1 plunky
727 1.1 plunky #endif /* SDP_COMPAT */
728 1.1 plunky
729 1.1 plunky #endif /* _SDP_H_ */
730