23 #include "bluetooth.h" 25 #define SDP_UNIX_PATH "/var/run/sdp" 26 #define SDP_RESPONSE_TIMEOUT 20 27 #define SDP_REQ_BUFFER_SIZE 2048 28 #define SDP_RSP_BUFFER_SIZE 65535 29 #define SDP_PDU_CHUNK_SIZE 1024 35 #define SDP_PSM 0x0001 40 #define SDP_UUID 0x0001 41 #define UDP_UUID 0x0002 42 #define RFCOMM_UUID 0x0003 43 #define TCP_UUID 0x0004 44 #define TCS_BIN_UUID 0x0005 45 #define TCS_AT_UUID 0x0006 46 #define ATT_UUID 0x0007 47 #define OBEX_UUID 0x0008 48 #define IP_UUID 0x0009 49 #define FTP_UUID 0x000a 50 #define HTTP_UUID 0x000c 51 #define WSP_UUID 0x000e 52 #define BNEP_UUID 0x000f 53 #define UPNP_UUID 0x0010 54 #define HIDP_UUID 0x0011 55 #define HCRP_CTRL_UUID 0x0012 56 #define HCRP_DATA_UUID 0x0014 57 #define HCRP_NOTE_UUID 0x0016 58 #define AVCTP_UUID 0x0017 59 #define AVDTP_UUID 0x0019 60 #define CMTP_UUID 0x001b 61 #define UDI_UUID 0x001d 62 #define MCAP_CTRL_UUID 0x001e 63 #define MCAP_DATA_UUID 0x001f 64 #define L2CAP_UUID 0x0100 69 #define SDP_SERVER_SVCLASS_ID 0x1000 70 #define BROWSE_GRP_DESC_SVCLASS_ID 0x1001 71 #define PUBLIC_BROWSE_GROUP 0x1002 72 #define SERIAL_PORT_SVCLASS_ID 0x1101 73 #define LAN_ACCESS_SVCLASS_ID 0x1102 74 #define DIALUP_NET_SVCLASS_ID 0x1103 75 #define IRMC_SYNC_SVCLASS_ID 0x1104 76 #define OBEX_OBJPUSH_SVCLASS_ID 0x1105 77 #define OBEX_FILETRANS_SVCLASS_ID 0x1106 78 #define IRMC_SYNC_CMD_SVCLASS_ID 0x1107 79 #define HEADSET_SVCLASS_ID 0x1108 80 #define CORDLESS_TELEPHONY_SVCLASS_ID 0x1109 81 #define AUDIO_SOURCE_SVCLASS_ID 0x110a 82 #define AUDIO_SINK_SVCLASS_ID 0x110b 83 #define AV_REMOTE_TARGET_SVCLASS_ID 0x110c 84 #define ADVANCED_AUDIO_SVCLASS_ID 0x110d 85 #define AV_REMOTE_SVCLASS_ID 0x110e 86 #define AV_REMOTE_CONTROLLER_SVCLASS_ID 0x110f 87 #define INTERCOM_SVCLASS_ID 0x1110 88 #define FAX_SVCLASS_ID 0x1111 89 #define HEADSET_AGW_SVCLASS_ID 0x1112 90 #define WAP_SVCLASS_ID 0x1113 91 #define WAP_CLIENT_SVCLASS_ID 0x1114 92 #define PANU_SVCLASS_ID 0x1115 93 #define NAP_SVCLASS_ID 0x1116 94 #define GN_SVCLASS_ID 0x1117 95 #define DIRECT_PRINTING_SVCLASS_ID 0x1118 96 #define REFERENCE_PRINTING_SVCLASS_ID 0x1119 97 #define IMAGING_SVCLASS_ID 0x111a 98 #define IMAGING_RESPONDER_SVCLASS_ID 0x111b 99 #define IMAGING_ARCHIVE_SVCLASS_ID 0x111c 100 #define IMAGING_REFOBJS_SVCLASS_ID 0x111d 101 #define HANDSFREE_SVCLASS_ID 0x111e 102 #define HANDSFREE_AGW_SVCLASS_ID 0x111f 103 #define DIRECT_PRT_REFOBJS_SVCLASS_ID 0x1120 104 #define REFLECTED_UI_SVCLASS_ID 0x1121 105 #define BASIC_PRINTING_SVCLASS_ID 0x1122 106 #define PRINTING_STATUS_SVCLASS_ID 0x1123 107 #define HID_SVCLASS_ID 0x1124 108 #define HCR_SVCLASS_ID 0x1125 109 #define HCR_PRINT_SVCLASS_ID 0x1126 110 #define HCR_SCAN_SVCLASS_ID 0x1127 111 #define CIP_SVCLASS_ID 0x1128 112 #define VIDEO_CONF_GW_SVCLASS_ID 0x1129 113 #define UDI_MT_SVCLASS_ID 0x112a 114 #define UDI_TA_SVCLASS_ID 0x112b 115 #define AV_SVCLASS_ID 0x112c 116 #define SAP_SVCLASS_ID 0x112d 117 #define PBAP_PCE_SVCLASS_ID 0x112e 118 #define PBAP_PSE_SVCLASS_ID 0x112f 119 #define PBAP_SVCLASS_ID 0x1130 120 #define MAP_MSE_SVCLASS_ID 0x1132 121 #define MAP_MCE_SVCLASS_ID 0x1133 122 #define MAP_SVCLASS_ID 0x1134 123 #define GNSS_SVCLASS_ID 0x1135 124 #define GNSS_SERVER_SVCLASS_ID 0x1136 125 #define MPS_SC_SVCLASS_ID 0x113A 126 #define MPS_SVCLASS_ID 0x113B 127 #define PNP_INFO_SVCLASS_ID 0x1200 128 #define GENERIC_NETWORKING_SVCLASS_ID 0x1201 129 #define GENERIC_FILETRANS_SVCLASS_ID 0x1202 130 #define GENERIC_AUDIO_SVCLASS_ID 0x1203 131 #define GENERIC_TELEPHONY_SVCLASS_ID 0x1204 132 #define UPNP_SVCLASS_ID 0x1205 133 #define UPNP_IP_SVCLASS_ID 0x1206 134 #define UPNP_PAN_SVCLASS_ID 0x1300 135 #define UPNP_LAP_SVCLASS_ID 0x1301 136 #define UPNP_L2CAP_SVCLASS_ID 0x1302 137 #define VIDEO_SOURCE_SVCLASS_ID 0x1303 138 #define VIDEO_SINK_SVCLASS_ID 0x1304 139 #define VIDEO_DISTRIBUTION_SVCLASS_ID 0x1305 140 #define HDP_SVCLASS_ID 0x1400 141 #define HDP_SOURCE_SVCLASS_ID 0x1401 142 #define HDP_SINK_SVCLASS_ID 0x1402 143 #define GENERIC_ACCESS_SVCLASS_ID 0x1800 144 #define GENERIC_ATTRIB_SVCLASS_ID 0x1801 145 #define APPLE_AGENT_SVCLASS_ID 0x2112 151 #define SDP_SERVER_PROFILE_ID SDP_SERVER_SVCLASS_ID 152 #define BROWSE_GRP_DESC_PROFILE_ID BROWSE_GRP_DESC_SVCLASS_ID 153 #define SERIAL_PORT_PROFILE_ID SERIAL_PORT_SVCLASS_ID 154 #define LAN_ACCESS_PROFILE_ID LAN_ACCESS_SVCLASS_ID 155 #define DIALUP_NET_PROFILE_ID DIALUP_NET_SVCLASS_ID 156 #define IRMC_SYNC_PROFILE_ID IRMC_SYNC_SVCLASS_ID 157 #define OBEX_OBJPUSH_PROFILE_ID OBEX_OBJPUSH_SVCLASS_ID 158 #define OBEX_FILETRANS_PROFILE_ID OBEX_FILETRANS_SVCLASS_ID 159 #define IRMC_SYNC_CMD_PROFILE_ID IRMC_SYNC_CMD_SVCLASS_ID 160 #define HEADSET_PROFILE_ID HEADSET_SVCLASS_ID 161 #define CORDLESS_TELEPHONY_PROFILE_ID CORDLESS_TELEPHONY_SVCLASS_ID 162 #define AUDIO_SOURCE_PROFILE_ID AUDIO_SOURCE_SVCLASS_ID 163 #define AUDIO_SINK_PROFILE_ID AUDIO_SINK_SVCLASS_ID 164 #define AV_REMOTE_TARGET_PROFILE_ID AV_REMOTE_TARGET_SVCLASS_ID 165 #define ADVANCED_AUDIO_PROFILE_ID ADVANCED_AUDIO_SVCLASS_ID 166 #define AV_REMOTE_PROFILE_ID AV_REMOTE_SVCLASS_ID 167 #define INTERCOM_PROFILE_ID INTERCOM_SVCLASS_ID 168 #define FAX_PROFILE_ID FAX_SVCLASS_ID 169 #define HEADSET_AGW_PROFILE_ID HEADSET_AGW_SVCLASS_ID 170 #define WAP_PROFILE_ID WAP_SVCLASS_ID 171 #define WAP_CLIENT_PROFILE_ID WAP_CLIENT_SVCLASS_ID 172 #define PANU_PROFILE_ID PANU_SVCLASS_ID 173 #define NAP_PROFILE_ID NAP_SVCLASS_ID 174 #define GN_PROFILE_ID GN_SVCLASS_ID 175 #define DIRECT_PRINTING_PROFILE_ID DIRECT_PRINTING_SVCLASS_ID 176 #define REFERENCE_PRINTING_PROFILE_ID REFERENCE_PRINTING_SVCLASS_ID 177 #define IMAGING_PROFILE_ID IMAGING_SVCLASS_ID 178 #define IMAGING_RESPONDER_PROFILE_ID IMAGING_RESPONDER_SVCLASS_ID 179 #define IMAGING_ARCHIVE_PROFILE_ID IMAGING_ARCHIVE_SVCLASS_ID 180 #define IMAGING_REFOBJS_PROFILE_ID IMAGING_REFOBJS_SVCLASS_ID 181 #define HANDSFREE_PROFILE_ID HANDSFREE_SVCLASS_ID 182 #define HANDSFREE_AGW_PROFILE_ID HANDSFREE_AGW_SVCLASS_ID 183 #define DIRECT_PRT_REFOBJS_PROFILE_ID DIRECT_PRT_REFOBJS_SVCLASS_ID 184 #define REFLECTED_UI_PROFILE_ID REFLECTED_UI_SVCLASS_ID 185 #define BASIC_PRINTING_PROFILE_ID BASIC_PRINTING_SVCLASS_ID 186 #define PRINTING_STATUS_PROFILE_ID PRINTING_STATUS_SVCLASS_ID 187 #define HID_PROFILE_ID HID_SVCLASS_ID 188 #define HCR_PROFILE_ID HCR_SCAN_SVCLASS_ID 189 #define HCR_PRINT_PROFILE_ID HCR_PRINT_SVCLASS_ID 190 #define HCR_SCAN_PROFILE_ID HCR_SCAN_SVCLASS_ID 191 #define CIP_PROFILE_ID CIP_SVCLASS_ID 192 #define VIDEO_CONF_GW_PROFILE_ID VIDEO_CONF_GW_SVCLASS_ID 193 #define UDI_MT_PROFILE_ID UDI_MT_SVCLASS_ID 194 #define UDI_TA_PROFILE_ID UDI_TA_SVCLASS_ID 195 #define AV_PROFILE_ID AV_SVCLASS_ID 196 #define SAP_PROFILE_ID SAP_SVCLASS_ID 197 #define PBAP_PCE_PROFILE_ID PBAP_PCE_SVCLASS_ID 198 #define PBAP_PSE_PROFILE_ID PBAP_PSE_SVCLASS_ID 199 #define PBAP_PROFILE_ID PBAP_SVCLASS_ID 200 #define MAP_PROFILE_ID MAP_SVCLASS_ID 201 #define PNP_INFO_PROFILE_ID PNP_INFO_SVCLASS_ID 202 #define GENERIC_NETWORKING_PROFILE_ID GENERIC_NETWORKING_SVCLASS_ID 203 #define GENERIC_FILETRANS_PROFILE_ID GENERIC_FILETRANS_SVCLASS_ID 204 #define GENERIC_AUDIO_PROFILE_ID GENERIC_AUDIO_SVCLASS_ID 205 #define GENERIC_TELEPHONY_PROFILE_ID GENERIC_TELEPHONY_SVCLASS_ID 206 #define UPNP_PROFILE_ID UPNP_SVCLASS_ID 207 #define UPNP_IP_PROFILE_ID UPNP_IP_SVCLASS_ID 208 #define UPNP_PAN_PROFILE_ID UPNP_PAN_SVCLASS_ID 209 #define UPNP_LAP_PROFILE_ID UPNP_LAP_SVCLASS_ID 210 #define UPNP_L2CAP_PROFILE_ID UPNP_L2CAP_SVCLASS_ID 211 #define VIDEO_SOURCE_PROFILE_ID VIDEO_SOURCE_SVCLASS_ID 212 #define VIDEO_SINK_PROFILE_ID VIDEO_SINK_SVCLASS_ID 213 #define VIDEO_DISTRIBUTION_PROFILE_ID VIDEO_DISTRIBUTION_SVCLASS_ID 214 #define HDP_PROFILE_ID HDP_SVCLASS_ID 215 #define HDP_SOURCE_PROFILE_ID HDP_SOURCE_SVCLASS_ID 216 #define HDP_SINK_PROFILE_ID HDP_SINK_SVCLASS_ID 217 #define GENERIC_ACCESS_PROFILE_ID GENERIC_ACCESS_SVCLASS_ID 218 #define GENERIC_ATTRIB_PROFILE_ID GENERIC_ATTRIB_SVCLASS_ID 219 #define APPLE_AGENT_PROFILE_ID APPLE_AGENT_SVCLASS_ID 220 #define MPS_PROFILE_ID MPS_SC_SVCLASS_ID 225 #define MDP_SVCLASS_ID HDP_SVCLASS_ID 226 #define MDP_SOURCE_SVCLASS_ID HDP_SOURCE_SVCLASS_ID 227 #define MDP_SINK_SVCLASS_ID HDP_SINK_SVCLASS_ID 228 #define MDP_PROFILE_ID HDP_PROFILE_ID 229 #define MDP_SOURCE_PROFILE_ID HDP_SOURCE_PROFILE_ID 230 #define MDP_SINK_PROFILE_ID HDP_SINK_PROFILE_ID 235 #define SDP_SERVER_RECORD_HANDLE 0x0000 241 #define SDP_ATTR_RECORD_HANDLE 0x0000 242 #define SDP_ATTR_SVCLASS_ID_LIST 0x0001 243 #define SDP_ATTR_RECORD_STATE 0x0002 244 #define SDP_ATTR_SERVICE_ID 0x0003 245 #define SDP_ATTR_PROTO_DESC_LIST 0x0004 246 #define SDP_ATTR_BROWSE_GRP_LIST 0x0005 247 #define SDP_ATTR_LANG_BASE_ATTR_ID_LIST 0x0006 248 #define SDP_ATTR_SVCINFO_TTL 0x0007 249 #define SDP_ATTR_SERVICE_AVAILABILITY 0x0008 250 #define SDP_ATTR_PFILE_DESC_LIST 0x0009 251 #define SDP_ATTR_DOC_URL 0x000a 252 #define SDP_ATTR_CLNT_EXEC_URL 0x000b 253 #define SDP_ATTR_ICON_URL 0x000c 254 #define SDP_ATTR_ADD_PROTO_DESC_LIST 0x000d 256 #define SDP_ATTR_GROUP_ID 0x0200 257 #define SDP_ATTR_IP_SUBNET 0x0200 258 #define SDP_ATTR_VERSION_NUM_LIST 0x0200 259 #define SDP_ATTR_SUPPORTED_FEATURES_LIST 0x0200 260 #define SDP_ATTR_GOEP_L2CAP_PSM 0x0200 261 #define SDP_ATTR_SVCDB_STATE 0x0201 263 #define SDP_ATTR_MPSD_SCENARIOS 0x0200 264 #define SDP_ATTR_MPMD_SCENARIOS 0x0201 265 #define SDP_ATTR_MPS_DEPENDENCIES 0x0202 267 #define SDP_ATTR_SERVICE_VERSION 0x0300 268 #define SDP_ATTR_EXTERNAL_NETWORK 0x0301 269 #define SDP_ATTR_SUPPORTED_DATA_STORES_LIST 0x0301 270 #define SDP_ATTR_DATA_EXCHANGE_SPEC 0x0301 271 #define SDP_ATTR_NETWORK 0x0301 272 #define SDP_ATTR_FAX_CLASS1_SUPPORT 0x0302 273 #define SDP_ATTR_REMOTE_AUDIO_VOLUME_CONTROL 0x0302 274 #define SDP_ATTR_MCAP_SUPPORTED_PROCEDURES 0x0302 275 #define SDP_ATTR_FAX_CLASS20_SUPPORT 0x0303 276 #define SDP_ATTR_SUPPORTED_FORMATS_LIST 0x0303 277 #define SDP_ATTR_FAX_CLASS2_SUPPORT 0x0304 278 #define SDP_ATTR_AUDIO_FEEDBACK_SUPPORT 0x0305 279 #define SDP_ATTR_NETWORK_ADDRESS 0x0306 280 #define SDP_ATTR_WAP_GATEWAY 0x0307 281 #define SDP_ATTR_HOMEPAGE_URL 0x0308 282 #define SDP_ATTR_WAP_STACK_TYPE 0x0309 283 #define SDP_ATTR_SECURITY_DESC 0x030a 284 #define SDP_ATTR_NET_ACCESS_TYPE 0x030b 285 #define SDP_ATTR_MAX_NET_ACCESSRATE 0x030c 286 #define SDP_ATTR_IP4_SUBNET 0x030d 287 #define SDP_ATTR_IP6_SUBNET 0x030e 288 #define SDP_ATTR_SUPPORTED_CAPABILITIES 0x0310 289 #define SDP_ATTR_SUPPORTED_FEATURES 0x0311 290 #define SDP_ATTR_SUPPORTED_FUNCTIONS 0x0312 291 #define SDP_ATTR_TOTAL_IMAGING_DATA_CAPACITY 0x0313 292 #define SDP_ATTR_SUPPORTED_REPOSITORIES 0x0314 293 #define SDP_ATTR_MAS_INSTANCE_ID 0x0315 294 #define SDP_ATTR_SUPPORTED_MESSAGE_TYPES 0x0316 295 #define SDP_ATTR_PBAP_SUPPORTED_FEATURES 0x0317 296 #define SDP_ATTR_MAP_SUPPORTED_FEATURES 0x0317 298 #define SDP_ATTR_SPECIFICATION_ID 0x0200 299 #define SDP_ATTR_VENDOR_ID 0x0201 300 #define SDP_ATTR_PRODUCT_ID 0x0202 301 #define SDP_ATTR_VERSION 0x0203 302 #define SDP_ATTR_PRIMARY_RECORD 0x0204 303 #define SDP_ATTR_VENDOR_ID_SOURCE 0x0205 305 #define SDP_ATTR_HID_DEVICE_RELEASE_NUMBER 0x0200 306 #define SDP_ATTR_HID_PARSER_VERSION 0x0201 307 #define SDP_ATTR_HID_DEVICE_SUBCLASS 0x0202 308 #define SDP_ATTR_HID_COUNTRY_CODE 0x0203 309 #define SDP_ATTR_HID_VIRTUAL_CABLE 0x0204 310 #define SDP_ATTR_HID_RECONNECT_INITIATE 0x0205 311 #define SDP_ATTR_HID_DESCRIPTOR_LIST 0x0206 312 #define SDP_ATTR_HID_LANG_ID_BASE_LIST 0x0207 313 #define SDP_ATTR_HID_SDP_DISABLE 0x0208 314 #define SDP_ATTR_HID_BATTERY_POWER 0x0209 315 #define SDP_ATTR_HID_REMOTE_WAKEUP 0x020a 316 #define SDP_ATTR_HID_PROFILE_VERSION 0x020b 317 #define SDP_ATTR_HID_SUPERVISION_TIMEOUT 0x020c 318 #define SDP_ATTR_HID_NORMALLY_CONNECTABLE 0x020d 319 #define SDP_ATTR_HID_BOOT_DEVICE 0x020e 329 #define SDP_PRIMARY_LANG_BASE 0x0100 331 #define SDP_ATTR_SVCNAME_PRIMARY 0x0000 + SDP_PRIMARY_LANG_BASE 332 #define SDP_ATTR_SVCDESC_PRIMARY 0x0001 + SDP_PRIMARY_LANG_BASE 333 #define SDP_ATTR_PROVNAME_PRIMARY 0x0002 + SDP_PRIMARY_LANG_BASE 354 #define SDP_DATA_NIL 0x00 355 #define SDP_UINT8 0x08 356 #define SDP_UINT16 0x09 357 #define SDP_UINT32 0x0A 358 #define SDP_UINT64 0x0B 359 #define SDP_UINT128 0x0C 360 #define SDP_INT8 0x10 361 #define SDP_INT16 0x11 362 #define SDP_INT32 0x12 363 #define SDP_INT64 0x13 364 #define SDP_INT128 0x14 365 #define SDP_UUID_UNSPEC 0x18 366 #define SDP_UUID16 0x19 367 #define SDP_UUID32 0x1A 368 #define SDP_UUID128 0x1C 369 #define SDP_TEXT_STR_UNSPEC 0x20 370 #define SDP_TEXT_STR8 0x25 371 #define SDP_TEXT_STR16 0x26 372 #define SDP_TEXT_STR32 0x27 373 #define SDP_BOOL 0x28 374 #define SDP_SEQ_UNSPEC 0x30 375 #define SDP_SEQ8 0x35 376 #define SDP_SEQ16 0x36 377 #define SDP_SEQ32 0x37 378 #define SDP_ALT_UNSPEC 0x38 379 #define SDP_ALT8 0x3D 380 #define SDP_ALT16 0x3E 381 #define SDP_ALT32 0x3F 382 #define SDP_URL_STR_UNSPEC 0x40 383 #define SDP_URL_STR8 0x45 384 #define SDP_URL_STR16 0x46 385 #define SDP_URL_STR32 0x47 390 #define SDP_ERROR_RSP 0x01 391 #define SDP_SVC_SEARCH_REQ 0x02 392 #define SDP_SVC_SEARCH_RSP 0x03 393 #define SDP_SVC_ATTR_REQ 0x04 394 #define SDP_SVC_ATTR_RSP 0x05 395 #define SDP_SVC_SEARCH_ATTR_REQ 0x06 396 #define SDP_SVC_SEARCH_ATTR_RSP 0x07 402 #define SDP_SVC_REGISTER_REQ 0x75 403 #define SDP_SVC_REGISTER_RSP 0x76 404 #define SDP_SVC_UPDATE_REQ 0x77 405 #define SDP_SVC_UPDATE_RSP 0x78 406 #define SDP_SVC_REMOVE_REQ 0x79 407 #define SDP_SVC_REMOVE_RSP 0x80 412 #define SDP_INVALID_VERSION 0x0001 413 #define SDP_INVALID_RECORD_HANDLE 0x0002 414 #define SDP_INVALID_SYNTAX 0x0003 415 #define SDP_INVALID_PDU_SIZE 0x0004 416 #define SDP_INVALID_CSTATE 0x0005 444 #define SDP_IS_UUID(x) ((x) == SDP_UUID16 || (x) == SDP_UUID32 || \ 446 #define SDP_IS_ALT(x) ((x) == SDP_ALT8 || (x) == SDP_ALT16 || (x) == SDP_ALT32) 447 #define SDP_IS_SEQ(x) ((x) == SDP_SEQ8 || (x) == SDP_SEQ16 || (x) == SDP_SEQ32) 448 #define SDP_IS_TEXT_STR(x) ((x) == SDP_TEXT_STR8 || (x) == SDP_TEXT_STR16 || \ 449 (x) == SDP_TEXT_STR32) 470 uint16_t code_ISO639;
472 uint16_t base_offset;
506 sdp_list_t *attrlist;
Definition: bluetooth.h:380