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