3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifndef __PACKET_BTSDP_H__
11 #define __PACKET_BTSDP_H__
13 #include "packet-bluetooth.h"
16 * Based on value provided by Bluetooth SIG:
17 * https://www.bluetooth.org/Technical/AssignedNumbers/service_discovery.htm
20 #define BTSDP_SDP_PROTOCOL_UUID 0x0001
21 #define BTSDP_UDP_PROTOCOL_UUID 0x0002
22 #define BTSDP_RFCOMM_PROTOCOL_UUID 0x0003
23 #define BTSDP_TCP_PROTOCOL_UUID 0x0004
24 #define BTSDP_TCS_BIN_PROTOCOL_UUID 0x0005
25 #define BTSDP_TCS_AT_PROTOCOL_UUID 0x0006
26 #define BTSDP_ATT_PROTOCOL_UUID 0x0007
27 #define BTSDP_OBEX_PROTOCOL_UUID 0x0008
28 #define BTSDP_IP_PROTOCOL_UUID 0x0009
29 #define BTSDP_FTP_PROTOCOL_UUID 0x000A
30 #define BTSDP_HTTP_PROTOCOL_UUID 0x000C
31 #define BTSDP_WSP_PROTOCOL_UUID 0x000E
32 #define BTSDP_BNEP_PROTOCOL_UUID 0x000F
33 #define BTSDP_UPNP_PROTOCOL_UUID 0x0010
34 #define BTSDP_HIDP_PROTOCOL_UUID 0x0011
35 #define BTSDP_HARDCOPY_CONTROL_CHANNEL_PROTOCOL_UUID 0x0012
36 #define BTSDP_HARDCOPY_DATA_CHANNEL_PROTOCOL_UUID 0x0014
37 #define BTSDP_HARDCOPY_NOTIFICATION_PROTOCOL_UUID 0x0016
38 #define BTSDP_AVCTP_PROTOCOL_UUID 0x0017
39 #define BTSDP_AVDTP_PROTOCOL_UUID 0x0019
40 #define BTSDP_CMTP_PROTOCOL_UUID 0x001B
41 #define BTSDP_MCAP_CONTROL_CHANNEL_PROTOCOL_UUID 0x001E
42 #define BTSDP_MCAP_DATA_CHANNEL_PROTOCOL_UUID 0x001F
43 #define BTSDP_L2CAP_PROTOCOL_UUID 0x0100
46 #define BTSDP_SPP_SERVICE_UUID 0x1101
47 #define BTSDP_LAN_SERVICE_UUID 0x1102
48 #define BTSDP_DUN_SERVICE_UUID 0x1103
49 #define BTSDP_SYNC_SERVICE_UUID 0x1104
50 #define BTSDP_OPP_SERVICE_UUID 0x1105
51 #define BTSDP_FTP_SERVICE_UUID 0x1106
52 #define BTSDP_SYNC_COMMAND_SERVICE_UUID 0x1107
53 #define BTSDP_HSP_SERVICE_UUID 0x1108
54 #define BTSDP_CTP_SERVICE_UUID 0x1109
56 #define BTSDP_A2DP_SOURCE_SERVICE_UUID 0x110A
57 #define BTSDP_A2DP_SINK_SERVICE_UUID 0x110B
58 #define BTSDP_AVRCP_TG_SERVICE_UUID 0x110C
59 #define BTSDP_A2DP_DISTRIBUTION_SERVICE_UUID 0x110D
60 #define BTSDP_AVRCP_SERVICE_UUID 0x110E
61 #define BTSDP_AVRCP_CT_SERVICE_UUID 0x110F
63 #define BTSDP_ICP_SERVICE_UUID 0x1110
64 #define BTSDP_FAX_SERVICE_UUID 0x1111
65 #define BTSDP_HSP_GW_SERVICE_UUID 0x1112
66 #define BTSDP_WAP_SERVICE_UUID 0x1113
67 #define BTSDP_WAP_CLIENT_SERVICE_UUID 0x1114
69 #define BTSDP_PAN_PANU_SERVICE_UUID 0x1115
70 #define BTSDP_PAN_NAP_SERVICE_UUID 0x1116
71 #define BTSDP_PAN_GN_SERVICE_UUID 0x1117
73 #define BTSDP_BPP_DIRECT_PRINTING_SERVICE_UUID 0x1118
74 #define BTSDP_BPP_REFERENCE_PRINTING_SERVICE_UUID 0x1119
76 #define BTSDP_BIP_SERVICE_UUID 0x111A
77 #define BTSDP_BIP_RESPONDER_SERVICE_UUID 0x111B
78 #define BTSDP_BIP_AUTO_ARCH_SERVICE_UUID 0x111C
79 #define BTSDP_BIP_REF_OBJ_SERVICE_UUID 0x111D
81 #define BTSDP_HFP_SERVICE_UUID 0x111E
82 #define BTSDP_HFP_GW_SERVICE_UUID 0x111F
84 #define BTSDP_BPP_DIRECT_PRINTING_REF_OBJ_SERVICE_UUID 0x1120
85 #define BTSDP_BPP_REFLECTED_UI_SERVICE_UUID 0x1121
86 #define BTSDP_BPP_SERVICE_UUID 0x1122
87 #define BTSDP_BPP_STATUS_SERVICE_UUID 0x1123
89 #define BTSDP_HID_SERVICE_UUID 0x1124
91 #define BTSDP_HCRP_SERVICE_UUID 0x1125
92 #define BTSDP_HCRP_PRINT_SERVICE_UUID 0x1126
93 #define BTSDP_HCRP_SCAN_SERVICE_UUID 0x1127
95 #define BTSDP_CIP_SERVICE_UUID 0x1128
97 #define BTSDP_VIDEO_CONFERENCING_GW_SERVICE_UUID 0x1129 /* not assigned*/
99 #define BTSDP_UDI_MT_SERVICE_UUID 0x112A /* not assigned*/
100 #define BTSDP_UDI_TA_SERVICE_UUID 0x112B /* not assigned*/
102 #define BTSDP_AUDIO_VIDEO_SERVICE_UUID 0x112C /* not assigned*/
104 #define BTSDP_SAP_SERVICE_UUID 0x112D
106 #define BTSDP_PBAP_PCE_SERVICE_UUID 0x112E
107 #define BTSDP_PBAP_PSE_SERVICE_UUID 0x112F
108 #define BTSDP_PBAP_SERVICE_UUID 0x1130
110 #define BTSDP_HSP_HS_SERVICE_UUID 0x1131
112 #define BTSDP_MAP_ACCESS_SRV_SERVICE_UUID 0x1132
113 #define BTSDP_MAP_NOTIFICATION_SRV_SERVICE_UUID 0x1133
114 #define BTSDP_MAP_SERVICE_UUID 0x1134
116 #define BTSDP_GNSS_UUID 0x1135
117 #define BTSDP_GNSS_SERVER_UUID 0x1136
119 #define BTSDP_3D_DISPLAY_UUID 0x1137
120 #define BTSDP_3D_GLASSES_UUID 0x1138
121 #define BTSDP_3D_SYNCHRONIZATION_UUID 0x1139
123 #define BTSDP_MULTI_PROFILE_UUID 0x113A
124 #define BTSDP_MULTI_PROFILE_SC_UUID 0x113B
126 #define BTSDP_CTN_ACCESS_SERVICE_UUID 0x113C
127 #define BTSDP_CTN_NOTIFICATION_SERVICE_UUID 0x113D
128 #define BTSDP_CTN_SERVICE_UUID 0x113E
130 #define BTSDP_DID_SERVICE_UUID 0x1200
132 #define BTSDP_GENERIC_NETWORKING_SERVICE_UUID 0x1201
133 #define BTSDP_GENERIC_FILE_TRANSFER_SERVICE_UUID 0x1202
134 #define BTSDP_GENERIC_AUDIO_SERVICE_UUID 0x1203
135 #define BTSDP_GENERIC_TELEPHONY_SERVICE_UUID 0x1204
137 #define BTSDP_ESDP_UPNP_SERVICE_SERVICE_UUID 0x1205
138 #define BTSDP_ESDP_UPNP_IP_SERVICE_SERVICE_UUID 0x1206
139 #define BTSDP_ESDP_UPNP_IP_PAN_SERVICE_UUID 0x1300
140 #define BTSDP_ESDP_UPNP_IP_LAP_SERVICE_UUID 0x1301
141 #define BTSDP_ESDP_UPNP_L2CAP_SERVICE_UUID 0x1302
143 #define BTSDP_VDP_SOURCE_SERVICE_UUID 0x1303
144 #define BTSDP_VDP_SINK_SERVICE_UUID 0x1304
145 #define BTSDP_VDP_DISTRIBUTION_SERVICE_UUID 0x1305
147 #define BTSDP_HDP_SERVICE_UUID 0x1400
148 #define BTSDP_HDP_SOURCE_SERVICE_UUID 0x1401
149 #define BTSDP_HDP_SINK_SERVICE_UUID 0x1402
151 #define BTSDP_LOCAL_SERVICE_FLAG_MASK 0x0001
152 #define BTSDP_SECONDARY_CHANNEL_FLAG_MASK 0x0002
154 #define SDP_PSM_DEFAULT 1
156 /* This structure is passed to other dissectors
157 * and contains information about the relation between service, PSM/server
158 * channel, local/remote service. The btrfcomm and btl2cap dissectors
159 * need this information to determine the kind of data transferred on
160 * dynamically assigned server channels and PSM's, respectively.
162 typedef struct _btsdp_data_t
{
163 uint32_t interface_id
;
166 uint32_t frame_number
;
167 uint32_t service
; /* service UUID, see below */
168 uint32_t channel
; /* rfcomm server channel or PSM */
169 uint16_t protocol
; /* either rfcomm or l2cap UUID */
170 uint16_t flags
; /* indicate if the service is local or remote
171 peer device) and/or a secondary PSM */
175 typedef struct _service_info_t
{
176 uint32_t interface_id
;
180 uint32_t bd_addr_oui
;
185 bluetooth_uuid_t uuid
;
186 int protocol_order
; /* main service protocol has 0, goep -1, additional protocol 1, 2... */
189 void *data
; /* Used to transfer service record data to profiles */
191 struct _service_info_t
*parent_info
;
194 extern const value_string hid_country_code_vals
[];
196 extern service_info_t
* btsdp_get_service_info(wmem_tree_key_t
* key
);
201 * Editor modelines - https://www.wireshark.org/tools/modelines.html
206 * indent-tabs-mode: nil
209 * vi: set shiftwidth=4 tabstop=8 expandtab:
210 * :indentSize=4:tabSize=8:noTabs=true: