5 * Copyright 2009-2010 Atheros Communications
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 #include <epan/packet.h>
30 #include <epan/expert.h>
32 #include "packet-wifi-p2p.h"
36 P2P_ATTR_MINOR_REASON_CODE = 1,
37 P2P_ATTR_P2P_CAPABILITY = 2,
38 P2P_ATTR_P2P_DEVICE_ID = 3,
39 P2P_ATTR_GROUP_OWNER_INTENT = 4,
40 P2P_ATTR_CONFIGURATION_TIMEOUT = 5,
41 P2P_ATTR_LISTEN_CHANNEL = 6,
42 P2P_ATTR_P2P_GROUP_BSSID = 7,
43 P2P_ATTR_EXTENDED_LISTEN_TIMING = 8,
44 P2P_ATTR_INTENDED_P2P_INTERFACE_ADDRESS = 9,
45 P2P_ATTR_P2P_MANAGEABILITY = 10,
46 P2P_ATTR_CHANNEL_LIST = 11,
47 P2P_ATTR_NOTICE_OF_ABSENCE = 12,
48 P2P_ATTR_P2P_DEVICE_INFO = 13,
49 P2P_ATTR_P2P_GROUP_INFO = 14,
50 P2P_ATTR_P2P_GROUP_ID = 15,
51 P2P_ATTR_P2P_INTERFACE = 16,
52 P2P_ATTR_OPERATING_CHANNEL = 17,
53 P2P_ATTR_INVITATION_FLAGS = 18,
55 P2P_ATTR_VENDOR_SPECIFIC = 221,
56 /* 222-255 Reserved */
59 static const value_string p2p_attr_types[] = {
60 { P2P_ATTR_STATUS, "Status" },
61 { P2P_ATTR_MINOR_REASON_CODE, "Minor Reason Code" },
62 { P2P_ATTR_P2P_CAPABILITY, "P2P Capability" },
63 { P2P_ATTR_P2P_DEVICE_ID, "P2P Device ID" },
64 { P2P_ATTR_GROUP_OWNER_INTENT, "Group Owner Intent" },
65 { P2P_ATTR_CONFIGURATION_TIMEOUT, "Configuration Timeout" },
66 { P2P_ATTR_LISTEN_CHANNEL, "Listen Channel" },
67 { P2P_ATTR_P2P_GROUP_BSSID, "P2P Group BSSID" },
68 { P2P_ATTR_EXTENDED_LISTEN_TIMING, "Extended Listen Timing" },
69 { P2P_ATTR_INTENDED_P2P_INTERFACE_ADDRESS,
70 "Intended P2P Interface Address" },
71 { P2P_ATTR_P2P_MANAGEABILITY, "P2P Manageability" },
72 { P2P_ATTR_CHANNEL_LIST, "Channel List" },
73 { P2P_ATTR_NOTICE_OF_ABSENCE, "Notice of Absence" },
74 { P2P_ATTR_P2P_DEVICE_INFO, "P2P Device Info" },
75 { P2P_ATTR_P2P_GROUP_INFO, "P2P Group Info" },
76 { P2P_ATTR_P2P_GROUP_ID, "P2P Group ID" },
77 { P2P_ATTR_P2P_INTERFACE, "P2P Interface" },
78 { P2P_ATTR_OPERATING_CHANNEL, "Operating Channel" },
79 { P2P_ATTR_INVITATION_FLAGS, "Invitation Flags" },
80 { P2P_ATTR_VENDOR_SPECIFIC, "Vendor specific attribute" },
84 #define P2P_DEV_CAPAB_SERVICE_DISCOVERY 0x01
85 #define P2P_DEV_CAPAB_P2P_CLIENT_DISCOVERABILITY 0x02
86 #define P2P_DEV_CAPAB_CONCURRENT_OPERATION 0x04
87 #define P2P_DEV_CAPAB_P2P_INFRASTRUCTURE_MANAGED 0x08
88 #define P2P_DEV_CAPAB_P2P_DEVICE_LIMIT 0x10
89 #define P2P_DEV_CAPAB_P2P_INVITATION_PROCEDURE 0x20
91 #define P2P_GROUP_CAPAB_P2P_GROUP_OWNER 0x01
92 #define P2P_GROUP_CAPAB_PERSISTENT_P2P_GROUP 0x02
93 #define P2P_GROUP_CAPAB_P2P_GROUP_LIMIT 0x04
94 #define P2P_GROUP_CAPAB_INTRA_BSS_DISTRIBUTION 0x08
95 #define P2P_GROUP_CAPAB_CROSS_CONNECTION 0x10
96 #define P2P_GROUP_CAPAB_PERSISTENT_RECONNECT 0x20
97 #define P2P_GROUP_CAPAB_GROUP_FORMATION 0x40
99 #define WPS_CONF_METH_USBA 0x0001
100 #define WPS_CONF_METH_ETHERNET 0x0002
101 #define WPS_CONF_METH_LABEL 0x0004
102 #define WPS_CONF_METH_DISPLAY 0x0008
103 #define WPS_CONF_METH_EXT_NFC_TOKEN 0x0010
104 #define WPS_CONF_METH_INT_NFC_TOKEN 0x0020
105 #define WPS_CONF_METH_NFC_INTERFACE 0x0040
106 #define WPS_CONF_METH_PUSHBUTTON 0x0080
107 #define WPS_CONF_METH_KEYPAD 0x0100
110 P2P_ACT_GO_NEG_REQ = 0,
111 P2P_ACT_GO_NEG_RESP = 1,
112 P2P_ACT_GO_NEG_CONF = 2,
113 P2P_ACT_INVITATION_REQ = 3,
114 P2P_ACT_INVITATION_RESP = 4,
115 P2P_ACT_DEV_DISC_REQ = 5,
116 P2P_ACT_DEV_DISC_RESP = 6,
117 P2P_ACT_PROV_DISC_REQ = 7,
118 P2P_ACT_PROV_DISC_RESP = 8,
121 static const value_string p2p_public_action_subtypes[] = {
122 { P2P_ACT_GO_NEG_REQ, "GO Negotiation Request" },
123 { P2P_ACT_GO_NEG_RESP, "GO Negotiation Response" },
124 { P2P_ACT_GO_NEG_CONF, "GO Negotiation Confirmation" },
125 { P2P_ACT_INVITATION_REQ, "P2P Invitation Request" },
126 { P2P_ACT_INVITATION_RESP, "P2P Invitation Response" },
127 { P2P_ACT_DEV_DISC_REQ, "Device Discoverability Request" },
128 { P2P_ACT_DEV_DISC_RESP, "Device Discoverability Response" },
129 { P2P_ACT_PROV_DISC_REQ, "Provision Discovery Request" },
130 { P2P_ACT_PROV_DISC_RESP, "Provision Discovery Response" },
136 P2P_ACT_P2P_PRESENCE_REQ = 1,
137 P2P_ACT_P2P_PRESENCE_RESP = 2,
138 P2P_ACT_GO_DISC_REQ = 3,
141 static const value_string p2p_action_subtypes[] = {
142 { P2P_ACT_NOA, "Notice of Absence" },
143 { P2P_ACT_P2P_PRESENCE_REQ, "P2P Presence Request" },
144 { P2P_ACT_P2P_PRESENCE_RESP, "P2P Presence Response" },
145 { P2P_ACT_GO_DISC_REQ, "GO Discoverability Request" },
150 P2P_STATUS_SUCCESS = 0,
151 P2P_FAIL_INFORMATION_CURRENTLY_UNAVAILABLE = 1,
152 P2P_FAIL_INCOMPATIBLE_PARAMETERS = 2,
153 P2P_FAIL_LIMIT_REACHED = 3,
154 P2P_FAIL_INVALID_PARAMETERS = 4,
155 P2P_FAIL_UNABLE_TO_ACCOMMODATE = 5,
156 P2P_FAIL_PREVIOUS_PROTOCOL_ERROR = 6,
157 P2P_FAIL_NO_COMMON_CHANNELS = 7,
158 P2P_FAIL_UNKNOWN_P2P_GROUP = 8,
159 P2P_FAIL_BOTH_DEVICES_GO = 9,
160 P2P_FAIL_INCOMPATIBLE_PROVISION_METHOD = 10,
161 P2P_FAIL_REJECTED_BY_USER = 11,
164 static const value_string p2p_status_codes[] = {
165 { P2P_STATUS_SUCCESS, "Success" },
166 { P2P_FAIL_INFORMATION_CURRENTLY_UNAVAILABLE, "Fail; information is "
167 "currently unavailable" },
168 { P2P_FAIL_INCOMPATIBLE_PARAMETERS, "Fail; incompatible parameters" },
169 { P2P_FAIL_LIMIT_REACHED, "Fail; limit reached" },
170 { P2P_FAIL_INVALID_PARAMETERS, "Fail; invalid parameters" },
171 { P2P_FAIL_UNABLE_TO_ACCOMMODATE, "Fail; unable to accommodate request" },
172 { P2P_FAIL_PREVIOUS_PROTOCOL_ERROR, "Fail; previous protocol error, or "
173 "disruptive behavior" },
174 { P2P_FAIL_NO_COMMON_CHANNELS, "Fail; no common channels" },
175 { P2P_FAIL_UNKNOWN_P2P_GROUP, "Fail; unknown P2P Group" },
176 { P2P_FAIL_BOTH_DEVICES_GO, "Fail; both P2P Devices indicated an Intent of "
177 "15 in Group Owner Negotiation" },
178 { P2P_FAIL_INCOMPATIBLE_PROVISION_METHOD, "Fail; incompatible provisioning "
180 { P2P_FAIL_REJECTED_BY_USER, "Fail; rejected by user" },
185 P2P_MINOR_RESERVED = 0,
186 P2P_MINOR_DISCONNECT_DUE_TO_CROSS_CONNECTION = 1,
187 P2P_MINOR_DISCONNECT_DUE_TO_NOT_P2P_MANAGED = 2,
188 P2P_MINOR_DISCONNECT_DUE_TO_NO_COEXISTENCE = 3,
189 P2P_MINOR_DISCONNECT_DUE_TO_OUTSIDE_POLICY = 4,
192 static const value_string p2p_minor_reason_codes[] = {
193 { P2P_MINOR_RESERVED, "Reserved" },
194 { P2P_MINOR_DISCONNECT_DUE_TO_CROSS_CONNECTION,
195 "Disconnected because Cross Connection capability is not allow" },
196 { P2P_MINOR_DISCONNECT_DUE_TO_NOT_P2P_MANAGED,
197 "Disconnected because P2P Infrastructure Managed not supported" },
198 { P2P_MINOR_DISCONNECT_DUE_TO_NO_COEXISTENCE,
199 "Disconnected because concurrent device is not setting coexistence "
201 { P2P_MINOR_DISCONNECT_DUE_TO_OUTSIDE_POLICY,
202 "Disconnected because P2P operation is outside the IT defined policy" },
206 static const value_string invitation_types[] = {
207 { 0, "Join active P2P Group" },
208 { 1, "Reinvoke Persistent Group" },
212 static const value_string p2p_service_protocol_types[] = {
213 { 0, "All Service Protocol Types" },
216 { 3, "WS-Discovery" },
220 static const value_string p2p_sd_status_codes[] = {
222 { 1, "Service Protocol Type not available" },
223 { 2, "Requested information not available" },
224 { 3, "Bad Request" },
228 static int proto_p2p = -1;
230 static gint ett_p2p_tlv = -1;
231 static gint ett_p2p_service_tlv = -1;
233 static int hf_p2p_attr_type = -1;
234 static int hf_p2p_attr_len = -1;
236 static int hf_p2p_attr_capab = -1;
237 static int hf_p2p_attr_capab_device = -1;
238 static int hf_p2p_attr_capab_device_service_discovery = -1;
239 static int hf_p2p_attr_capab_device_client_discoverability = -1;
240 static int hf_p2p_attr_capab_device_concurrent_operation = -1;
241 static int hf_p2p_attr_capab_device_infrastructure_managed = -1;
242 static int hf_p2p_attr_capab_device_limit = -1;
243 static int hf_p2p_attr_capab_invitation_procedure = -1;
244 static int hf_p2p_attr_capab_group = -1;
245 static int hf_p2p_attr_capab_group_owner = -1;
246 static int hf_p2p_attr_capab_group_persistent = -1;
247 static int hf_p2p_attr_capab_group_limit = -1;
248 static int hf_p2p_attr_capab_group_intra_bss_distribution = -1;
249 static int hf_p2p_attr_capab_group_cross_connection = -1;
250 static int hf_p2p_attr_capab_group_persistent_reconnect = -1;
251 static int hf_p2p_attr_capab_group_group_formation = -1;
253 static int hf_p2p_attr_device_id = -1;
255 static int hf_p2p_attr_status = -1;
257 static int hf_p2p_attr_go_intent = -1;
258 static int hf_p2p_attr_go_intent_tie_breaker = -1;
260 static int hf_p2p_attr_listen_channel = -1;
261 static int hf_p2p_attr_listen_channel_country = -1;
262 static int hf_p2p_attr_listen_channel_oper_class = -1;
263 static int hf_p2p_attr_listen_channel_number = -1;
265 static int hf_p2p_attr_operating_channel = -1;
266 static int hf_p2p_attr_operating_channel_country = -1;
267 static int hf_p2p_attr_operating_channel_oper_class = -1;
268 static int hf_p2p_attr_operating_channel_number = -1;
270 static int hf_p2p_attr_channel_list = -1;
271 static int hf_p2p_attr_channel_list_country = -1;
272 static int hf_p2p_attr_channel_list_oper_class = -1;
273 static int hf_p2p_attr_channel_list_num_chan = -1;
274 static int hf_p2p_attr_channel_list_chan = -1;
276 static int hf_p2p_attr_dev_info = -1;
277 static int hf_p2p_attr_dev_info_p2p_dev_addr = -1;
278 static int hf_p2p_attr_dev_info_pri_dev_type = -1;
279 static int hf_p2p_attr_dev_info_pri_dev_type_category = -1;
280 static int hf_p2p_attr_dev_info_pri_dev_type_oui = -1;
281 static int hf_p2p_attr_dev_info_pri_dev_type_subcategory = -1;
282 static int hf_p2p_attr_dev_info_num_sec = -1;
283 static int hf_p2p_attr_dev_info_sec_dev_type = -1;
284 static int hf_p2p_attr_dev_info_dev_name_type = -1;
285 static int hf_p2p_attr_dev_info_dev_name_len = -1;
286 static int hf_p2p_attr_dev_info_dev_name = -1;
287 static int hf_p2p_attr_dev_info_config_methods = -1;
288 static int hf_p2p_attr_dev_info_config_methods_usba = -1;
289 static int hf_p2p_attr_dev_info_config_methods_ethernet = -1;
290 static int hf_p2p_attr_dev_info_config_methods_label = -1;
291 static int hf_p2p_attr_dev_info_config_methods_display = -1;
292 static int hf_p2p_attr_dev_info_config_methods_ext_nfc_token = -1;
293 static int hf_p2p_attr_dev_info_config_methods_int_nfc_token = -1;
294 static int hf_p2p_attr_dev_info_config_methods_nfc_interface = -1;
295 static int hf_p2p_attr_dev_info_config_methods_pushbutton = -1;
296 static int hf_p2p_attr_dev_info_config_methods_keypad = -1;
297 static int hf_p2p_attr_config_timeout_go = -1;
298 static int hf_p2p_attr_config_timeout_client = -1;
299 static int hf_p2p_attr_intended_interface_addr = -1;
300 static int hf_p2p_attr_extended_listen_timing_period = -1;
301 static int hf_p2p_attr_extended_listen_timing_interval = -1;
302 static int hf_p2p_attr_p2p_group_id_dev_addr = -1;
303 static int hf_p2p_attr_p2p_group_id_ssid = -1;
304 static int hf_p2p_attr_p2p_group_bssid = -1;
306 static int hf_p2p_attr_noa_index = -1;
307 static int hf_p2p_attr_noa_params = -1;
308 static int hf_p2p_attr_noa_params_opp_ps = -1;
309 static int hf_p2p_attr_noa_params_ctwindow = -1;
310 static int hf_p2p_attr_noa_count_type = -1;
311 static int hf_p2p_attr_noa_duration = -1;
312 static int hf_p2p_attr_noa_interval = -1;
313 static int hf_p2p_attr_noa_start_time = -1;
315 static int hf_p2p_attr_gi = -1;
316 static int hf_p2p_attr_gi_length = -1;
317 static int hf_p2p_attr_gi_p2p_dev_addr = -1;
318 static int hf_p2p_attr_gi_p2p_iface_addr = -1;
319 static int hf_p2p_attr_gi_dev_capab = -1;
320 static int hf_p2p_attr_gi_dev_capab_service_discovery = -1;
321 static int hf_p2p_attr_gi_dev_capab_client_discoverability = -1;
322 static int hf_p2p_attr_gi_dev_capab_concurrent_operation = -1;
323 static int hf_p2p_attr_gi_dev_capab_infrastructure_managed = -1;
324 static int hf_p2p_attr_gi_dev_capab_limit = -1;
325 static int hf_p2p_attr_gi_dev_capab_invitation_procedure = -1;
326 static int hf_p2p_attr_gi_config_methods = -1;
327 static int hf_p2p_attr_gi_config_methods_usba = -1;
328 static int hf_p2p_attr_gi_config_methods_ethernet = -1;
329 static int hf_p2p_attr_gi_config_methods_label = -1;
330 static int hf_p2p_attr_gi_config_methods_display = -1;
331 static int hf_p2p_attr_gi_config_methods_ext_nfc_token = -1;
332 static int hf_p2p_attr_gi_config_methods_int_nfc_token = -1;
333 static int hf_p2p_attr_gi_config_methods_nfc_interface = -1;
334 static int hf_p2p_attr_gi_config_methods_pushbutton = -1;
335 static int hf_p2p_attr_gi_config_methods_keypad = -1;
336 static int hf_p2p_attr_gi_pri_dev_type = -1;
337 static int hf_p2p_attr_gi_pri_dev_type_category = -1;
338 static int hf_p2p_attr_gi_pri_dev_type_oui = -1;
339 static int hf_p2p_attr_gi_pri_dev_type_subcategory = -1;
340 static int hf_p2p_attr_gi_num_sec_dev_types = -1;
341 static int hf_p2p_attr_gi_sec_dev_type = -1;
342 static int hf_p2p_attr_gi_dev_name_type = -1;
343 static int hf_p2p_attr_gi_dev_name_len = -1;
344 static int hf_p2p_attr_gi_dev_name = -1;
346 static int hf_p2p_attr_invitation_flags = -1;
347 static int hf_p2p_attr_invitation_flags_type = -1;
349 static int hf_p2p_attr_manageability_bitmap = -1;
350 static int hf_p2p_attr_manageability_bitmap_mgmt = -1;
351 static int hf_p2p_attr_manageability_bitmap_cross_connect = -1;
352 static int hf_p2p_attr_manageability_bitmap_coex_opt = -1;
354 static int hf_p2p_attr_minor_reason_code = -1;
356 static int hf_p2p_anqp_service_update_indicator = -1;
357 static int hf_p2p_anqp_length = -1;
358 static int hf_p2p_anqp_service_protocol_type = -1;
359 static int hf_p2p_anqp_service_transaction_id = -1;
360 static int hf_p2p_anqp_query_data = -1;
361 static int hf_p2p_anqp_status_code = -1;
362 static int hf_p2p_anqp_response_data = -1;
364 static int hf_p2p_action_subtype = -1;
365 static int hf_p2p_action_dialog_token = -1;
366 static int hf_p2p_public_action_subtype = -1;
367 static int hf_p2p_public_action_dialog_token = -1;
369 static void dissect_wifi_p2p_capability(proto_item *tlv_root,
370 proto_item *tlv_item,
371 tvbuff_t *tvb, int offset)
373 proto_tree_add_item(tlv_root, hf_p2p_attr_capab_device, tvb,
374 offset + 3, 1, FALSE);
375 proto_tree_add_item(tlv_root,
376 hf_p2p_attr_capab_device_service_discovery, tvb,
377 offset + 3, 1, FALSE);
378 proto_tree_add_item(tlv_root,
379 hf_p2p_attr_capab_device_client_discoverability,
380 tvb, offset + 3, 1, FALSE);
381 proto_tree_add_item(tlv_root,
382 hf_p2p_attr_capab_device_concurrent_operation,
383 tvb, offset + 3, 1, FALSE);
384 proto_tree_add_item(tlv_root,
385 hf_p2p_attr_capab_device_infrastructure_managed,
386 tvb, offset + 3, 1, FALSE);
387 proto_tree_add_item(tlv_root, hf_p2p_attr_capab_device_limit, tvb,
388 offset + 3, 1, FALSE);
389 proto_tree_add_item(tlv_root, hf_p2p_attr_capab_invitation_procedure, tvb,
390 offset + 3, 1, FALSE);
392 proto_tree_add_item(tlv_root, hf_p2p_attr_capab_group,
393 tvb, offset + 4, 1, FALSE);
394 proto_tree_add_item(tlv_root, hf_p2p_attr_capab_group_owner,
395 tvb, offset + 4, 1, FALSE);
396 proto_tree_add_item(tlv_root, hf_p2p_attr_capab_group_persistent,
397 tvb, offset + 4, 1, FALSE);
398 proto_tree_add_item(tlv_root, hf_p2p_attr_capab_group_limit,
399 tvb, offset + 4, 1, FALSE);
400 proto_tree_add_item(tlv_root,
401 hf_p2p_attr_capab_group_intra_bss_distribution,
402 tvb, offset + 4, 1, FALSE);
403 proto_tree_add_item(tlv_root, hf_p2p_attr_capab_group_cross_connection,
404 tvb, offset + 4, 1, FALSE);
405 proto_tree_add_item(tlv_root,
406 hf_p2p_attr_capab_group_persistent_reconnect,
407 tvb, offset + 4, 1, FALSE);
408 proto_tree_add_item(tlv_root, hf_p2p_attr_capab_group_group_formation,
409 tvb, offset + 4, 1, FALSE);
411 proto_item_append_text(tlv_item, ": Device 0x%x Group 0x%x",
412 tvb_get_guint8(tvb, offset + 3),
413 tvb_get_guint8(tvb, offset + 4));
416 static void dissect_device_id(proto_item *tlv_root, proto_item *tlv_item,
417 tvbuff_t *tvb, int offset)
420 proto_tree_add_item(tlv_root, hf_p2p_attr_device_id, tvb,
421 offset + 3, 6, FALSE);
422 tvb_memcpy(tvb, addr, offset + 3, 6);
423 proto_item_append_text(tlv_item, ": %s", ether_to_str(addr));
426 static void dissect_group_owner_intent(proto_item *tlv_root,
427 proto_item *tlv_item,
428 tvbuff_t *tvb, int offset)
430 proto_tree_add_item(tlv_root, hf_p2p_attr_go_intent, tvb,
431 offset + 3, 1, FALSE);
432 proto_tree_add_item(tlv_root, hf_p2p_attr_go_intent_tie_breaker, tvb,
433 offset + 3, 1, FALSE);
434 proto_item_append_text(tlv_item, ": Intent %u Tie breaker %u",
435 tvb_get_guint8(tvb, offset + 3) >> 1,
436 tvb_get_guint8(tvb, offset + 3) & 0x01);
439 static void dissect_status(proto_item *tlv_root, proto_item *tlv_item,
440 tvbuff_t *tvb, int offset)
442 proto_tree_add_item(tlv_root, hf_p2p_attr_status, tvb,
443 offset + 3, 1, FALSE);
444 proto_item_append_text(tlv_item, ": %u (%s)",
445 tvb_get_guint8(tvb, offset + 3),
446 val_to_str(tvb_get_guint8(tvb, offset + 3),
448 "Unknown Status Code (%u)"));
451 static void dissect_listen_channel(proto_item *tlv_root, proto_item *tlv_item,
452 tvbuff_t *tvb, int offset)
454 proto_tree_add_item(tlv_root, hf_p2p_attr_listen_channel_country, tvb,
455 offset + 3, 3, FALSE);
456 proto_tree_add_item(tlv_root, hf_p2p_attr_listen_channel_oper_class, tvb,
457 offset + 6, 1, FALSE);
458 proto_tree_add_item(tlv_root, hf_p2p_attr_listen_channel_number, tvb,
459 offset + 7, 1, FALSE);
460 proto_item_append_text(tlv_item, ": Operating Class %u "
462 tvb_get_guint8(tvb, offset + 6),
463 tvb_get_guint8(tvb, offset + 7));
466 static void dissect_operating_channel(proto_item *tlv_root,
467 proto_item *tlv_item,
468 tvbuff_t *tvb, int offset)
470 proto_tree_add_item(tlv_root, hf_p2p_attr_operating_channel_country, tvb,
471 offset + 3, 3, FALSE);
472 proto_tree_add_item(tlv_root, hf_p2p_attr_operating_channel_oper_class, tvb,
473 offset + 6, 1, FALSE);
474 proto_tree_add_item(tlv_root, hf_p2p_attr_operating_channel_number, tvb,
475 offset + 7, 1, FALSE);
476 proto_item_append_text(tlv_item, ": Operating Class %u "
478 tvb_get_guint8(tvb, offset + 6),
479 tvb_get_guint8(tvb, offset + 7));
482 static void dissect_channel_list(proto_item *tlv_root, tvbuff_t *tvb,
483 int offset, guint16 slen)
485 int s_offset = offset + 3;
488 proto_tree_add_item(tlv_root, hf_p2p_attr_channel_list_country, tvb,
492 while (offset + 3 + slen > s_offset) {
493 proto_tree_add_item(tlv_root, hf_p2p_attr_channel_list_oper_class, tvb,
497 proto_tree_add_item(tlv_root, hf_p2p_attr_channel_list_num_chan, tvb,
499 num_chan = tvb_get_guint8(tvb, s_offset);
502 proto_tree_add_item(tlv_root, hf_p2p_attr_channel_list_chan, tvb,
503 s_offset, num_chan, FALSE);
504 s_offset += num_chan;
508 static void dissect_wifi_p2p_device_info(packet_info *pinfo,
509 proto_item *tlv_root, tvbuff_t *tvb,
510 int offset, guint16 slen)
514 guint16 attr_type, attr_len;
517 s_offset = offset + 3;
519 proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_p2p_dev_addr, tvb,
523 proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_config_methods,
524 tvb, s_offset, 2, FALSE);
525 proto_tree_add_item(tlv_root,
526 hf_p2p_attr_dev_info_config_methods_usba,
527 tvb, s_offset, 2, FALSE);
528 proto_tree_add_item(tlv_root,
529 hf_p2p_attr_dev_info_config_methods_ethernet,
530 tvb, s_offset, 2, FALSE);
531 proto_tree_add_item(tlv_root,
532 hf_p2p_attr_dev_info_config_methods_label,
533 tvb, s_offset, 2, FALSE);
534 proto_tree_add_item(tlv_root,
535 hf_p2p_attr_dev_info_config_methods_display,
536 tvb, s_offset, 2, FALSE);
537 proto_tree_add_item(tlv_root,
538 hf_p2p_attr_dev_info_config_methods_ext_nfc_token,
539 tvb, s_offset, 2, FALSE);
540 proto_tree_add_item(tlv_root,
541 hf_p2p_attr_dev_info_config_methods_int_nfc_token,
542 tvb, s_offset, 2, FALSE);
543 proto_tree_add_item(tlv_root,
544 hf_p2p_attr_dev_info_config_methods_nfc_interface,
545 tvb, s_offset, 2, FALSE);
546 proto_tree_add_item(tlv_root,
547 hf_p2p_attr_dev_info_config_methods_pushbutton,
548 tvb, s_offset, 2, FALSE);
549 proto_tree_add_item(tlv_root,
550 hf_p2p_attr_dev_info_config_methods_keypad,
551 tvb, s_offset, 2, FALSE);
555 proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_pri_dev_type, tvb,
557 proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_pri_dev_type_category,
558 tvb, s_offset, 2, FALSE);
559 proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_pri_dev_type_oui,
560 tvb, s_offset + 2, 4, FALSE);
561 proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_pri_dev_type_subcategory,
562 tvb, s_offset + 6, 2, FALSE);
565 num_sec = tvb_get_guint8(tvb, s_offset);
566 proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_num_sec, tvb,
570 while (num_sec > 0) {
571 proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_sec_dev_type,
572 tvb, s_offset, 8, FALSE);
577 item = proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_dev_name_type,
578 tvb, s_offset, 2, FALSE);
579 attr_type = tvb_get_ntohs(tvb, s_offset);
580 if (attr_type != 0x1011) {
581 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
582 "Incorrect Device Name attribute type");
585 item = proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_dev_name_len,
586 tvb, s_offset, 2, FALSE);
587 attr_len = tvb_get_ntohs(tvb, s_offset);
589 if (attr_len > offset + 3 + slen - s_offset) {
590 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
591 "Invalid Device Name attribute length");
594 nlen = offset + 3 + slen - s_offset;
596 item = proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_dev_name,
598 nlen > attr_len ? attr_len : nlen,
600 if (nlen != attr_len) {
601 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
602 "Invalid Device Name attribute");
606 static void dissect_configuration_timeout(proto_item *tlv_root,
607 proto_item *tlv_item,
608 tvbuff_t *tvb, int offset)
610 proto_tree_add_item(tlv_root, hf_p2p_attr_config_timeout_go, tvb,
611 offset + 3, 1, FALSE);
612 proto_tree_add_item(tlv_root, hf_p2p_attr_config_timeout_client, tvb,
613 offset + 4, 1, FALSE);
614 proto_item_append_text(tlv_item, ": GO %u msec, client %u msec",
615 tvb_get_guint8(tvb, offset + 3) * 10,
616 tvb_get_guint8(tvb, offset + 4) * 10);
619 static void dissect_intended_interface_addr(proto_item *tlv_root,
620 proto_item *tlv_item,
621 tvbuff_t *tvb, int offset)
624 proto_tree_add_item(tlv_root, hf_p2p_attr_intended_interface_addr, tvb,
625 offset + 3, 6, FALSE);
626 tvb_memcpy(tvb, addr, offset + 3, 6);
627 proto_item_append_text(tlv_item, ": %s", ether_to_str(addr));
630 static void dissect_extended_listen_timing(proto_item *tlv_root,
631 proto_item *tlv_item,
632 tvbuff_t *tvb, int offset)
634 guint16 period, interval;
635 period = tvb_get_letohs(tvb, offset + 3);
636 interval = tvb_get_letohs(tvb, offset + 5);
637 proto_tree_add_uint(tlv_root, hf_p2p_attr_extended_listen_timing_period, tvb,
638 offset + 3, 2, period);
639 proto_tree_add_uint(tlv_root, hf_p2p_attr_extended_listen_timing_interval,
640 tvb, offset + 5, 2, interval);
641 proto_item_append_text(tlv_item, ": Availability Period %u msec, "
642 "Availability Interval %u msec", period, interval);
645 static void dissect_wifi_p2p_group_id(proto_item *tlv_root,
646 proto_item *tlv_item, tvbuff_t *tvb,
647 int offset, guint16 slen)
652 s_offset = offset + 3;
653 proto_tree_add_item(tlv_root, hf_p2p_attr_p2p_group_id_dev_addr, tvb,
655 tvb_memcpy(tvb, addr, offset + 3, 6);
656 proto_item_append_text(tlv_item, ": %s", ether_to_str(addr));
658 proto_tree_add_item(tlv_root, hf_p2p_attr_p2p_group_id_ssid, tvb,
659 s_offset, offset + 3 + slen - s_offset, FALSE);
662 static void dissect_wifi_p2p_group_bssid(packet_info *pinfo,
663 proto_item *tlv_root,
664 proto_item *tlv_item, tvbuff_t *tvb,
665 int offset, guint16 slen)
671 expert_add_info_format(pinfo, tlv_item, PI_MALFORMED, PI_ERROR,
672 "Invalid ethernet address");
676 s_offset = offset + 3;
677 proto_tree_add_item(tlv_root, hf_p2p_attr_p2p_group_bssid, tvb,
679 tvb_memcpy(tvb, addr, offset + 3, 6);
680 proto_item_append_text(tlv_item, ": %s", ether_to_str(addr));
683 static void dissect_notice_of_absence(packet_info *pinfo, proto_item *tlv_root,
684 proto_item *tlv_item,
685 tvbuff_t *tvb, int offset, guint16 slen)
687 int s_offset = offset + 3;
690 expert_add_info_format(pinfo, tlv_item, PI_MALFORMED, PI_ERROR,
695 proto_tree_add_item(tlv_root, hf_p2p_attr_noa_index, tvb, s_offset, 1,
697 proto_tree_add_item(tlv_root, hf_p2p_attr_noa_params, tvb, s_offset + 1, 1,
699 proto_tree_add_item(tlv_root, hf_p2p_attr_noa_params_opp_ps, tvb,
700 s_offset + 1, 1, FALSE);
701 proto_tree_add_item(tlv_root, hf_p2p_attr_noa_params_ctwindow, tvb,
702 s_offset + 1, 1, FALSE);
705 while (offset + 3 + slen >= s_offset + 13) {
706 proto_tree_add_item(tlv_root, hf_p2p_attr_noa_count_type, tvb, s_offset, 1,
709 proto_tree_add_item(tlv_root, hf_p2p_attr_noa_duration, tvb, s_offset, 4,
712 proto_tree_add_item(tlv_root, hf_p2p_attr_noa_interval, tvb, s_offset, 4,
715 proto_tree_add_item(tlv_root, hf_p2p_attr_noa_start_time, tvb, s_offset, 4,
721 static void dissect_wifi_p2p_group_info(packet_info *pinfo,
722 proto_item *tlv_root,
723 proto_item *tlv_item,
724 tvbuff_t *tvb, int offset,
727 int s_offset = offset + 3;
728 int next_offset, ci_len, num_sec, left, nlen;
729 guint16 attr_type, attr_len;
732 while (offset + 3 + slen > s_offset) {
733 if (offset + 3 + slen - s_offset < 25) {
734 expert_add_info_format(pinfo, tlv_item, PI_MALFORMED, PI_ERROR,
735 "Too short P2P Client Info Descriptor");
739 item = proto_tree_add_item(tlv_root, hf_p2p_attr_gi_length, tvb, s_offset,
741 ci_len = tvb_get_guint8(tvb, s_offset);
742 if (ci_len < 24 || s_offset + ci_len > offset + 3 + slen) {
743 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
744 "Invalid P2P Client Info Descriptor Length");
748 next_offset = s_offset + ci_len;
750 proto_tree_add_item(tlv_root, hf_p2p_attr_gi_p2p_dev_addr, tvb, s_offset,
754 proto_tree_add_item(tlv_root, hf_p2p_attr_gi_p2p_iface_addr, tvb, s_offset,
758 proto_tree_add_item(tlv_root, hf_p2p_attr_gi_dev_capab, tvb, s_offset, 1,
760 proto_tree_add_item(tlv_root,
761 hf_p2p_attr_gi_dev_capab_service_discovery, tvb,
763 proto_tree_add_item(tlv_root,
764 hf_p2p_attr_gi_dev_capab_client_discoverability,
765 tvb, s_offset, 1, FALSE);
766 proto_tree_add_item(tlv_root,
767 hf_p2p_attr_gi_dev_capab_concurrent_operation,
768 tvb, s_offset, 1, FALSE);
769 proto_tree_add_item(tlv_root,
770 hf_p2p_attr_gi_dev_capab_infrastructure_managed,
771 tvb, s_offset, 1, FALSE);
772 proto_tree_add_item(tlv_root, hf_p2p_attr_gi_dev_capab_limit, tvb,
774 proto_tree_add_item(tlv_root, hf_p2p_attr_capab_invitation_procedure, tvb,
778 proto_tree_add_item(tlv_root, hf_p2p_attr_gi_config_methods, tvb, s_offset,
782 proto_tree_add_item(tlv_root, hf_p2p_attr_gi_pri_dev_type, tvb,
784 proto_tree_add_item(tlv_root, hf_p2p_attr_gi_pri_dev_type_category,
785 tvb, s_offset, 2, FALSE);
786 proto_tree_add_item(tlv_root, hf_p2p_attr_gi_pri_dev_type_oui,
787 tvb, s_offset + 2, 4, FALSE);
788 proto_tree_add_item(tlv_root, hf_p2p_attr_gi_pri_dev_type_subcategory,
789 tvb, s_offset + 6, 2, FALSE);
792 item = proto_tree_add_item(tlv_root, hf_p2p_attr_gi_num_sec_dev_types, tvb,
794 num_sec = tvb_get_guint8(tvb, s_offset);
796 left = offset + 3 + slen - s_offset;
797 if (left < 8 * num_sec) {
798 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
799 "Invalid Secondary Device Type List");
802 while (num_sec > 0) {
803 proto_tree_add_item(tlv_root, hf_p2p_attr_gi_sec_dev_type,
804 tvb, s_offset, 8, FALSE);
809 item = proto_tree_add_item(tlv_root, hf_p2p_attr_gi_dev_name_type,
810 tvb, s_offset, 2, FALSE);
811 attr_type = tvb_get_ntohs(tvb, s_offset);
812 if (attr_type != 0x1011) {
813 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
814 "Incorrect Device Name attribute type");
817 item = proto_tree_add_item(tlv_root, hf_p2p_attr_gi_dev_name_len,
818 tvb, s_offset, 2, FALSE);
819 attr_len = tvb_get_ntohs(tvb, s_offset);
821 if (attr_len > offset + 3 + slen - s_offset) {
822 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
823 "Invalid Device Name attribute length");
826 nlen = offset + 3 + slen - s_offset;
828 item = proto_tree_add_item(tlv_root, hf_p2p_attr_gi_dev_name,
830 nlen > attr_len ? attr_len : nlen,
832 if (nlen != attr_len) {
833 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
834 "Invalid Device Name attribute");
837 s_offset = next_offset;
841 static void dissect_invitation_flags(proto_item *tlv_root,
842 proto_item *tlv_item,
843 tvbuff_t *tvb, int offset)
845 proto_tree_add_item(tlv_root, hf_p2p_attr_invitation_flags, tvb,
846 offset + 3, 1, FALSE);
847 proto_tree_add_item(tlv_root, hf_p2p_attr_invitation_flags_type, tvb,
848 offset + 3, 1, FALSE);
849 proto_item_append_text(tlv_item, ": Invitation Flags 0x%x",
850 tvb_get_guint8(tvb, offset + 3));
853 static void dissect_manageability(proto_item *tlv_root,
854 proto_item *tlv_item,
855 tvbuff_t *tvb, int offset)
857 proto_tree_add_item(tlv_root, hf_p2p_attr_manageability_bitmap, tvb,
858 offset + 3, 1, FALSE);
859 proto_tree_add_item(tlv_root, hf_p2p_attr_manageability_bitmap_mgmt, tvb,
860 offset + 3, 1, FALSE);
861 proto_tree_add_item(tlv_root, hf_p2p_attr_manageability_bitmap_cross_connect,
862 tvb, offset + 3, 1, FALSE);
863 proto_tree_add_item(tlv_root, hf_p2p_attr_manageability_bitmap_coex_opt, tvb,
864 offset + 3, 1, FALSE);
865 proto_item_append_text(tlv_item, ": Bitmap field 0x%x",
866 tvb_get_guint8(tvb, offset + 3));
869 static void dissect_minor_reason_code(proto_item *tlv_root,
870 proto_item *tlv_item,
871 tvbuff_t *tvb, int offset)
873 proto_tree_add_item(tlv_root, hf_p2p_attr_minor_reason_code, tvb,
874 offset + 3, 1, FALSE);
875 proto_item_append_text(tlv_item, ": %u (%s)",
876 tvb_get_guint8(tvb, offset + 3),
877 val_to_str(tvb_get_guint8(tvb, offset + 3),
878 p2p_minor_reason_codes,
879 "Unknown Minor Reason Code (%u)"));
882 void dissect_wifi_p2p_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
883 int offset, gint size)
887 proto_item *tlv_root, *tlv_item;
891 expert_add_info_format(pinfo, NULL, PI_MALFORMED, PI_ERROR,
892 "Packet too short for P2P IE");
896 stype = tvb_get_guint8(tvb, offset);
897 slen = tvb_get_letohs(tvb, offset + 1);
899 tlv_item = proto_tree_add_text(tree, tvb, offset, 3 + slen, "%s",
900 val_to_str(stype, p2p_attr_types,
901 "Unknown attribute type (%u)"));
902 tlv_root = proto_item_add_subtree(tlv_item, ett_p2p_tlv);
904 proto_tree_add_item(tlv_root, hf_p2p_attr_type, tvb, offset, 1, FALSE);
905 proto_tree_add_uint(tlv_root, hf_p2p_attr_len, tvb, offset + 1, 2,
909 case P2P_ATTR_P2P_CAPABILITY:
910 dissect_wifi_p2p_capability(tlv_root, tlv_item, tvb, offset);
912 case P2P_ATTR_P2P_DEVICE_ID:
913 dissect_device_id(tlv_root, tlv_item, tvb, offset);
915 case P2P_ATTR_GROUP_OWNER_INTENT:
916 dissect_group_owner_intent(tlv_root, tlv_item, tvb, offset);
918 case P2P_ATTR_STATUS:
919 dissect_status(tlv_root, tlv_item, tvb, offset);
921 case P2P_ATTR_LISTEN_CHANNEL:
922 dissect_listen_channel(tlv_root, tlv_item, tvb, offset);
924 case P2P_ATTR_OPERATING_CHANNEL:
925 dissect_operating_channel(tlv_root, tlv_item, tvb, offset);
927 case P2P_ATTR_CHANNEL_LIST:
928 dissect_channel_list(tlv_root, tvb, offset, slen);
930 case P2P_ATTR_P2P_DEVICE_INFO:
931 dissect_wifi_p2p_device_info(pinfo, tlv_root, tvb, offset, slen);
933 case P2P_ATTR_CONFIGURATION_TIMEOUT:
934 dissect_configuration_timeout(tlv_root, tlv_item, tvb, offset);
936 case P2P_ATTR_INTENDED_P2P_INTERFACE_ADDRESS:
937 dissect_intended_interface_addr(tlv_root, tlv_item, tvb, offset);
939 case P2P_ATTR_EXTENDED_LISTEN_TIMING:
940 dissect_extended_listen_timing(tlv_root, tlv_item, tvb, offset);
942 case P2P_ATTR_P2P_GROUP_ID:
943 dissect_wifi_p2p_group_id(tlv_root, tlv_item, tvb, offset, slen);
945 case P2P_ATTR_P2P_GROUP_BSSID:
946 dissect_wifi_p2p_group_bssid(pinfo, tlv_root, tlv_item, tvb, offset, slen);
948 case P2P_ATTR_NOTICE_OF_ABSENCE:
949 dissect_notice_of_absence(pinfo, tlv_root, tlv_item, tvb, offset, slen);
951 case P2P_ATTR_P2P_GROUP_INFO:
952 dissect_wifi_p2p_group_info(pinfo, tlv_root, tlv_item, tvb, offset,
955 case P2P_ATTR_INVITATION_FLAGS:
956 dissect_invitation_flags(tlv_root, tlv_item, tvb, offset);
958 case P2P_ATTR_P2P_MANAGEABILITY:
959 dissect_manageability(tlv_root, tlv_item, tvb, offset);
961 case P2P_ATTR_MINOR_REASON_CODE:
962 dissect_minor_reason_code(tlv_root, tlv_item, tvb, offset);
971 int dissect_wifi_p2p_public_action(proto_tree *tree, tvbuff_t *tvb, int offset)
973 proto_tree_add_item(tree, hf_p2p_public_action_subtype, tvb, offset, 1,
976 proto_tree_add_item(tree, hf_p2p_public_action_dialog_token, tvb, offset, 1,
979 /* Followed by variable length IEs dissected by packet-ieee80211.c */
983 int dissect_wifi_p2p_action(proto_tree *tree, tvbuff_t *tvb, int offset)
985 proto_tree_add_item(tree, hf_p2p_action_subtype, tvb, offset, 1, FALSE);
987 proto_tree_add_item(tree, hf_p2p_action_dialog_token, tvb, offset, 1, FALSE);
989 /* Followed by variable length IEs dissected by packet-ieee80211.c */
993 void dissect_wifi_p2p_anqp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
994 int offset, gboolean request)
998 item = proto_tree_add_item(tree, hf_p2p_anqp_service_update_indicator, tvb,
1002 while (tvb_length_remaining(tvb, offset) >= (request ? 4 : 5)) {
1007 len = tvb_get_letohs(tvb, offset);
1009 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
1010 "Too short Service TLV field");
1013 if (len > tvb_length_remaining(tvb, offset + 2)) {
1014 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
1015 "Too short frame for Service TLV field");
1019 type = tvb_get_guint8(tvb, offset + 2);
1020 id = tvb_get_guint8(tvb, offset + 3);
1021 item = proto_tree_add_text(tree, tvb, offset, 2 + len,
1022 "Service TLV (Transaction ID: %u Type: %s)",
1023 id, val_to_str(type, p2p_service_protocol_types,
1025 tlv = proto_item_add_subtree(item, ett_p2p_service_tlv);
1027 proto_tree_add_item(tlv, hf_p2p_anqp_length, tvb, offset, 2, TRUE);
1029 proto_tree_add_item(tlv, hf_p2p_anqp_service_protocol_type, tvb,
1031 proto_tree_add_item(tlv, hf_p2p_anqp_service_transaction_id, tvb,
1032 offset + 1, 1, FALSE);
1034 proto_tree_add_item(tlv, hf_p2p_anqp_query_data, tvb,
1035 offset + 2, len - 2, FALSE);
1037 proto_tree_add_item(tlv, hf_p2p_anqp_status_code, tvb,
1038 offset + 2, 1, FALSE);
1039 proto_tree_add_item(tlv, hf_p2p_anqp_response_data, tvb,
1040 offset + 3, len - 3, FALSE);
1045 if (tvb_length_remaining(tvb, offset) > 0) {
1046 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
1047 "Unexpected padding in the end of P2P ANQP");
1052 proto_register_p2p(void)
1054 static hf_register_info hf[] = {
1055 { &hf_p2p_attr_type,
1056 { "Attribute Type", "wifi_p2p.type",
1057 FT_UINT8, BASE_DEC, VALS(p2p_attr_types), 0x0, NULL, HFILL }},
1059 { "Attribute Length", "wifi_p2p.length",
1060 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1062 { &hf_p2p_attr_capab,
1063 { "P2P Capability", "wifi_p2p.p2p_capability",
1064 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1065 { &hf_p2p_attr_capab_device,
1066 { "Device Capability Bitmap",
1067 "wifi_p2p.p2p_capability.device_capability",
1068 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
1069 { &hf_p2p_attr_capab_device_service_discovery,
1070 { "Service Discovery",
1071 "wifi_p2p.p2p_capability.device_capability.service_discovery",
1072 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_SERVICE_DISCOVERY, NULL, HFILL
1074 { &hf_p2p_attr_capab_device_client_discoverability,
1075 { "P2P Client Discoverability",
1076 "wifi_p2p.p2p_capability.device_capability.client_discoverability",
1077 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_P2P_CLIENT_DISCOVERABILITY,
1080 { &hf_p2p_attr_capab_device_concurrent_operation,
1081 { "Concurrent Operation",
1082 "wifi_p2p.p2p_capability.device_capability.concurrent_operation",
1083 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_CONCURRENT_OPERATION, NULL,
1086 { &hf_p2p_attr_capab_device_infrastructure_managed,
1087 { "P2P Infrastructure Managed",
1088 "wifi_p2p.p2p_capability.device_capability.infrastructure_managed",
1089 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_P2P_INFRASTRUCTURE_MANAGED,
1092 { &hf_p2p_attr_capab_device_limit,
1093 { "P2P Device Limit",
1094 "wifi_p2p.p2p_capability.device_capability.device_limit",
1095 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_P2P_DEVICE_LIMIT, NULL, HFILL
1097 { &hf_p2p_attr_capab_invitation_procedure,
1098 { "P2P Invitation Procedure",
1099 "wifi_p2p.p2p_capability.device_capability.invitation_procedure",
1100 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_P2P_INVITATION_PROCEDURE, NULL,
1103 { &hf_p2p_attr_capab_group,
1104 { "Group Capability Bitmap", "wifi_p2p.p2p_capability.group_capability",
1105 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
1106 { &hf_p2p_attr_capab_group_owner,
1107 { "P2P Group Owner",
1108 "wifi_p2p.p2p_capability.group_capability.group_owner",
1109 FT_UINT8, BASE_HEX, NULL, P2P_GROUP_CAPAB_P2P_GROUP_OWNER, NULL, HFILL
1111 { &hf_p2p_attr_capab_group_persistent,
1112 { "Persistent P2P Group",
1113 "wifi_p2p.p2p_capability.group_capability.persistent_group",
1114 FT_UINT8, BASE_HEX, NULL, P2P_GROUP_CAPAB_PERSISTENT_P2P_GROUP, NULL,
1116 { &hf_p2p_attr_capab_group_limit,
1117 { "P2P Group Limit",
1118 "wifi_p2p.p2p_capability.group_capability.group_limit",
1119 FT_UINT8, BASE_HEX, NULL, P2P_GROUP_CAPAB_P2P_GROUP_LIMIT, NULL, HFILL
1121 { &hf_p2p_attr_capab_group_intra_bss_distribution,
1122 { "Intra-BSS Distribution",
1123 "wifi_p2p.p2p_capability.group_capability.intra_bss_distribution",
1124 FT_UINT8, BASE_HEX, NULL, P2P_GROUP_CAPAB_INTRA_BSS_DISTRIBUTION, NULL,
1126 { &hf_p2p_attr_capab_group_cross_connection,
1127 { "Cross Connection",
1128 "wifi_p2p.p2p_capability.group_capability.cross_connection",
1129 FT_UINT8, BASE_HEX, NULL, P2P_GROUP_CAPAB_CROSS_CONNECTION, NULL, HFILL
1131 { &hf_p2p_attr_capab_group_persistent_reconnect,
1132 { "Persistent Reconnect",
1133 "wifi_p2p.p2p_capability.group_capability.persistent_reconnect",
1134 FT_UINT8, BASE_HEX, NULL, P2P_GROUP_CAPAB_PERSISTENT_RECONNECT, NULL,
1136 { &hf_p2p_attr_capab_group_group_formation,
1137 { "Group Formation",
1138 "wifi_p2p.p2p_capability.group_capability.group_formation",
1139 FT_UINT8, BASE_HEX, NULL, P2P_GROUP_CAPAB_GROUP_FORMATION, NULL, HFILL
1142 { &hf_p2p_attr_device_id,
1143 { "Device ID", "wifi_p2p.device_id",
1144 FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1146 { &hf_p2p_attr_status,
1147 { "Status Code", "wifi_p2p.status",
1148 FT_UINT8, BASE_DEC, VALS(p2p_status_codes), 0x0, NULL, HFILL }},
1150 { &hf_p2p_attr_go_intent,
1151 { "Group Owner Intent", "wifi_p2p.go_intent",
1152 FT_UINT8, BASE_DEC, NULL, 0x1e, NULL, HFILL }},
1153 { &hf_p2p_attr_go_intent_tie_breaker,
1154 { "Group Owner Intent Tie Breaker", "wifi_p2p.go_intent_tie_breaker",
1155 FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL }},
1157 { &hf_p2p_attr_listen_channel,
1158 { "Listen Channel", "wifi_p2p.listen_channel",
1159 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1160 { &hf_p2p_attr_listen_channel_country,
1161 { "Country String", "wifi_p2p.listen_channel.country_string",
1162 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1163 { &hf_p2p_attr_listen_channel_oper_class,
1164 { "Operating Class", "wifi_p2p.listen_channel.operating_class",
1165 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1166 { &hf_p2p_attr_listen_channel_number,
1167 { "Channel Number", "wifi_p2p.listen_channel.channel_number",
1168 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1170 { &hf_p2p_attr_operating_channel,
1171 { "Operating Channel", "wifi_p2p.operating_channel",
1172 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1173 { &hf_p2p_attr_operating_channel_country,
1174 { "Country String", "wifi_p2p.operating_channel.country_string",
1175 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1176 { &hf_p2p_attr_operating_channel_oper_class,
1177 { "Operating Class", "wifi_p2p.channel.operating_class",
1178 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1179 { &hf_p2p_attr_operating_channel_number,
1180 { "Channel Number", "wifi_p2p.channel.channel_number",
1181 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1183 { &hf_p2p_attr_channel_list,
1184 { "Channel List", "wifi_p2p.channel_list",
1185 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1186 { &hf_p2p_attr_channel_list_country,
1187 { "Country String", "wifi_p2p.channel_list.country_string",
1188 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1189 { &hf_p2p_attr_channel_list_oper_class,
1190 { "Operating Class", "wifi_p2p.channel_list.operating_class",
1191 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1192 { &hf_p2p_attr_channel_list_num_chan,
1193 { "Number of Channels", "wifi_p2p.channel_list.num_chan",
1194 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1195 { &hf_p2p_attr_channel_list_chan,
1196 { "Channel List", "wifi_p2p.channel_list.channel_list",
1197 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1199 { &hf_p2p_attr_dev_info,
1200 { "Device Info", "wifi_p2p.dev_info",
1201 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1202 { &hf_p2p_attr_dev_info_p2p_dev_addr,
1203 { "P2P Device address", "wifi_p2p.dev_info.p2p_dev_addr",
1204 FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1205 { &hf_p2p_attr_dev_info_pri_dev_type,
1206 { "Primary Device Type", "wifi_p2p.dev_info.pri_dev_type",
1207 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1208 { &hf_p2p_attr_dev_info_pri_dev_type_category,
1209 { "Primary Device Type: Category",
1210 "wifi_p2p.dev_info.pri_dev_type.category",
1211 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1212 { &hf_p2p_attr_dev_info_pri_dev_type_oui,
1213 { "Primary Device Type: OUI", "wifi_p2p.dev_info.pri_dev_type.oui",
1214 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1215 { &hf_p2p_attr_dev_info_pri_dev_type_subcategory,
1216 { "Primary Device Type: Subcategory",
1217 "wifi_p2p.dev_info.pri_dev_type.subcategory",
1218 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1219 { &hf_p2p_attr_dev_info_num_sec,
1220 { "Number of Secondary Device Types", "wifi_p2p.dev_info.num_sec",
1221 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1222 { &hf_p2p_attr_dev_info_sec_dev_type,
1223 { "Secondary Device Type", "wifi_p2p.dev_info.sec_dev_type",
1224 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1225 { &hf_p2p_attr_dev_info_dev_name_type,
1226 { "Device Name attribute type", "wifi_p2p.dev_info.dev_name_type",
1227 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
1228 { &hf_p2p_attr_dev_info_dev_name_len,
1229 { "Device Name attribute length", "wifi_p2p.dev_info.dev_name",
1230 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1231 { &hf_p2p_attr_dev_info_dev_name,
1232 { "Device Name", "wifi_p2p.dev_info.dev_name",
1233 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1234 { &hf_p2p_attr_dev_info_config_methods,
1235 { "Config Methods", "wifi_p2p.dev_info.config_methods",
1236 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
1237 { &hf_p2p_attr_dev_info_config_methods_usba,
1238 { "USBA (Flash Drive)", "wifi_p2p.dev_info.config_methods.usba",
1239 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_USBA, NULL, HFILL }},
1240 { &hf_p2p_attr_dev_info_config_methods_ethernet,
1241 { "Ethernet", "wifi_p2p.dev_info.config_methods.ethernet",
1242 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_ETHERNET, NULL, HFILL }},
1243 { &hf_p2p_attr_dev_info_config_methods_label,
1244 { "Label", "wifi_p2p.dev_info.config_methods.label",
1245 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_LABEL, NULL, HFILL }},
1246 { &hf_p2p_attr_dev_info_config_methods_display,
1247 { "Display", "wifi_p2p.dev_info.config_methods.display",
1248 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_DISPLAY, NULL, HFILL }},
1249 { &hf_p2p_attr_dev_info_config_methods_ext_nfc_token,
1250 { "External NFC Token", "wifi_p2p.dev_info.config_methods.ext_nfc_token",
1251 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_EXT_NFC_TOKEN, NULL, HFILL }},
1252 { &hf_p2p_attr_dev_info_config_methods_int_nfc_token,
1253 { "Integrated NFC Token",
1254 "wifi_p2p.dev_info.config_methods.int_nfc_token",
1255 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_INT_NFC_TOKEN, NULL, HFILL }},
1256 { &hf_p2p_attr_dev_info_config_methods_nfc_interface,
1257 { "NFC Interface", "wifi_p2p.dev_info.config_methods.nfc_interface",
1258 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_NFC_INTERFACE, NULL, HFILL }},
1259 { &hf_p2p_attr_dev_info_config_methods_pushbutton,
1260 { "PushButton", "wifi_p2p.dev_info.config_methods.pushbutton",
1261 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_PUSHBUTTON, NULL, HFILL }},
1262 { &hf_p2p_attr_dev_info_config_methods_keypad,
1263 { "Keypad", "wifi_p2p.dev_info.config_methods.keypad",
1264 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_KEYPAD, NULL, HFILL }},
1265 { &hf_p2p_attr_config_timeout_go,
1266 { "GO Configuration Timeout", "wifi_p2p.config_timeout.go",
1267 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1268 { &hf_p2p_attr_config_timeout_client,
1269 { "Client Configuration Timeout", "wifi_p2p.config_timeout.client",
1270 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1271 { &hf_p2p_attr_intended_interface_addr,
1272 { "P2P Interface Address", "wifi_p2p.intended_interface_addr",
1273 FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1274 { &hf_p2p_attr_extended_listen_timing_period,
1275 { "Availability Period", "wifi_p2p.extended_listen_timing.period",
1276 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1277 { &hf_p2p_attr_extended_listen_timing_interval,
1278 { "Availability Interval", "wifi_p2p.extended_listen_timing.interval",
1279 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1280 { &hf_p2p_attr_p2p_group_id_dev_addr,
1281 { "P2P Device address", "wifi_p2p.p2p_group_id.p2p_dev_addr",
1282 FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1283 { &hf_p2p_attr_p2p_group_id_ssid,
1284 { "SSID", "wifi_p2p.p2p_group_id.ssid",
1285 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1286 { &hf_p2p_attr_p2p_group_bssid,
1287 { "BSSID", "wifi_p2p.p2p_group_bssid",
1288 FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1290 { &hf_p2p_attr_noa_index,
1291 { "Index", "wifi_p2p.noa.index",
1292 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1293 { &hf_p2p_attr_noa_params,
1294 { "CTWindow and OppPS Parameters", "wifi_p2p.noa.params",
1295 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
1296 { &hf_p2p_attr_noa_params_opp_ps,
1297 { "OppPS", "wifi_p2p.noa.params.opp_ps",
1298 FT_UINT8, BASE_DEC, NULL, 0x80, NULL, HFILL }},
1299 { &hf_p2p_attr_noa_params_ctwindow,
1300 { "CTWindow", "wifi_p2p.noa.params.ctwindow",
1301 FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
1302 { &hf_p2p_attr_noa_count_type,
1303 { "Count/Type", "wifi_p2p.noa.count_type",
1304 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1305 { &hf_p2p_attr_noa_duration,
1306 { "Duration", "wifi_p2p.noa.duration",
1307 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1308 { &hf_p2p_attr_noa_interval,
1309 { "Interval", "wifi_p2p.noa.interval",
1310 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1311 { &hf_p2p_attr_noa_start_time,
1312 { "Start Time", "wifi_p2p.noa.start_time",
1313 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1316 { "Device Info", "wifi_p2p.group_info",
1317 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1318 { &hf_p2p_attr_gi_length,
1319 { "P2P Client Info Descriptor Length", "wifi_p2p.group_info.length",
1320 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1321 { &hf_p2p_attr_gi_p2p_dev_addr,
1322 { "P2P Device address", "wifi_p2p.group_info.p2p_dev_addr",
1323 FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1324 { &hf_p2p_attr_gi_p2p_iface_addr,
1325 { "P2P Interface address", "wifi_p2p.group_info.p2p_interface_addr",
1326 FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1327 { &hf_p2p_attr_gi_dev_capab,
1328 { "Device Capability Bitmap", "wifi_p2p.group_info.device_capability",
1329 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
1330 { &hf_p2p_attr_gi_dev_capab_service_discovery,
1331 { "Service Discovery",
1332 "wifi_p2p.group_info.device_capability.service_discovery",
1333 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_SERVICE_DISCOVERY, NULL, HFILL
1335 { &hf_p2p_attr_gi_dev_capab_client_discoverability,
1336 { "P2P Client Discoverability",
1337 "wifi_p2p.group_info.device_capability.client_discoverability",
1338 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_P2P_CLIENT_DISCOVERABILITY,
1341 { &hf_p2p_attr_gi_dev_capab_concurrent_operation,
1342 { "Concurrent Operation",
1343 "wifi_p2p.group_info.device_capability.concurrent_operation",
1344 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_CONCURRENT_OPERATION, NULL,
1347 { &hf_p2p_attr_gi_dev_capab_infrastructure_managed,
1348 { "P2P Infrastructure Managed",
1349 "wifi_p2p.group_info.device_capability.infrastructure_managed",
1350 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_P2P_INFRASTRUCTURE_MANAGED,
1353 { &hf_p2p_attr_gi_dev_capab_limit,
1354 { "P2P Device Limit",
1355 "wifi_p2p.group_info.device_capability.device_limit",
1356 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_P2P_DEVICE_LIMIT, NULL, HFILL
1358 { &hf_p2p_attr_gi_dev_capab_invitation_procedure,
1359 { "P2P Invitation Procedure",
1360 "wifi_p2p.group_info.device_capability.invitation_procedure",
1361 FT_UINT8, BASE_HEX, NULL, P2P_DEV_CAPAB_P2P_INVITATION_PROCEDURE, NULL,
1364 { &hf_p2p_attr_gi_pri_dev_type,
1365 { "Primary Device Type", "wifi_p2p.group_info.pri_dev_type",
1366 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1367 { &hf_p2p_attr_gi_pri_dev_type_category,
1368 { "Primary Device Type: Category",
1369 "wifi_p2p.group_info.pri_dev_type.category",
1370 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1371 { &hf_p2p_attr_gi_pri_dev_type_oui,
1372 { "Primary Device Type: OUI", "wifi_p2p.group_info.pri_dev_type.oui",
1373 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1374 { &hf_p2p_attr_gi_pri_dev_type_subcategory,
1375 { "Primary Device Type: Subcategory",
1376 "wifi_p2p.group_info.pri_dev_type.subcategory",
1377 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1378 { &hf_p2p_attr_gi_num_sec_dev_types,
1379 { "Number of Secondary Device Types", "wifi_p2p.group_info.num_sec",
1380 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1381 { &hf_p2p_attr_gi_sec_dev_type,
1382 { "Secondary Device Type", "wifi_p2p.group_info.sec_dev_type",
1383 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1384 { &hf_p2p_attr_gi_dev_name_type,
1385 { "Device Name attribute type", "wifi_p2p.group_info.dev_name_type",
1386 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
1387 { &hf_p2p_attr_gi_dev_name_len,
1388 { "Device Name attribute length", "wifi_p2p.group_info.dev_name",
1389 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1390 { &hf_p2p_attr_gi_dev_name,
1391 { "Device Name", "wifi_p2p.group_info.dev_name",
1392 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1393 { &hf_p2p_attr_gi_config_methods,
1394 { "Config Methods", "wifi_p2p.group_info.config_methods",
1395 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
1396 { &hf_p2p_attr_gi_config_methods_usba,
1397 { "USBA (Flash Drive)", "wifi_p2p.group_info.config_methods.usba",
1398 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_USBA, NULL, HFILL }},
1399 { &hf_p2p_attr_gi_config_methods_ethernet,
1400 { "Ethernet", "wifi_p2p.group_info.config_methods.ethernet",
1401 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_ETHERNET, NULL, HFILL }},
1402 { &hf_p2p_attr_gi_config_methods_label,
1403 { "Label", "wifi_p2p.group_info.config_methods.label",
1404 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_LABEL, NULL, HFILL }},
1405 { &hf_p2p_attr_gi_config_methods_display,
1406 { "Display", "wifi_p2p.group_info.config_methods.display",
1407 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_DISPLAY, NULL, HFILL }},
1408 { &hf_p2p_attr_gi_config_methods_ext_nfc_token,
1409 { "External NFC Token",
1410 "wifi_p2p.group_info.config_methods.ext_nfc_token",
1411 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_EXT_NFC_TOKEN, NULL, HFILL }},
1412 { &hf_p2p_attr_gi_config_methods_int_nfc_token,
1413 { "Integrated NFC Token",
1414 "wifi_p2p.group_info.config_methods.int_nfc_token",
1415 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_INT_NFC_TOKEN, NULL, HFILL }},
1416 { &hf_p2p_attr_gi_config_methods_nfc_interface,
1417 { "NFC Interface", "wifi_p2p.group_info.config_methods.nfc_interface",
1418 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_NFC_INTERFACE, NULL, HFILL }},
1419 { &hf_p2p_attr_gi_config_methods_pushbutton,
1420 { "PushButton", "wifi_p2p.group_info.config_methods.pushbutton",
1421 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_PUSHBUTTON, NULL, HFILL }},
1422 { &hf_p2p_attr_gi_config_methods_keypad,
1423 { "Keypad", "wifi_p2p.group_info.config_methods.keypad",
1424 FT_UINT16, BASE_HEX, NULL, WPS_CONF_METH_KEYPAD, NULL, HFILL }},
1426 { &hf_p2p_attr_invitation_flags,
1427 { "Invitation Flags", "wifi_p2p.invitation_flags",
1428 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
1429 { &hf_p2p_attr_invitation_flags_type,
1430 { "Invitation Type", "wifi_p2p.invitation_flags.type",
1431 FT_UINT8, BASE_HEX, VALS(invitation_types), 0x01, NULL, HFILL }},
1433 { &hf_p2p_attr_manageability_bitmap,
1434 { "Manageability Bitmap field", "wifi_p2p.manageability.bitmap",
1435 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
1436 { &hf_p2p_attr_manageability_bitmap_mgmt,
1437 { "P2P Device Management", "wifi_p2p.manageability.bitmap.dev_mgmt",
1438 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }},
1439 { &hf_p2p_attr_manageability_bitmap_cross_connect,
1440 { "Cross Connection Permitted",
1441 "wifi_p2p.manageability.bitmap.cross_connect",
1442 FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL }},
1443 { &hf_p2p_attr_manageability_bitmap_coex_opt,
1444 { "Coexistence Optional", "wifi_p2p.manageability.bitmap.coex_opt",
1445 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL }},
1447 { &hf_p2p_attr_minor_reason_code,
1448 { "Minor Reason Code", "wifi_p2p.minor_reason_code",
1449 FT_UINT8, BASE_DEC, VALS(p2p_minor_reason_codes), 0x0, NULL, HFILL }},
1451 { &hf_p2p_anqp_service_update_indicator,
1452 { "Service Update Indicator", "wifi_p2p.anqp.service_update_indicator",
1453 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1454 { &hf_p2p_anqp_length,
1455 { "Length", "wifi_p2p.anqp.length",
1456 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1457 { &hf_p2p_anqp_service_protocol_type,
1458 { "Service Protocol Type", "wifi_p2p.anqp.service_protocol_type",
1459 FT_UINT8, BASE_DEC, VALS(p2p_service_protocol_types), 0x0, NULL,
1461 { &hf_p2p_anqp_service_transaction_id,
1462 { "Service Transaction ID", "wifi_p2p.anqp.service_transaction_id",
1463 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1464 { &hf_p2p_anqp_query_data,
1465 { "Query Data", "wifi_p2p.anqp.query_data",
1466 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1467 { &hf_p2p_anqp_status_code,
1468 { "Status Code", "wifi_p2p.anqp.status_code",
1469 FT_UINT8, BASE_DEC, VALS(p2p_sd_status_codes), 0x0,
1470 "Service Query Status Code", HFILL }},
1471 { &hf_p2p_anqp_response_data,
1472 { "Response Data", "wifi_p2p.anqp.response_data",
1473 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1475 { &hf_p2p_action_subtype,
1476 { "P2P Action Subtype", "wifi_p2p.action.subtype",
1477 FT_UINT8, BASE_DEC, VALS(p2p_action_subtypes), 0x0, NULL, HFILL }},
1478 { &hf_p2p_action_dialog_token,
1479 { "P2P Action Dialog Token", "wifi_p2p.action.dialog_token",
1480 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1481 { &hf_p2p_public_action_subtype,
1482 { "P2P Public Action Subtype", "wifi_p2p.public_action.subtype",
1483 FT_UINT8, BASE_DEC, VALS(p2p_public_action_subtypes), 0x0, NULL, HFILL
1485 { &hf_p2p_public_action_dialog_token,
1486 { "P2P Public Action Dialog Token",
1487 "wifi_p2p.public_action.dialog_token",
1488 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}
1490 static gint *ett[] = {
1492 &ett_p2p_service_tlv
1495 proto_p2p = proto_register_protocol("Wi-Fi Peer-to-Peer", "Wi-Fi P2P",
1497 proto_register_field_array(proto_p2p, hf, array_length(hf));
1498 proto_register_subtree_array(ett, array_length(ett));
1507 * indent-tabs-mode: nil
1510 * ex: set shiftwidth=2 tabstop=8 expandtab:
1511 * :indentSize=2:tabSize=8:noTabs=true: