Move 3 ASN1 dissectors to 'clean' group; move 1 PIDL dissector to 'dirty' group.
[metze/wireshark/wip.git] / epan / dissectors / packet-homeplug-av.c
1 /* packet-homeplug-av.c
2  * Routines for HomePlug AV dissection
3  *
4  * Copyright 2011, Florian Fainelli <florian[AT]openwrt.org>
5  *
6  * $Id$
7  *
8  * Wireshark - Network traffic analyzer
9  * By Gerald Combs <gerald[AT]wireshark.org>
10  * Copyright 1998 Gerald Combs
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  */
26
27 #include "config.h"
28
29 #include <epan/packet.h>
30 #include <epan/etypes.h>
31 #include <epan/ptvcursor.h>
32
33 static int proto_homeplug_av                     = -1;
34
35 static int hf_homeplug_av_mmhdr                  = -1;
36 static int hf_homeplug_av_mmhdr_mmver            = -1;
37 static int hf_homeplug_av_mmhdr_mmtype           = -1;
38 static int hf_homeplug_av_mmhdr_mmtype_lsb       = -1;
39 static int hf_homeplug_av_mmhdr_mmtype_msb       = -1;
40 static int hf_homeplug_av_vendor                 = -1;
41 static int hf_homeplug_av_vendor_oui             = -1;
42 static int hf_homeplug_av_reserved               = -1;
43
44 /* Beacon */
45 static int hf_homeplug_av_bcn                    = -1;
46 static int hf_homeplug_av_bcn_bts                = -1;
47 static int hf_homeplug_av_bcn_bto_0              = -1;
48 static int hf_homeplug_av_bcn_bto_1              = -1;
49 static int hf_homeplug_av_bcn_bto_2              = -1;
50 static int hf_homeplug_av_bcn_bto_3              = -1;
51
52 /* Frame Control */
53 static int hf_homeplug_av_fc                     = -1;
54 static int hf_homeplug_av_fc_stei                = -1;
55 static int hf_homeplug_av_fc_dtei                = -1;
56 static int hf_homeplug_av_fc_lid                 = -1;
57 static int hf_homeplug_av_fc_cfs                 = -1;
58 static int hf_homeplug_av_fc_bdf                 = -1;
59 static int hf_homeplug_av_fc_hp10df              = -1;
60 static int hf_homeplug_av_fc_hp11df              = -1;
61 static int hf_homeplug_av_fc_ppb                 = -1;
62 static int hf_homeplug_av_fc_ble                 = -1;
63 static int hf_homeplug_av_fc_pbsz                = -1;
64 static int hf_homeplug_av_fc_num_sym             = -1;
65 static int hf_homeplug_av_fc_tmi_av              = -1;
66 static int hf_homeplug_av_fc_fl_av               = -1;
67 static int hf_homeplug_av_fc_mpdu_cnt            = -1;
68 static int hf_homeplug_av_fc_burst_cnt           = -1;
69 static int hf_homeplug_av_fc_clst                = -1;
70 static int hf_homeplug_av_fc_rg_len              = -1;
71 static int hf_homeplug_av_fc_mfs_cmd_mgmt        = -1;
72 static int hf_homeplug_av_fc_mfs_cmd_data        = -1;
73 static int hf_homeplug_av_fc_rsr                 = -1;
74 static int hf_homeplug_av_fc_mcf                 = -1;
75 static int hf_homeplug_av_fc_dccpcf              = -1;
76 static int hf_homeplug_av_fc_mnbf                = -1;
77
78
79 /* Public MMEs */
80 static int hf_homeplug_av_public                 = -1;
81 static int hf_homeplug_av_public_frag_count      = -1;
82 static int hf_homeplug_av_public_frag_index      = -1;
83 static int hf_homeplug_av_public_frag_seqnum     = -1;
84
85 static int hf_homeplug_av_cc_disc_list_cnf       = -1;
86
87 static int hf_homeplug_av_cc_disc_list_sta_cnt   = -1;
88 static int hf_homeplug_av_cc_sta_info            = -1;
89 static int hf_homeplug_av_cc_sta_info_mac        = -1;
90 static int hf_homeplug_av_cc_sta_info_tei        = -1;
91 static int hf_homeplug_av_cc_sta_info_same_net   = -1;
92 static int hf_homeplug_av_cc_sta_info_sig_level  = -1;
93 static int hf_homeplug_av_cc_sta_info_avg_ble    = -1;
94
95 static int hf_homeplug_av_cc_disc_list_net_cnt   = -1;
96 static int hf_homeplug_av_cc_net_info            = -1;
97 static int hf_homeplug_av_cc_net_info_hyb_mode   = -1;
98 static int hf_homeplug_av_cc_net_info_bcn_slots  = -1;
99 static int hf_homeplug_av_cc_net_info_cco_sts    = -1;
100 static int hf_homeplug_av_cc_net_info_bcn_ofs    = -1;
101
102 static int hf_homeplug_av_brg_infos_cnf          = -1;
103 static int hf_homeplug_av_brg_infos_cnf_brd      = -1;
104 static int hf_homeplug_av_brg_infos_cnf_btei     = -1;
105 static int hf_homeplug_av_brg_infos_cnf_num_stas = -1;
106 static int hf_homeplug_av_brg_infos_cnf_mac      = -1;
107
108 static int hf_homeplug_av_cm_nw_infos_cnf        = -1;
109
110 static int hf_homeplug_av_nw_stats_cnf           = -1;
111
112 /* Shared network informations fields */
113 static int hf_homeplug_av_nw_info_del_type       = -1;
114 static int hf_homeplug_av_nw_info_fccs_av        = -1;
115 static int hf_homeplug_av_nw_info_peks           = -1;
116 static int hf_homeplug_av_nw_info_pid            = -1;
117 static int hf_homeplug_av_nw_info_prn            = -1;
118 static int hf_homeplug_av_nw_info_pmn            = -1;
119 static int hf_homeplug_av_nw_info_my_nonce       = -1;
120 static int hf_homeplug_av_nw_info_your_nonce     = -1;
121 static int hf_homeplug_av_nw_info_key_type       = -1;
122 static int hf_homeplug_av_nw_info_cco_cap        = -1;
123 static int hf_homeplug_av_nw_info_num_avlns      = -1;
124 static int hf_homeplug_av_nw_info_nid            = -1;
125 static int hf_homeplug_av_nw_info_snid           = -1;
126 static int hf_homeplug_av_nw_info_tei            = -1;
127 static int hf_homeplug_av_nw_info_sta_role       = -1;
128 static int hf_homeplug_av_nw_info_cco_mac        = -1;
129 static int hf_homeplug_av_nw_info_cco_tei        = -1;
130 static int hf_homeplug_av_nw_info_num_stas       = -1;
131 static int hf_homeplug_av_nw_info_access         = -1;
132 static int hf_homeplug_av_nw_info_num_coord      = -1;
133
134
135 static int hf_homeplug_av_cm_enc_pld_ind         = -1;
136 static int hf_homeplug_av_cm_enc_pld_ind_avlns   = -1;
137 static int hf_homeplug_av_cm_enc_pld_ind_iv      = -1;
138 static int hf_homeplug_av_cm_enc_pld_ind_uuid    = -1;
139 static int hf_homeplug_av_cm_enc_pld_ind_len     = -1;
140 static int hf_homeplug_av_cm_enc_pld_ind_pld     = -1;
141
142 static int hf_homeplug_av_cm_enc_pld_rsp         = -1;
143 static int hf_homeplug_av_cm_enc_pld_rsp_result  = -1;
144
145 static int hf_homeplug_av_cm_set_key_req         = -1;
146 static int hf_homeplug_av_cm_set_key_req_nw_key  = -1;
147
148 static int hf_homeplug_av_cm_set_key_cnf         = -1;
149 static int hf_homeplug_av_cm_set_key_cnf_result  = -1;
150
151 static int hf_homeplug_av_cm_get_key_req         = -1;
152 static int hf_homeplug_av_cm_get_key_req_type    = -1;
153 static int hf_homeplug_av_cm_get_key_req_has_key = -1;
154
155 static int hf_homeplug_av_cm_get_key_cnf         = -1;
156 static int hf_homeplug_av_cm_get_key_cnf_result  = -1;
157 static int hf_homeplug_av_cm_get_key_cnf_rtype   = -1;
158 static int hf_homeplug_av_cm_get_key_cnf_key     = -1;
159
160
161 /* Intellon specific vendor MMEs */
162 static int hf_homeplug_av_get_sw_cnf             = -1;
163 static int hf_homeplug_av_get_sw_cnf_status      = -1;
164 static int hf_homeplug_av_get_sw_cnf_dev_id      = -1;
165 static int hf_homeplug_av_get_sw_cnf_ver_len     = -1;
166 static int hf_homeplug_av_get_sw_cnf_ver_str     = -1;
167 static int hf_homeplug_av_get_sw_cnf_upg         = -1;
168
169 /* Shared memory related fields */
170 static int hf_homeplug_av_mem_len_16bits         = -1;
171 static int hf_homeplug_av_mem_len_32bits         = -1;
172 static int hf_homeplug_av_mem_offset             = -1;
173 static int hf_homeplug_av_mem_checksum           = -1;
174 static int hf_homeplug_av_mem_data               = -1;
175 static int hf_homeplug_av_mem_addr               = -1;
176 static int hf_homeplug_av_mem_status             = -1;
177
178 static int hf_homeplug_av_wr_mem_req             = -1;
179 static int hf_homeplug_av_wr_mem_cnf             = -1;
180
181 static int hf_homeplug_av_rd_mem_req             = -1;
182 static int hf_homeplug_av_rd_mem_cnf             = -1;
183
184 static int hf_homeplug_av_mac_module_id          = -1;
185
186 static int hf_homeplug_av_st_mac_req             = -1;
187 static int hf_homeplug_av_st_mac_req_img_load    = -1;
188 static int hf_homeplug_av_st_mac_req_img_len     = -1;
189 static int hf_homeplug_av_st_mac_req_img_chksum  = -1;
190 static int hf_homeplug_av_st_mac_req_img_start   = -1;
191
192 static int hf_homeplug_av_st_mac_cnf             = -1;
193 static int hf_homeplug_av_st_mac_cnf_status      = -1;
194
195 static int hf_homeplug_av_get_nvm_cnf            = -1;
196 static int hf_homeplug_av_get_nvm_cnf_status     = -1;
197 static int hf_homeplug_av_get_nvm_cnf_nvm_type   = -1;
198 static int hf_homeplug_av_get_nvm_cnf_nvm_page   = -1;
199 static int hf_homeplug_av_get_nvm_cnf_nvm_block  = -1;
200 static int hf_homeplug_av_get_nvm_cnf_nvm_size   = -1;
201
202 static int hf_homeplug_av_rs_dev_cnf             = -1;
203 static int hf_homeplug_av_rs_dev_cnf_status      = -1;
204
205 static int hf_homeplug_av_wr_mod_req             = -1;
206
207 static int hf_homeplug_av_wr_mod_cnf             = -1;
208 static int hf_homeplug_av_wr_mod_cnf_status      = -1;
209
210 static int hf_homeplug_av_wr_mod_ind             = -1;
211 static int hf_homeplug_av_wr_mod_ind_status      = -1;
212
213 static int hf_homeplug_av_rd_mod_req             = -1;
214
215 static int hf_homeplug_av_rd_mod_cnf             = -1;
216 static int hf_homeplug_av_rd_mod_cnf_status      = -1;
217
218 static int hf_homeplug_av_mod_nvm_req            = -1;
219
220 static int hf_homeplug_av_mod_nvm_cnf            = -1;
221 static int hf_homeplug_av_mod_nvm_cnf_status     = -1;
222
223 static int hf_homeplug_av_wd_rpt_req             = -1;
224 static int hf_homeplug_av_wd_rpt_req_session_id  = -1;
225 static int hf_homeplug_av_wd_rpt_req_clr         = -1;
226
227 static int hf_homeplug_av_wd_rpt_ind             = -1;
228 static int hf_homeplug_av_wd_rpt_ind_status      = -1;
229 static int hf_homeplug_av_wd_rpt_ind_session_id  = -1;
230 static int hf_homeplug_av_wd_rpt_ind_num_parts   = -1;
231 static int hf_homeplug_av_wd_rpt_ind_curr_part   = -1;
232 static int hf_homeplug_av_wd_rpt_ind_rdata_len   = -1;
233 static int hf_homeplug_av_wd_rpt_ind_rdata_ofs   = -1;
234 static int hf_homeplug_av_wd_rpt_ind_rdata       = -1;
235
236 static int hf_homeplug_av_lnk_stats_req          = -1;
237 static int hf_homeplug_av_lnk_stats_req_mcontrol = -1;
238 static int hf_homeplug_av_lnk_stats_req_dir      = -1;
239 static int hf_homeplug_av_lnk_stats_req_lid      = -1;
240 static int hf_homeplug_av_lnk_stats_req_macaddr  = -1;
241
242 static int hf_homeplug_av_lnk_stats_cnf          = -1;
243 static int hf_homeplug_av_lnk_stats_cnf_status   = -1;
244 static int hf_homeplug_av_lnk_stats_cnf_dir      = -1;
245 static int hf_homeplug_av_lnk_stats_cnf_lid      = -1;
246 static int hf_homeplug_av_lnk_stats_cnf_tei      = -1;
247 static int hf_homeplug_av_lnk_stats_cnf_lstats   = -1;
248
249 static int hf_homeplug_av_lnk_stats_tx           = -1;
250 static int hf_homeplug_av_lnk_stats_tx_mpdu_ack  = -1;
251 static int hf_homeplug_av_lnk_stats_tx_mpdu_col  = -1;
252 static int hf_homeplug_av_lnk_stats_tx_mpdu_fai  = -1;
253 static int hf_homeplug_av_lnk_stats_tx_pbs_pass  = -1;
254 static int hf_homeplug_av_lnk_stats_tx_pbs_fail  = -1;
255
256 static int hf_homeplug_av_lnk_stats_rx           = -1;
257 static int hf_homeplug_av_lnk_stats_rx_mpdu_ack  = -1;
258 static int hf_homeplug_av_lnk_stats_rx_mpdu_fai  = -1;
259 static int hf_homeplug_av_lnk_stats_rx_pbs_pass  = -1;
260 static int hf_homeplug_av_lnk_stats_rx_pbs_fail  = -1;
261 static int hf_homeplug_av_lnk_stats_rx_tb_pass   = -1;
262 static int hf_homeplug_av_lnk_stats_rx_tb_fail   = -1;
263 static int hf_homeplug_av_lnk_stats_rx_num_int   = -1;
264
265 static int hf_homeplug_av_rx_inv_stats           = -1;
266 static int hf_homeplug_av_rx_inv_phy_rate        = -1;
267 static int hf_homeplug_av_rx_inv_pbs_pass        = -1;
268 static int hf_homeplug_av_rx_inv_pbs_fail        = -1;
269 static int hf_homeplug_av_rx_inv_tb_pass         = -1;
270 static int hf_homeplug_av_rx_inv_tb_fail         = -1;
271
272 static int hf_homeplug_av_sniffer_req            = -1;
273 static int hf_homeplug_av_sniffer_req_ctrl       = -1;
274
275 static int hf_homeplug_av_sniffer_cnf            = -1;
276 static int hf_homeplug_av_sniffer_cnf_status     = -1;
277 static int hf_homeplug_av_sniffer_cnf_state      = -1;
278 static int hf_homeplug_av_sniffer_cnf_da         = -1;
279
280 static int hf_homeplug_av_sniffer_ind            = -1;
281 static int hf_homeplug_av_sniffer_ind_type       = -1;
282 static int hf_homeplug_av_sniffer_ind_data       = -1;
283 static int hf_homeplug_av_sniffer_data_dir       = -1;
284 static int hf_homeplug_av_sniffer_data_systime   = -1;
285 static int hf_homeplug_av_sniffer_data_bc_time   = -1;
286
287 static int hf_homeplug_av_nw_info_cnf            = -1;
288
289 static int hf_homeplug_av_nw_info_sta_info       = -1;
290 static int hf_homeplug_av_nw_info_net_info       = -1;
291
292 static int hf_homeplug_av_nw_info_sta_da         = -1;
293 static int hf_homeplug_av_nw_info_sta_tei        = -1;
294 static int hf_homeplug_av_nw_info_sta_bda        = -1;
295 static int hf_homeplug_av_nw_info_sta_phy_dr_tx  = -1;
296 static int hf_homeplug_av_nw_info_sta_phy_dr_rx  = -1;
297
298 static int hf_homeplug_av_cp_rpt_req             = -1;
299 static int hf_homeplug_av_cp_rpt_req_session_id  = -1;
300 static int hf_homeplug_av_cp_rpt_req_clr         = -1;
301
302 static int hf_homeplug_av_cp_rpt_ind             = -1;
303 static int hf_homeplug_av_cp_rpt_ind_status      = -1;
304 static int hf_homeplug_av_cp_rpt_ind_major_ver   = -1;
305 static int hf_homeplug_av_cp_rpt_ind_minor_ver   = -1;
306 static int hf_homeplug_av_cp_rpt_ind_session_id  = -1;
307 static int hf_homeplug_av_cp_rpt_ind_total_size  = -1;
308 static int hf_homeplug_av_cp_rpt_ind_blk_offset  = -1;
309 static int hf_homeplug_av_cp_rpt_ind_byte_index  = -1;
310 static int hf_homeplug_av_cp_rpt_ind_num_parts   = -1;
311 static int hf_homeplug_av_cp_rpt_ind_curr_part   = -1;
312 static int hf_homeplug_av_cp_rpt_ind_data_len    = -1;
313 static int hf_homeplug_av_cp_rpt_ind_data_ofs    = -1;
314 static int hf_homeplug_av_cp_rpt_ind_data        = -1;
315
316 static int hf_homeplug_av_fr_lbk_duration        = -1;
317 static int hf_homeplug_av_fr_lbk_len             = -1;
318
319 static int hf_homeplug_av_fr_lbk_req             = -1;
320 static int hf_homeplug_av_fr_lbk_req_data        = -1;
321
322 static int hf_homeplug_av_fr_lbk_cnf             = -1;
323 static int hf_homeplug_av_fr_lbk_cnf_status      = -1;
324
325 static int hf_homeplug_av_lbk_stat_cnf           = -1;
326 static int hf_homeplug_av_lbk_stat_cnf_status    = -1;
327 static int hf_homeplug_av_lbk_stat_cnf_lbk_stat  = -1;
328
329 static int hf_homeplug_av_set_key_req            = -1;
330 static int hf_homeplug_av_set_key_req_eks        = -1;
331 static int hf_homeplug_av_set_key_req_nmk        = -1;
332 static int hf_homeplug_av_set_key_req_rda        = -1;
333 static int hf_homeplug_av_set_key_req_dak        = -1;
334
335 static int hf_homeplug_av_set_key_cnf            = -1;
336 static int hf_homeplug_av_set_key_cnf_status     = -1;
337
338 static int hf_homeplug_av_mfg_string_cnf         = -1;
339 static int hf_homeplug_av_mfg_string_cnf_status  = -1;
340 static int hf_homeplug_av_mfg_string_cnf_len     = -1;
341 static int hf_homeplug_av_mfg_string_cnf_string  = -1;
342
343 static int hf_homeplug_av_rd_cblock_cnf          = -1;
344 static int hf_homeplug_av_rd_cblock_cnf_status   = -1;
345 static int hf_homeplug_av_rd_cblock_cnf_len      = -1;
346
347 static int hf_homeplug_av_cblock_hdr             = -1;
348 static int hf_homeplug_av_cblock_hdr_ver         = -1;
349 static int hf_homeplug_av_cblock_img_rom_addr    = -1;
350 static int hf_homeplug_av_cblock_img_addr        = -1;
351 static int hf_homeplug_av_cblock_img_len         = -1;
352 static int hf_homeplug_av_cblock_img_chksum      = -1;
353 static int hf_homeplug_av_cblock_entry_point     = -1;
354 static int hf_homeplug_av_cblock_next_hdr        = -1;
355 static int hf_homeplug_av_cblock_hdr_chksum      = -1;
356
357 static int hf_homeplug_av_cblock                 = -1;
358 static int hf_homeplug_av_cblock_sdram_size      = -1;
359 static int hf_homeplug_av_cblock_sdram_conf      = -1;
360 static int hf_homeplug_av_cblock_sdram_tim0      = -1;
361 static int hf_homeplug_av_cblock_sdram_tim1      = -1;
362 static int hf_homeplug_av_cblock_sdram_cntrl     = -1;
363 static int hf_homeplug_av_cblock_sdram_refresh   = -1;
364 static int hf_homeplug_av_cblock_mac_clock       = -1;
365
366 static int hf_homeplug_av_set_sdram_req          = -1;
367 static int hf_homeplug_av_set_sdram_req_chksum   = -1;
368
369 static int hf_homeplug_av_set_sdram_cnf          = -1;
370 static int hf_homeplug_av_set_sdram_cnf_status   = -1;
371
372 static int hf_homeplug_av_host_action_ind        = -1;
373 static int hf_homeplug_av_host_action_ind_act    = -1;
374
375 static int hf_homeplug_av_host_action_rsp        = -1;
376 static int hf_homeplug_av_host_action_rsp_sts    = -1;
377
378 static int hf_homeplug_av_op_attr_cookie         = -1;
379 static int hf_homeplug_av_op_attr_rep_type       = -1;
380
381 static int hf_homeplug_av_op_attr_req            = -1;
382
383 static int hf_homeplug_av_op_attr_cnf            = -1;
384 static int hf_homeplug_av_op_attr_cnf_status     = -1;
385 static int hf_homeplug_av_op_attr_cnf_size       = -1;
386 static int hf_homeplug_av_op_attr_cnf_data       = -1;
387
388 static int hf_homeplug_av_op_attr_data_hw        = -1;
389 static int hf_homeplug_av_op_attr_data_sw        = -1;
390 static int hf_homeplug_av_op_attr_data_sw_major  = -1;
391 static int hf_homeplug_av_op_attr_data_sw_minor  = -1;
392 static int hf_homeplug_av_op_attr_data_sw_sub    = -1;
393 static int hf_homeplug_av_op_attr_data_sw_num    = -1;
394 static int hf_homeplug_av_op_attr_data_sw_date   = -1;
395 static int hf_homeplug_av_op_attr_data_sw_rel    = -1;
396
397 static int hf_homeplug_av_enet_phy_req           = -1;
398 static int hf_homeplug_av_enet_phy_req_mcontrol  = -1;
399 static int hf_homeplug_av_enet_phy_req_addcaps   = -1;
400
401 static int hf_homeplug_av_enet_phy_cnf           = -1;
402 static int hf_homeplug_av_enet_phy_cnf_status    = -1;
403 static int hf_homeplug_av_enet_phy_cnf_speed     = -1;
404 static int hf_homeplug_av_enet_phy_cnf_duplex    = -1;
405
406 static int hf_homeplug_av_tone_map_req           = -1;
407 static int hf_homeplug_av_tone_map_req_mac       = -1;
408 static int hf_homeplug_av_tone_map_req_slot      = -1;
409
410 static int hf_homeplug_av_tone_map_cnf           = -1;
411 static int hf_homeplug_av_tone_map_cnf_status    = -1;
412 static int hf_homeplug_av_tone_map_cnf_slot      = -1;
413 static int hf_homeplug_av_tone_map_cnf_num_tms   = -1;
414 static int hf_homeplug_av_tone_map_cnf_num_act   = -1;
415
416 static int hf_homeplug_av_tone_map_carrier       = -1;
417 static int hf_homeplug_av_tone_map_carrier_lo    = -1;
418 static int hf_homeplug_av_tone_map_carrier_hi    = -1;
419
420 static gint ett_homeplug_av                      = -1;
421 static gint ett_homeplug_av_mmhdr                = -1;
422 static gint ett_homeplug_av_mmtype               = -1;
423 static gint ett_homeplug_av_vendor               = -1;
424 static gint ett_homeplug_av_public               = -1;
425
426 static gint ett_homeplug_av_fc                   = -1;
427 static gint ett_homeplug_av_bcn                  = -1;
428 static gint ett_homeplug_av_cc_disc_list_cnf     = -1;
429 static gint ett_homeplug_av_cc_sta_info          = -1;
430 static gint ett_homeplug_av_cc_net_info          = -1;
431 static gint ett_homeplug_av_cm_enc_pld_ind       = -1;
432 static gint ett_homeplug_av_cm_enc_pld_rsp       = -1;
433 static gint ett_homeplug_av_cm_set_key_req       = -1;
434 static gint ett_homeplug_av_cm_set_key_cnf       = -1;
435 static gint ett_homeplug_av_cm_get_key_req       = -1;
436 static gint ett_homeplug_av_cm_get_key_cnf       = -1;
437 static gint ett_homeplug_av_brg_infos_cnf        = -1;
438 static gint ett_homeplug_av_cm_nw_infos_cnf      = -1;
439 static gint ett_homeplug_av_nw_stats_cnf         = -1;
440
441 static gint ett_homeplug_av_get_sw_cnf           = -1;
442 static gint ett_homeplug_av_wr_mem_req           = -1;
443 static gint ett_homeplug_av_wr_mem_cnf           = -1;
444 static gint ett_homeplug_av_rd_mem_req           = -1;
445 static gint ett_homeplug_av_st_mac_req           = -1;
446 static gint ett_homeplug_av_st_mac_cnf           = -1;
447 static gint ett_homeplug_av_rd_mem_cnf           = -1;
448 static gint ett_homeplug_av_get_nvm_cnf          = -1;
449 static gint ett_homeplug_av_rs_dev_cnf           = -1;
450 static gint ett_homeplug_av_wr_mod_req           = -1;
451 static gint ett_homeplug_av_wr_mod_cnf           = -1;
452 static gint ett_homeplug_av_wr_mod_ind           = -1;
453 static gint ett_homeplug_av_rd_mod_req           = -1;
454 static gint ett_homeplug_av_rd_mod_cnf           = -1;
455 static gint ett_homeplug_av_mod_nvm_req          = -1;
456 static gint ett_homeplug_av_mod_nvm_cnf          = -1;
457 static gint ett_homeplug_av_wd_rpt_req           = -1;
458 static gint ett_homeplug_av_wd_rpt_ind           = -1;
459 static gint ett_homeplug_av_lnk_stats_req        = -1;
460 static gint ett_homeplug_av_lnk_stats_cnf        = -1;
461 static gint ett_homeplug_av_lnk_stats_tx         = -1;
462 static gint ett_homeplug_av_lnk_stats_rx         = -1;
463 static gint ett_homeplug_av_lnk_stats_rx_inv     = -1;
464 static gint ett_homeplug_av_sniffer_req          = -1;
465 static gint ett_homeplug_av_sniffer_cnf          = -1;
466 static gint ett_homeplug_av_sniffer_ind          = -1;
467 static gint ett_homeplug_av_sniffer_ind_data     = -1;
468 static gint ett_homeplug_av_nw_info_cnf          = -1;
469 static gint ett_homeplug_av_nw_info_sta_info     = -1;
470 static gint ett_homeplug_av_nw_info_net_info     = -1;
471 static gint ett_homeplug_av_cp_rpt_req           = -1;
472 static gint ett_homeplug_av_cp_rpt_ind           = -1;
473 static gint ett_homeplug_av_fr_lbk_req           = -1;
474 static gint ett_homeplug_av_fr_lbk_cnf           = -1;
475 static gint ett_homeplug_av_lbk_stat_cnf         = -1;
476 static gint ett_homeplug_av_set_key_req          = -1;
477 static gint ett_homeplug_av_set_key_cnf          = -1;
478 static gint ett_homeplug_av_mfg_string_cnf       = -1;
479 static gint ett_homeplug_av_rd_cblock_cnf        = -1;
480 static gint ett_homeplug_av_cblock_hdr           = -1;
481 static gint ett_homeplug_av_cblock               = -1;
482 static gint ett_homeplug_av_set_sdram_req        = -1;
483 static gint ett_homeplug_av_set_sdram_cnf        = -1;
484 static gint ett_homeplug_av_host_action_ind      = -1;
485 static gint ett_homeplug_av_host_action_rsp      = -1;
486 static gint ett_homeplug_av_op_attr_req          = -1;
487 static gint ett_homeplug_av_op_attr_cnf          = -1;
488 static gint ett_homeplug_av_op_attr_data         = -1;
489 static gint ett_homeplug_av_enet_phy_req         = -1;
490 static gint ett_homeplug_av_enet_phy_cnf         = -1;
491 static gint ett_homeplug_av_tone_map_req         = -1;
492 static gint ett_homeplug_av_tone_map_cnf         = -1;
493 static gint ett_homeplug_av_tone_map_carrier     = -1;
494
495 #define HOMEPLUG_AV_MMHDR_LEN                   3       /* MM version (1) + MM type (2) */
496
497 #define HOMEPLUG_AV_PUBLIC_FRAG_COUNT_MASK      0x0F
498 #define HOMEPLUG_AV_PUBLIC_FRAG_INDEX_MASK      0xF0
499
500 #define HOMEPLUG_AV_MMTYPE_CC_DISC_LIST_REQ     0x0014
501 #define HOMEPLUG_AV_MMTYPE_CC_DISC_LIST_CNF     0x0015
502 #define HOMEPLUG_AV_MMTYPE_CM_ENC_PLD_IND       0x6004
503 #define HOMEPLUG_AV_MMTYPE_CM_ENC_PLD_RSP       0x6005
504 #define HOMEPLUG_AV_MMTYPE_CM_SET_KEY_REQ       0x6008
505 #define HOMEPLUG_AV_MMTYPE_CM_SET_KEY_CNF       0x6009
506 #define HOMEPLUG_AV_MMTYPE_CM_GET_KEY_REQ       0x600C
507 #define HOMEPLUG_AV_MMTYPE_CM_GET_KEY_CNF       0x600D
508 #define HOMEPLUG_AV_MMTYPE_CM_BRG_INFO_REQ      0x6020
509 #define HOMEPLUG_AV_MMTYPE_CM_BRG_INFO_CNF      0x6021
510 #define HOMEPLUG_AV_MMTYPE_CM_NW_INFO_REQ       0x6038
511 #define HOMEPLUG_AV_MMTYPE_CM_NW_INFO_CNF       0x6039
512 #define HOMEPLUG_AV_MMTYPE_CM_NW_STATS_REQ      0x6048
513 #define HOMEPLUG_AV_MMTYPE_CM_NW_STATS_CNF      0x6049
514 #define HOMEPLUG_AV_MMTYPE_GET_SW_REQ           0xA000
515 #define HOMEPLUG_AV_MMTYPE_GET_SW_CNF           0xA001
516 #define HOMEPLUG_AV_MMTYPE_WR_MEM_REQ           0xA004
517 #define HOMEPLUG_AV_MMTYPE_WR_MEM_CNF           0xA005
518 #define HOMEPLUG_AV_MMTYPE_RD_MEM_REQ           0xA008
519 #define HOMEPLUG_AV_MMTYPE_RD_MEM_CNF           0xA009
520 #define HOMEPLUG_AV_MMTYPE_ST_MAC_REQ           0xA00C
521 #define HOMEPLUG_AV_MMTYPE_ST_MAC_CNF           0xA00D
522 #define HOMEPLUG_AV_MMTYPE_GET_NVM_REQ          0xA010
523 #define HOMEPLUG_AV_MMTYPE_GET_NVM_CNF          0xA011
524 #define HOMEPLUG_AV_MMTYPE_RS_DEV_REQ           0xA01C
525 #define HOMEPLUG_AV_MMTYPE_RS_DEV_CNF           0xA01D
526 #define HOMEPLUG_AV_MMTYPE_WR_MOD_REQ           0xA020
527 #define HOMEPLUG_AV_MMTYPE_WR_MOD_CNF           0xA021
528 #define HOMEPLUG_AV_MMTYPE_WR_MOD_IND           0xA022
529 #define HOMEPLUG_AV_MMTYPE_RD_MOD_REQ           0xA024
530 #define HOMEPLUG_AV_MMTYPE_RD_MOD_CNF           0xA025
531 #define HOMEPLUG_AV_MMTYPE_NVM_MOD_REQ          0xA028
532 #define HOMEPLUG_AV_MMTYPE_NVM_MOD_CNF          0xA029
533 #define HOMEPLUG_AV_MMTYPE_WD_RPT_REQ           0xA02C
534 #define HOMEPLUG_AV_MMTYPE_WD_RPT_IND           0xA02E
535 #define HOMEPLUG_AV_MMTYPE_LNK_STATS_REQ        0xA030
536 #define HOMEPLUG_AV_MMTYPE_LNK_STATS_CNF        0xA031
537 #define HOMEPLUG_AV_MMTYPE_SNIFFER_REQ          0xA034
538 #define HOMEPLUG_AV_MMTYPE_SNIFFER_CNF          0xA035
539 #define HOMEPLUG_AV_MMTYPE_SNIFFER_IND          0xA036
540 #define HOMEPLUG_AV_MMTYPE_NW_INFO_REQ          0xA038
541 #define HOMEPLUG_AV_MMTYPE_NW_INFO_CNF          0xA039
542 #define HOMEPLUG_AV_MMTYPE_CP_RPT_REQ           0xA040
543 #define HOMEPLUG_AV_MMTYPE_CP_RPT_IND           0xA042
544 #define HOMEPLUG_AV_MMTYPE_FR_LBK_REQ           0xA048
545 #define HOMEPLUG_AV_MMTYPE_FR_LBK_CNF           0xA049
546 #define HOMEPLUG_AV_MMTYPE_LBK_STAT_REQ         0xA04C
547 #define HOMEPLUG_AV_MMTYPE_LBK_STAT_CNF         0xA04D
548 #define HOMEPLUG_AV_MMTYPE_SET_KEY_REQ          0xA050
549 #define HOMEPLUG_AV_MMTYPE_SET_KEY_CNF          0xA051
550 #define HOMEPLUG_AV_MMTYPE_MFG_STRING_REQ       0xA054
551 #define HOMEPLUG_AV_MMTYPE_MFG_STRING_CNF       0xA055
552 #define HOMEPLUG_AV_MMTYPE_RD_CBLOCK_REQ        0xA058
553 #define HOMEPLUG_AV_MMTYPE_RD_CBLOCK_CNF        0xA059
554 #define HOMEPLUG_AV_MMTYPE_SET_SDRAM_REQ        0xA05C
555 #define HOMEPLUG_AV_MMTYPE_SET_SDRAM_CNF        0xA05D
556 #define HOMEPLUG_AV_MMTYPE_HOST_ACTION_IND      0xA062
557 #define HOMEPLUG_AV_MMTYPE_HOST_ACTION_RSP      0xA063
558 #define HOMEPLUG_AV_MMTYPE_OP_ATTR_REQ          0xA068
559 #define HOMEPLUG_AV_MMTYPE_OP_ATTR_CNF          0xA069
560 #define HOMEPLUG_AV_MMTYPE_GET_ENET_PHY_REQ     0xA06C
561 #define HOMEPLUG_AV_MMTYPE_GET_ENET_PHY_CNF     0xA06D
562 #define HOMEPLUG_AV_MMTYPE_TONE_MAP_REQ         0xA070
563 #define HOMEPLUG_AV_MMTYPE_TONE_MAP_CNF         0xA071
564
565 static const value_string homeplug_av_mmtype_vals[] = {
566     /* Public MMEs */
567     { HOMEPLUG_AV_MMTYPE_CC_DISC_LIST_REQ,      "Central Coordination Discovery List Request" },
568     { HOMEPLUG_AV_MMTYPE_CC_DISC_LIST_CNF,      "Central Coordination Discovery List Confirmation" },
569     { HOMEPLUG_AV_MMTYPE_CM_ENC_PLD_IND,        "Encrypted Payload Indicate" },
570     { HOMEPLUG_AV_MMTYPE_CM_ENC_PLD_RSP,        "Encrypted Payload Respons" },
571     { HOMEPLUG_AV_MMTYPE_CM_SET_KEY_REQ,        "Set Key Request" },
572     { HOMEPLUG_AV_MMTYPE_CM_SET_KEY_CNF,        "Set Key Confirmation" },
573     { HOMEPLUG_AV_MMTYPE_CM_GET_KEY_REQ,        "Get Key Request" },
574     { HOMEPLUG_AV_MMTYPE_CM_GET_KEY_CNF,        "Get Key Confirmation" },
575     { HOMEPLUG_AV_MMTYPE_CM_BRG_INFO_REQ,       "Get Bridge Informations Request" },
576     { HOMEPLUG_AV_MMTYPE_CM_BRG_INFO_CNF,       "Get Bridge Informations Confirmation" },
577     { HOMEPLUG_AV_MMTYPE_CM_NW_INFO_REQ,        "Get Network Informations Request" },
578     { HOMEPLUG_AV_MMTYPE_CM_NW_INFO_CNF,        "Get Network Informations Confirmation" },
579     { HOMEPLUG_AV_MMTYPE_CM_NW_STATS_REQ,       "Get Network Statistics Request" },
580     { HOMEPLUG_AV_MMTYPE_CM_NW_STATS_CNF,       "Get Network Statistics Confirmation" },
581
582     /* Intellon vendor-specific MMEs */
583     { HOMEPLUG_AV_MMTYPE_GET_SW_REQ,            "Get Device/SW Version Request" },
584     { HOMEPLUG_AV_MMTYPE_GET_SW_CNF,            "Get Device/SW Version Confirmation" },
585     { HOMEPLUG_AV_MMTYPE_WR_MEM_REQ,            "Write MAC Memory Request" },
586     { HOMEPLUG_AV_MMTYPE_WR_MEM_CNF,            "Write MAC Memory Confirmation" },
587     { HOMEPLUG_AV_MMTYPE_RD_MEM_REQ,            "Read MAC Memory Request" },
588     { HOMEPLUG_AV_MMTYPE_RD_MEM_CNF,            "Read MAC Memory Confirmation" },
589     { HOMEPLUG_AV_MMTYPE_ST_MAC_REQ,            "Start MAC Request" },
590     { HOMEPLUG_AV_MMTYPE_ST_MAC_CNF,            "Start MAC Confirmation" },
591     { HOMEPLUG_AV_MMTYPE_GET_NVM_REQ,           "Get NVM Parameters Request" },
592     { HOMEPLUG_AV_MMTYPE_GET_NVM_CNF,           "Get NVM Parameters Confirmation" },
593     { HOMEPLUG_AV_MMTYPE_RS_DEV_REQ,            "Reset Device Request" },
594     { HOMEPLUG_AV_MMTYPE_RS_DEV_CNF,            "Reset Device Confirmation" },
595     { HOMEPLUG_AV_MMTYPE_WR_MOD_REQ,            "Write Module Data Request" },
596     { HOMEPLUG_AV_MMTYPE_WR_MOD_CNF,            "Write Module Data Confirmation" },
597     { HOMEPLUG_AV_MMTYPE_WR_MOD_IND,            "Write Module Data Indicate" },
598     { HOMEPLUG_AV_MMTYPE_RD_MOD_REQ,            "Read Module Data Request" },
599     { HOMEPLUG_AV_MMTYPE_RD_MOD_CNF,            "Read Module Data Confirmation" },
600     { HOMEPLUG_AV_MMTYPE_NVM_MOD_REQ,           "Write Module Data to NVM Request" },
601     { HOMEPLUG_AV_MMTYPE_NVM_MOD_CNF,           "Write Module Data to NVM Confirmation" },
602     { HOMEPLUG_AV_MMTYPE_WD_RPT_REQ,            "Get Watchdog Report Request" },
603     { HOMEPLUG_AV_MMTYPE_WD_RPT_IND,            "Get Watchdog Report Indicate" },
604     { HOMEPLUG_AV_MMTYPE_LNK_STATS_REQ,         "Link Statistics Request" },
605     { HOMEPLUG_AV_MMTYPE_LNK_STATS_CNF,         "Link Statistics Confirmation" },
606     { HOMEPLUG_AV_MMTYPE_SNIFFER_REQ,           "Sniffer Request" },
607     { HOMEPLUG_AV_MMTYPE_SNIFFER_CNF,           "Sniffer Confirmation" },
608     { HOMEPLUG_AV_MMTYPE_SNIFFER_IND,           "Sniffer Indicate" },
609     { HOMEPLUG_AV_MMTYPE_NW_INFO_REQ,           "Network Info Request" },
610     { HOMEPLUG_AV_MMTYPE_NW_INFO_CNF,           "Network Info Confirmation" },
611     { HOMEPLUG_AV_MMTYPE_CP_RPT_REQ,            "Check Points Request" },
612     { HOMEPLUG_AV_MMTYPE_CP_RPT_IND,            "Check Points Indicate" },
613     { HOMEPLUG_AV_MMTYPE_FR_LBK_REQ,            "Loopback Request" },
614     { HOMEPLUG_AV_MMTYPE_FR_LBK_CNF,            "Loopback Confirmation" },
615     { HOMEPLUG_AV_MMTYPE_LBK_STAT_REQ,          "Loopback Status Request" },
616     { HOMEPLUG_AV_MMTYPE_LBK_STAT_CNF,          "Loopback Status Confirmation" },
617     { HOMEPLUG_AV_MMTYPE_SET_KEY_REQ,           "Set Encryption Key Request" },
618     { HOMEPLUG_AV_MMTYPE_SET_KEY_CNF,           "Set Encryption Key Confirmation" },
619     { HOMEPLUG_AV_MMTYPE_MFG_STRING_REQ,        "Get Manufacturer String Request" },
620     { HOMEPLUG_AV_MMTYPE_MFG_STRING_CNF,        "Get Manufacturer String Confirmation" },
621     { HOMEPLUG_AV_MMTYPE_RD_CBLOCK_REQ,         "Read Configuration Block Request" },
622     { HOMEPLUG_AV_MMTYPE_RD_CBLOCK_CNF,         "Read Configuration Block Confirmation" },
623     { HOMEPLUG_AV_MMTYPE_SET_SDRAM_REQ,         "Set SDRAM Configuration Request" },
624     { HOMEPLUG_AV_MMTYPE_SET_SDRAM_CNF,         "Set SDRAM Configuration Confirmation" },
625     { HOMEPLUG_AV_MMTYPE_HOST_ACTION_IND,       "Embedded Host Action Required Indication" },
626     { HOMEPLUG_AV_MMTYPE_HOST_ACTION_RSP,       "Embedded Host Action Required Respons" },
627     { HOMEPLUG_AV_MMTYPE_OP_ATTR_REQ,           "Get Device Attributes Request" },
628     { HOMEPLUG_AV_MMTYPE_OP_ATTR_CNF,           "Get Device Attributes Confirmation" },
629     { HOMEPLUG_AV_MMTYPE_GET_ENET_PHY_REQ,      "Get Ethernet PHY Settings Request" },
630     { HOMEPLUG_AV_MMTYPE_GET_ENET_PHY_CNF,      "Get Ethernet PHY Settings Confirmation" },
631     { HOMEPLUG_AV_MMTYPE_TONE_MAP_REQ,          "Tone Map Characteristics Request" },
632     { HOMEPLUG_AV_MMTYPE_TONE_MAP_CNF,          "Tone Map Characteristics Confirmation" },
633     { 0, NULL }
634 };
635 static value_string_ext homeplug_av_mmtype_vals_ext = VALUE_STRING_EXT_INIT(homeplug_av_mmtype_vals);
636
637 /* Versions */
638 #define HOMEPLUG_AV_MMVER_MASK                  0x01
639
640 static const value_string homeplug_av_mmver_vals[] = {
641     { 0x00, "1.0" },
642     { 0x01, "1.1" },
643     { 0, NULL }
644 };
645
646 /* MMTYPE LSB Values */
647 #define HOMEPLUG_AV_MMTYPE_LSB_MASK             0x03
648
649 static const value_string homeplug_av_mmtype_lsb_vals[] = {
650     { 0x00, "Request" },
651     { 0x01, "Confirm" },
652     { 0x02, "Indication" },
653     { 0x03, "Response" },
654     { 0, NULL }
655 };
656
657 /* MMTYPE MSB Values */
658 #define HOMEPLUG_AV_MMTYPE_MSB_STA_CCO          0x00
659 #define HOMEPLUG_AV_MMTYPE_MSB_PROXY            0x01
660 #define HOMEPLUG_AV_MMTYPE_MSB_CCO_CCO          0x02
661 #define HOMEPLUG_AV_MMTYPE_MSB_STA_STA          0x03
662 #define HOMEPLUG_AV_MMTYPE_MSB_MANUF            0x04
663 #define HOMEPLUG_AV_MMTYPE_MSB_VENDOR           0x05
664 #define HOMEPLUG_AV_MMTYPE_MSB_RSV              0x06
665 #define HOMEPLUG_AV_MMTYPE_MSB_MASK             0x06
666 #define HOMEPLUG_AV_MMTYPE_MSB_SHIFT            (5)
667
668 static const value_string homeplug_av_mmtype_msb_vals[] = {
669    { HOMEPLUG_AV_MMTYPE_MSB_STA_CCO, "STA - Central Coordinator" },
670    { HOMEPLUG_AV_MMTYPE_MSB_PROXY,   "Proxy Coordinator" },
671    { HOMEPLUG_AV_MMTYPE_MSB_CCO_CCO, "Central Coordinator - Central Coordinator" },
672    { HOMEPLUG_AV_MMTYPE_MSB_STA_STA, "STA - STA" },
673    { HOMEPLUG_AV_MMTYPE_MSB_MANUF,   "Manufacturer Specific" },
674    { HOMEPLUG_AV_MMTYPE_MSB_VENDOR,  "Vendor Specific" },
675    { 0, NULL }
676 };
677
678 #define HOMEPLUG_AV_CC_STA_NET_MASK     0x01
679
680 static const value_string homeplug_av_cc_sta_net_type_vals[] = {
681    { 0x00, "Different network" },
682    { 0x01, "Same network" },
683    { 0, NULL }
684 };
685
686 static const value_string homeplug_av_sig_level_vals[] = {
687    { 0x00,      "N/A" },
688    { 0x01,      "> - 10 dB, but <= 0 dB" },
689    { 0x02,      "> - 15 dB, but <= -10 dB" },
690    { 0x03,      "> - 20 dB, but <= -15 dB" },
691    { 0x04,      "> - 25 dB, but <= -20 dB" },
692    { 0x05,      "> - 30 dB, but <= -25 dB" },
693    { 0x06,      "> - 35 dB, but <= -30 dB" },
694    { 0x07,      "> - 40 dB, but <= -35 dB" },
695    { 0x08,      "> - 45 dB, but <= -40 dB" },
696    { 0x09,      "> - 50 dB, but <= -45 dB" },
697    { 0x0A,      "> - 55 dB, but <= -50 dB" },
698    { 0x0B,      "> - 60 dB, but <= -55 dB" },
699    { 0x0C,      "> - 65 dB, but <= -60 dB" },
700    { 0x0D,      "> - 70 dB, but <= -65 dB" },
701    { 0x0E,      "> - 75 dB, but <= -70 dB" },
702    { 0x0F,      "<= -75 dB" },
703    { 0, NULL }
704 };
705 static value_string_ext homeplug_av_sig_level_vals_ext = VALUE_STRING_EXT_INIT(homeplug_av_sig_level_vals);
706
707 #define HOMEPLUG_AV_CCO_STATUS_MASK             0x07
708
709 static const value_string homeplug_av_cco_status_vals[] = {
710    { 0x00, "Unknown" },
711    { 0x01, "Non-coordinating Network" },
712    { 0x02, "Coordinating, group status unknown" },
713    { 0x03, "Coordinating network in the same group" },
714    { 0x04, "Coordinating network not in the same group" },
715    { 0, NULL }
716 };
717
718 #define HOMEPLUG_AV_NW_INFO_ROLE_MASK   0x03
719
720 static const value_string homeplug_av_nw_info_role_vals[] = {
721    { 0x00, "Station" },
722    { 0x01, "Proxy coordinator" },
723    { 0x02, "Central coordinator" },
724    { 0, NULL }
725 };
726
727 #define HOMEPLUG_AV_NW_INFO_NID_MASK    0x01
728
729 static const value_string homeplug_nw_info_access_vals[] = {
730    { 0x00, "In-home" },
731    { 0x01, "Access" },
732    { 0, NULL }
733 };
734
735 #define HOMEPLUG_AV_PEKS_MASK           0x0F
736
737 static const value_string homeplug_av_peks_vals[] = {
738    { 0x00, "Destination STA's DAK" },
739    { 0x01, "NMK known to STA" },
740    { 0x02, "TEK Index 0" },
741    { 0x03, "TEK Index 1" },
742    { 0x04, "TEK Index 2" },
743    { 0x05, "TEK Index 3" },
744    { 0x06, "TEK Index 4" },
745    { 0x07, "TEK Index 5" },
746    { 0x08, "TEK Index 6" },
747    { 0x09, "TEK Index 7" },
748    { 0x0A, "TEK Index 8" },
749    { 0x0B, "TEK Index 9" },
750    { 0x0C, "TEK Index 10" },
751    { 0x0D, "TEK Index 11" },
752    { 0x0E, "TEK Index 12" },
753    { 0x0F, "No key" },
754    { 0, NULL }
755 };
756 static value_string_ext homeplug_av_peks_vals_ext = VALUE_STRING_EXT_INIT(homeplug_av_peks_vals);
757
758 #define HOMEPLUG_AV_AVLN_STATUS_MASK    0x0F
759
760 static const value_string homeplug_av_avln_status_vals[] = {
761    { 0x00, "Unassociated and Level-0 CCo capable" },
762    { 0x01, "Unassociated and Level-1 CCo capable" },
763    { 0x02, "Unassociated and Level-2 CCo capable" },
764    { 0x03, "Unassociated and Level-3 CCo capable" },
765    { 0x04, "Associated but not PCo capable" },
766    { 0x05, "Associated but and PCo capable" },
767    { 0x06, "Reserved" },
768    { 0x07, "Reserved" },
769    { 0x08, "CCo of an AV Logical Network" },
770    { 0, NULL }
771 };
772
773 #define HOMEPLUG_AV_PID_AUTH_STA        0x00
774 #define HOMEPLUG_AV_PID_PROV_AUTH_NEK   0x01
775 #define HOMEPLUG_AV_PID_PROV_AUTH_DAK   0x02
776 #define HOMEPLUG_AV_PID_PROV_AUTH_UKE   0x03
777 #define HOMEPLUG_AV_PID_HLE             0x04
778 #define HOMEPLUG_AV_PID_MASK            0x07
779
780 static const value_string homeplug_av_pid_vals[] = {
781    { HOMEPLUG_AV_PID_AUTH_STA,          "Authentication request by new STA" },
782    { HOMEPLUG_AV_PID_PROV_AUTH_NEK,     "Provision authenticated STA with new NEK by CCo" },
783    { HOMEPLUG_AV_PID_PROV_AUTH_DAK,     "Provision STA with NMK using DAK" },
784    { HOMEPLUG_AV_PID_PROV_AUTH_UKE,     "Provision STA with NMK using UKE" },
785    { HOMEPLUG_AV_PID_HLE,               "HLE" },
786    { 0, NULL }
787 };
788
789 #define HOMEPLUG_AV_KEY_TYPE_DAK        0x00
790 #define HOMEPLUG_AV_KEY_TYPE_NMK        0x01
791 #define HOMEPLUG_AV_KEY_TYPE_NEK        0x02
792 #define HOMEPLUG_AV_KEY_TYPE_TEK        0x03
793 #define HOMEPLUG_AV_KEY_TYPE_HASH       0x04
794 #define HOMEPLUG_AV_KEY_TYPE_NONE       0x05
795 #define HOMEPLUG_AV_KEY_TYPE_MASK       0x07
796
797 static const value_string homeplug_av_key_type_vals[] = {
798    { HOMEPLUG_AV_KEY_TYPE_DAK,  "DAK" },
799    { HOMEPLUG_AV_KEY_TYPE_NMK,  "NMK" },
800    { HOMEPLUG_AV_KEY_TYPE_NEK,  "NEK" },
801    { HOMEPLUG_AV_KEY_TYPE_TEK,  "TEK" },
802    { HOMEPLUG_AV_KEY_TYPE_HASH, "Hash Key" },
803    { HOMEPLUG_AV_KEY_TYPE_NONE, "Nonce only (no key)" },
804    { 0, NULL }
805 };
806
807 #define HOMEPLUG_AV_DEV_ID_MASK         0x07
808
809 static const value_string homeplug_av_dev_id_vals[] = {
810    { 0x00, "Unknown" },
811    { 0x01, "INT6000" },
812    { 0x02, "INT6300" },
813    { 0x03, "INT6400" },
814    { 0x04, "INT7400" },
815    { 0, NULL }
816 };
817
818 #define HOMEPLUG_AV_REQ_TYPE_MASK       0x01
819
820 static const value_string homeplug_av_req_type_vals[] = {
821    { 0x00, "Direct" },
822    { 0x01, "Relayed" },
823    { 0, NULL }
824 };
825
826 #define HOMEPLUG_AV_KEY_RESULT_MASK     0x03
827
828 static const value_string homeplug_av_key_result_vals[] = {
829    { 0x00, "Key granted" },
830    { 0x01, "Request refused" },
831    { 0x02, "Unsupported method/key type" },
832    { 0, NULL }
833 };
834
835 #define HOMEPLUG_AV_ENET_PHY_SPEED_MASK 0x03
836
837 static const value_string homeplug_av_enet_phy_speed_vals[] = {
838    { 0x00, "10 Mbits/sec" },
839    { 0x01, "100 Mbits/sec" },
840    { 0x02, "1 Gbits/sec" },
841    { 0, NULL }
842 };
843
844 #define HOMEPLUG_AV_ENET_PHY_DUPLEX_MASK 0x01
845
846 static const value_string homeplug_av_enet_phy_duplex_vals[] = {
847    { 0x00, "Half" },
848    { 0x01, "Full" },
849    { 0, NULL }
850 };
851
852 #define HOMEPLUG_AV_ENET_PHY_MCONTROL_MASK      0x01
853
854 static const value_string homeplug_av_enet_phy_mcontrol_vals[] = {
855    { 0x00, "Read" },
856    { 0x01, "Write" },
857    { 0, NULL }
858 };
859
860 static const value_string homeplug_av_wr_rd_mem_status_vals[] = {
861    { 0x00, "Success" },
862    { 0x10, "Invalid Address" },
863    { 0x14, "Invalid Length" },
864    { 0, NULL }
865 };
866
867 static const value_string homeplug_av_mac_module_id_vals[] = {
868    { 0x00, "MAC Soft-Loader Image" },
869    { 0x01, "MAC Software Image" },
870    { 0x02, "PIB" },
871    { 0x10, "Write Alternate Flash Location" },
872    { 0, NULL }
873 };
874
875 static const value_string homeplug_av_st_mac_status_vals[] = {
876    { 0x00, "Success" },
877    { 0x10, "Invalid Module ID" },
878    { 0x14, "Invalid Command" },
879    { 0, NULL }
880 };
881
882 static const value_string homeplug_av_get_nvm_status_vals[] = {
883    { 0x00, "Success" },
884    { 0x10, "NVM Not Present" },
885    { 0, NULL }
886 };
887
888 static const value_string homeplug_av_rs_dev_status_vals[] = {
889    { 0x00, "Success" },
890    { 0x01, "NVM Not Present" },
891    { 0, NULL }
892 };
893
894 static const value_string homeplug_av_wr_rd_mod_cnf_status_vals[] = {
895    { 0x00, "Success" },
896    { 0x10, "Invalid Module ID" },
897    { 0x12, "Invalid Length" },
898    { 0x14, "Invalid Checksum" },
899    { 0x18, "Bad Header Checksum" },
900    { 0x1C, "Invalid Length" },
901    { 0x20, "Unexpected Offset" },
902    { 0, NULL }
903 };
904
905 static const value_string homeplug_av_wr_mod_ind_status_vals[] = {
906    { 0x00, "Successful module update" },
907    { 0x10, "Update occured but not successful" },
908    { 0, NULL }
909 };
910
911 static const value_string homeplug_av_mod_nvm_status_vals[] = {
912    { 0x00, "Success" },
913    { 0x10, "Invalid Module ID" },
914    { 0x14, "NVM Module Not Present" },
915    { 0x18, "NVM Too Small" },
916    { 0x1C, "Invalid Header Checksum" },
917    { 0x20, "Invalid Section Mismatch" },
918    { 0, NULL }
919 };
920
921 #define HOMEPLUG_AV_RPT_CLR_MASK                0x01
922
923 static const value_string homeplug_av_rpt_clr_vals[] = {
924    { 0x00, "Get Report" },
925    { 0x01, "Get Report and Clear" },
926    { 0, NULL }
927 };
928
929 #define HOMEPLUG_AV_GEN_STATUS_MASK             0x03
930
931 static const value_string homeplug_av_generic_status_vals[] = {
932    { 0x00, "Success" },
933    { 0x01, "Failure" },
934    { 0x02, "Not supported" },
935    { 0, NULL }
936 };
937
938 #define HOMEPLUG_AV_LNK_STATS_MCTL_MASK         0x01
939
940 static const value_string homeplug_av_lnk_stats_mctrl_vals[] = {
941    { 0x00, "Read" },
942    { 0x01, "Clear" },
943    { 0, NULL }
944 };
945
946 #define HOMEPLUG_AV_LNK_STATS_DIR_TX            0x00
947 #define HOMEPLUG_AV_LNK_STATS_DIR_RX            0x01
948 #define HOMEPLUG_AV_LNK_STATS_DIR_TX_RX         0x02
949 #define HOMEPLUG_AV_LNK_STATS_DIR_MASK          0x03
950
951 static const value_string homeplug_av_lnk_stats_dir_vals[] = {
952    { HOMEPLUG_AV_LNK_STATS_DIR_TX, "Tx" },
953    { HOMEPLUG_AV_LNK_STATS_DIR_RX, "Rx" },
954    { HOMEPLUG_AV_LNK_STATS_DIR_TX_RX, "Tx/Rx" },
955    { 0, NULL }
956 };
957
958 static const value_string homeplug_av_lnk_stats_lid_vals[] = {
959    { 0x00, "CSMA Channel Access Priority 0" },
960    { 0x01, "CSMA Channel Access Priority 1" },
961    { 0x02, "CSMA Channel Access Priority 2" },
962    { 0x03, "CSMA Channel Access Priority 3" },
963    { 0xF8, "Sum of all CSMA stats for Peer Node" },
964    { 0xFB, "Reserved" },
965    { 0xFC, "Sum of all CSMA stats" },
966    { 0, NULL }
967 };
968
969 #define HOMEPLUG_AV_LNK_STATS_STATUS_SUCCESS    0x00
970 #define HOMEPLUG_AV_LNK_STATS_STATUS_INV_CTRL   0x01
971 #define HOMEPLUG_AV_LNK_STATS_STATUS_INV_DIR    0x02
972 #define HOMEPLUG_AV_LNK_STATS_STATUS_INV_LID    0x10
973 #define HOMEPLUG_AV_LNK_STATS_STATUS_INV_MAC    0x20
974
975 static const value_string homeplug_av_lnk_status_vals[] = {
976    { HOMEPLUG_AV_LNK_STATS_STATUS_SUCCESS,      "Success" },
977    { HOMEPLUG_AV_LNK_STATS_STATUS_INV_CTRL,     "Invalid Control" },
978    { HOMEPLUG_AV_LNK_STATS_STATUS_INV_DIR,      "Invalid Direction" },
979    { HOMEPLUG_AV_LNK_STATS_STATUS_INV_LID,      "Invalid Link ID" },
980    { HOMEPLUG_AV_LNK_STATS_STATUS_INV_MAC,      "Invalid MAC Address" },
981    { 0, NULL }
982 };
983
984 #define HOMEPLUG_AV_SNIFFER_CTRL_MASK           0x03
985
986 static const value_string homeplug_av_sniffer_ctrl_vals[] = {
987    { 0x00, "Disable" },
988    { 0x01, "Enable" },
989    { 0x02, "No change" },
990    { 0, NULL }
991 };
992
993 static const value_string homeplug_av_sniffer_status_vals[] = {
994    { 0x00, "Success" },
995    { 0x10, "Invalid Control" },
996    { 0, NULL }
997 };
998
999 static const value_string homeplug_av_sniffer_type_vals[] = {
1000    { 0x00, "Regular" },
1001    { 0, NULL }
1002 };
1003
1004 #define HOMEPLUG_AV_LBK_STATUS_MASK             0x01
1005
1006 static const value_string homeplug_av_lbk_status_vals[] = {
1007    { 0x00, "Done" },
1008    { 0x01, "Looping frame" },
1009    { 0, NULL }
1010 };
1011
1012 static const value_string homeplug_av_set_key_peks_vals[] = {
1013    { 0x00, "Remote" },
1014    { 0x0F, "Local" },
1015    { 0, NULL }
1016 };
1017
1018 static const value_string homeplug_av_set_key_status_vals[] = {
1019    { 0x00, "Success" },
1020    { 0x10, "Invalid EKS" },
1021    { 0x11, "Invalid PKS" },
1022    { 0, NULL }
1023 };
1024
1025 static const value_string homeplug_av_cblock_status_vals[] = {
1026    { 0x00, "Success" },
1027    { 0x01, "Failure" },
1028    { 0x10, "No Flash" },
1029    { 0x30, "Invalid Checksum" },
1030    { 0x34, "BIST Failed" },
1031    { 0, NULL }
1032 };
1033
1034 #define HOMEPLUG_AV_HOST_ACTION_SOFT_LDR        0x00
1035 #define HOMEPLUG_AV_HOST_ACTION_FW_UPG_RDY      0x01
1036 #define HOMEPLUG_AV_HOST_ACTION_PIB_UP_RDY      0x02
1037 #define HOMEPLUG_AV_HOST_ACTION_FW_PIB_UP_RDY   0x03
1038 #define HOMEPLUG_AV_HOST_ACTION_BOOT_LDR        0x04
1039
1040 static const value_string homeplug_av_host_action_vals[] = {
1041    { HOMEPLUG_AV_HOST_ACTION_SOFT_LDR,          "Loader (Soft/Bootloader)" },
1042    { HOMEPLUG_AV_HOST_ACTION_FW_UPG_RDY,        "Firmware Upgrade Ready" },
1043    { HOMEPLUG_AV_HOST_ACTION_PIB_UP_RDY,        "PIB Update Ready" },
1044    { HOMEPLUG_AV_HOST_ACTION_FW_PIB_UP_RDY,     "Firmware Upgrade and PIB Update Ready" },
1045    { HOMEPLUG_AV_HOST_ACTION_BOOT_LDR,          "Loader (Bootloader)" },
1046    { 0, NULL }
1047 };
1048
1049 static const value_string homeplug_av_op_attr_report_vals[] = {
1050    { 0x00, "Binary" },
1051    { 0x01, "XML" },
1052    { 0, NULL }
1053 };
1054
1055 #define HOMEPLUG_AV_TONE_MAP_MASK               0x07
1056
1057 static const value_string homeplug_av_tone_map_vals[] = {
1058    { 0x00, "No modulation" },
1059    { 0x01, "BPSK" },
1060    { 0x02, "QPSK" },
1061    { 0x03, "8-QAM" },
1062    { 0x04, "16-QAM" },
1063    { 0x05, "64-QAM" },
1064    { 0x06, "256-QAM" },
1065    { 0x07, "1024-QAM" },
1066    { 0, NULL }
1067 };
1068
1069 #define HOMEPLUG_AV_TONE_MAP_STATUS_MASK        0x03
1070
1071 static const value_string homeplug_av_tone_map_status_vals[] = {
1072    { 0x00, "Success" },
1073    { 0x01, "Unknown MAC address" },
1074    { 0x02, "Unknown Tone Map slot" },
1075    { 0, NULL }
1076 };
1077
1078 #define TVB_LEN_GREATEST  1
1079 #define TVB_LEN_UNDEF     0
1080 #define TVB_LEN_SHORTEST -1
1081 static int check_tvb_length(ptvcursor_t *cursor, const gint length)
1082 {
1083    if (!cursor)
1084       return TVB_LEN_UNDEF;
1085
1086    if (tvb_reported_length_remaining(ptvcursor_tvbuff(cursor),
1087                                      ptvcursor_current_offset(cursor)) < length)
1088       return TVB_LEN_SHORTEST;
1089
1090    return TVB_LEN_GREATEST;
1091 }
1092
1093 static inline unsigned int homeplug_av_mmtype_msb_is_vendor(guint8 msb)
1094 {
1095    return ((msb & (HOMEPLUG_AV_MMTYPE_MSB_VENDOR << HOMEPLUG_AV_MMTYPE_MSB_SHIFT)) ==
1096            (HOMEPLUG_AV_MMTYPE_MSB_VENDOR << HOMEPLUG_AV_MMTYPE_MSB_SHIFT));
1097 }
1098
1099 /* Dissection of MMHDR */
1100 static guint16
1101 dissect_homeplug_av_mmhdr(ptvcursor_t *cursor)
1102 {
1103    proto_item *ti;
1104    proto_tree *ti_mmtype;
1105    proto_tree *ti_vendor;
1106    proto_tree *ti_public;
1107    guint8 lsb, msb;
1108    guint16 homeplug_av_mmtype;
1109
1110    ti = ptvcursor_add_no_advance(cursor, hf_homeplug_av_mmhdr, 3, ENC_NA);
1111
1112    lsb = tvb_get_guint8(ptvcursor_tvbuff(cursor),
1113                         ptvcursor_current_offset(cursor) + 1);
1114    msb = tvb_get_guint8(ptvcursor_tvbuff(cursor),
1115                         ptvcursor_current_offset(cursor) + 2);
1116
1117    homeplug_av_mmtype = (msb << 8) | lsb;
1118
1119    if (!ptvcursor_tree(cursor))
1120       return homeplug_av_mmtype;
1121
1122    ptvcursor_push_subtree(cursor, ti, ett_homeplug_av_mmhdr);
1123    {
1124       ptvcursor_add(cursor, hf_homeplug_av_mmhdr_mmver, 1, ENC_BIG_ENDIAN);
1125       ti_mmtype = ptvcursor_add_no_advance(cursor, hf_homeplug_av_mmhdr_mmtype, 2, ENC_LITTLE_ENDIAN);
1126
1127       ptvcursor_push_subtree(cursor, ti_mmtype, ett_homeplug_av_mmtype);
1128       {
1129          ptvcursor_add(cursor, hf_homeplug_av_mmhdr_mmtype_lsb, 1, ENC_BIG_ENDIAN);
1130          ptvcursor_add(cursor, hf_homeplug_av_mmhdr_mmtype_msb, 1, ENC_BIG_ENDIAN);
1131       }
1132       ptvcursor_pop_subtree(cursor);
1133    }
1134    ptvcursor_pop_subtree(cursor);
1135
1136    if (homeplug_av_mmtype_msb_is_vendor(msb))
1137    {
1138       ti_vendor = ptvcursor_add_no_advance(cursor, hf_homeplug_av_vendor, -1, ENC_NA);
1139
1140       ptvcursor_push_subtree(cursor, ti_vendor, ett_homeplug_av_vendor);
1141       {
1142          ptvcursor_add(cursor, hf_homeplug_av_vendor_oui, 3, ENC_NA);
1143       }
1144       ptvcursor_pop_subtree(cursor);
1145    }
1146    else
1147    {
1148       ti_public = ptvcursor_add_no_advance(cursor, hf_homeplug_av_public, -1, ENC_NA);
1149
1150       ptvcursor_push_subtree(cursor, ti_public, ett_homeplug_av_public);
1151       {
1152          ptvcursor_add_no_advance(cursor, hf_homeplug_av_public_frag_count, 1, ENC_BIG_ENDIAN);
1153          ptvcursor_add(cursor, hf_homeplug_av_public_frag_index, 1, ENC_BIG_ENDIAN);
1154          ptvcursor_add(cursor, hf_homeplug_av_public_frag_seqnum, 1, ENC_BIG_ENDIAN);
1155       }
1156       ptvcursor_pop_subtree(cursor);
1157    }
1158
1159    return homeplug_av_mmtype;
1160 }
1161
1162 /* Beacon body */
1163 static void
1164 dissect_homeplug_av_beacon(ptvcursor_t *cursor)
1165 {
1166    proto_item *it;
1167
1168    if (!ptvcursor_tree(cursor))
1169       return;
1170
1171    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_bcn, -1, ENC_NA);
1172
1173    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_bcn);
1174    {
1175       ptvcursor_add_no_advance(cursor, hf_homeplug_av_nw_info_del_type, 1, ENC_BIG_ENDIAN);
1176       ptvcursor_add_no_advance(cursor, hf_homeplug_av_nw_info_access, 1, ENC_BIG_ENDIAN);
1177       ptvcursor_add(cursor, hf_homeplug_av_nw_info_snid, 1, ENC_BIG_ENDIAN);
1178       ptvcursor_add(cursor, hf_homeplug_av_bcn_bts, 4, ENC_LITTLE_ENDIAN);
1179       ptvcursor_add(cursor, hf_homeplug_av_bcn_bto_0, 2, ENC_LITTLE_ENDIAN);
1180       ptvcursor_add(cursor, hf_homeplug_av_bcn_bto_1, 2, ENC_LITTLE_ENDIAN);
1181       ptvcursor_add(cursor, hf_homeplug_av_bcn_bto_2, 2, ENC_LITTLE_ENDIAN);
1182       ptvcursor_add(cursor, hf_homeplug_av_bcn_bto_3, 2, ENC_LITTLE_ENDIAN);
1183       ptvcursor_add(cursor, hf_homeplug_av_nw_info_fccs_av, 3, ENC_NA);
1184    }
1185    ptvcursor_pop_subtree(cursor);
1186 }
1187
1188 /* Frame control */
1189 static void
1190 dissect_homeplug_av_frame_control(ptvcursor_t *cursor)
1191 {
1192    proto_item *it;
1193
1194    if (!ptvcursor_tree(cursor))
1195       return;
1196
1197    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc, -1, ENC_NA);
1198
1199    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_fc);
1200    {
1201       ptvcursor_add_no_advance(cursor, hf_homeplug_av_nw_info_del_type, 1, ENC_BIG_ENDIAN);
1202       ptvcursor_add_no_advance(cursor, hf_homeplug_av_nw_info_access, 1, ENC_BIG_ENDIAN);
1203       ptvcursor_add(cursor, hf_homeplug_av_nw_info_snid, 1, ENC_BIG_ENDIAN);
1204       ptvcursor_add(cursor, hf_homeplug_av_fc_stei, 1, ENC_BIG_ENDIAN);
1205       ptvcursor_add(cursor, hf_homeplug_av_fc_dtei, 1, ENC_BIG_ENDIAN);
1206       ptvcursor_add(cursor, hf_homeplug_av_fc_lid, 1, ENC_BIG_ENDIAN);
1207       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_cfs, 1, ENC_BIG_ENDIAN);
1208       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_bdf, 1, ENC_BIG_ENDIAN);
1209       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_hp10df, 1, ENC_BIG_ENDIAN);
1210       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_hp11df, 1, ENC_BIG_ENDIAN);
1211       ptvcursor_add(cursor, hf_homeplug_av_nw_info_peks, 1, ENC_BIG_ENDIAN);
1212       ptvcursor_add(cursor, hf_homeplug_av_fc_ppb, 1, ENC_BIG_ENDIAN);
1213       ptvcursor_add(cursor, hf_homeplug_av_fc_ble, 1, ENC_BIG_ENDIAN);
1214       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_pbsz, 1, ENC_BIG_ENDIAN);
1215       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_num_sym, 1, ENC_BIG_ENDIAN);
1216       ptvcursor_add(cursor, hf_homeplug_av_fc_tmi_av, 1, ENC_BIG_ENDIAN);
1217       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_mpdu_cnt, 2, ENC_BIG_ENDIAN);
1218       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_burst_cnt, 2, ENC_BIG_ENDIAN);
1219       ptvcursor_add(cursor, hf_homeplug_av_fc_fl_av, 2, ENC_LITTLE_ENDIAN);
1220       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_clst, 1, ENC_BIG_ENDIAN);
1221       ptvcursor_add(cursor, hf_homeplug_av_fc_rg_len, 1, ENC_BIG_ENDIAN);
1222       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_mfs_cmd_mgmt, 1, ENC_BIG_ENDIAN);
1223       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_mfs_cmd_data, 1, ENC_BIG_ENDIAN);
1224       ptvcursor_add(cursor, hf_homeplug_av_fc_rsr, 1, ENC_BIG_ENDIAN);
1225       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_mcf, 1, ENC_BIG_ENDIAN);
1226       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_dccpcf, 1, ENC_BIG_ENDIAN);
1227       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fc_mnbf, 1, ENC_BIG_ENDIAN);
1228       ptvcursor_add(cursor, hf_homeplug_av_reserved, 1, ENC_NA);
1229       ptvcursor_add(cursor, hf_homeplug_av_nw_info_fccs_av, 3, ENC_NA);
1230    }
1231    ptvcursor_pop_subtree(cursor);
1232 }
1233
1234 static void
1235 dissect_homeplug_av_nw_info_sta(ptvcursor_t *cursor, gboolean vendor)
1236 {
1237    proto_item *it;
1238
1239    if (!ptvcursor_tree(cursor))
1240       return;
1241
1242    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_nw_info_sta_info, -1, ENC_NA);
1243
1244    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_nw_info_sta_info);
1245    {
1246       ptvcursor_add(cursor, hf_homeplug_av_nw_info_sta_da, 6, ENC_NA);
1247       if (vendor) {
1248          ptvcursor_add(cursor, hf_homeplug_av_nw_info_sta_tei, 1, ENC_BIG_ENDIAN);
1249          ptvcursor_add(cursor, hf_homeplug_av_nw_info_sta_bda, 6, ENC_NA);
1250       }
1251       ptvcursor_add(cursor, hf_homeplug_av_nw_info_sta_phy_dr_tx, 1, ENC_BIG_ENDIAN);
1252       ptvcursor_add(cursor, hf_homeplug_av_nw_info_sta_phy_dr_rx, 1, ENC_BIG_ENDIAN);
1253    }
1254    ptvcursor_pop_subtree(cursor);
1255 }
1256
1257 static void
1258 dissect_homeplug_av_nw_info_net(ptvcursor_t *cursor, gboolean vendor)
1259 {
1260    proto_item *it;
1261
1262    if (!ptvcursor_tree(cursor))
1263       return;
1264
1265    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_nw_info_net_info, -1, ENC_NA);
1266
1267    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_nw_info_net_info);
1268    {
1269       ptvcursor_add(cursor, hf_homeplug_av_nw_info_nid, 7, ENC_NA);
1270       ptvcursor_add(cursor, hf_homeplug_av_nw_info_snid, 1, ENC_BIG_ENDIAN);
1271       ptvcursor_add(cursor, hf_homeplug_av_nw_info_tei, 1, ENC_BIG_ENDIAN);
1272       ptvcursor_add(cursor, hf_homeplug_av_nw_info_sta_role, 1, ENC_BIG_ENDIAN);
1273       ptvcursor_add(cursor, hf_homeplug_av_nw_info_cco_mac, 6, ENC_NA);
1274       if (vendor) {
1275          ptvcursor_add(cursor, hf_homeplug_av_nw_info_cco_tei, 1, ENC_BIG_ENDIAN);
1276       }
1277       else
1278       {
1279          ptvcursor_add(cursor, hf_homeplug_av_nw_info_access, 1, ENC_BIG_ENDIAN);
1280          ptvcursor_add(cursor, hf_homeplug_av_nw_info_num_coord, 1, ENC_BIG_ENDIAN);
1281       }
1282    }
1283    ptvcursor_pop_subtree(cursor);
1284 }
1285
1286 /* Public MMEs */
1287 static void
1288 dissect_homeplug_av_cc_sta_info(ptvcursor_t *cursor)
1289 {
1290    proto_item *it;
1291
1292    if (!ptvcursor_tree(cursor))
1293       return;
1294
1295    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cc_sta_info, -1, ENC_NA);
1296
1297    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cc_sta_info);
1298    {
1299       ptvcursor_add(cursor, hf_homeplug_av_cc_sta_info_mac, 6, ENC_NA);
1300       ptvcursor_add(cursor, hf_homeplug_av_cc_sta_info_tei, 1, ENC_BIG_ENDIAN);
1301       ptvcursor_add(cursor, hf_homeplug_av_cc_sta_info_same_net, 1, ENC_BIG_ENDIAN);
1302       ptvcursor_add(cursor, hf_homeplug_av_nw_info_snid, 1, ENC_BIG_ENDIAN);
1303       ptvcursor_add(cursor, hf_homeplug_av_nw_info_cco_cap, 1, ENC_BIG_ENDIAN);
1304       ptvcursor_add(cursor, hf_homeplug_av_cc_sta_info_sig_level, 1, ENC_BIG_ENDIAN);
1305       ptvcursor_add(cursor, hf_homeplug_av_cc_sta_info_avg_ble, 1, ENC_BIG_ENDIAN);
1306    }
1307    ptvcursor_pop_subtree(cursor);
1308 }
1309
1310 static void
1311 dissect_homeplug_av_cc_net_info(ptvcursor_t *cursor)
1312 {
1313    proto_item *it;
1314
1315    if (!ptvcursor_tree(cursor))
1316       return;
1317
1318    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cc_net_info, -1, ENC_NA);
1319
1320    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cc_net_info);
1321    {
1322       ptvcursor_add(cursor, hf_homeplug_av_nw_info_nid, 7, ENC_NA);
1323       ptvcursor_add(cursor, hf_homeplug_av_nw_info_snid, 1, ENC_BIG_ENDIAN);
1324       ptvcursor_add(cursor, hf_homeplug_av_cc_net_info_hyb_mode, 1, ENC_BIG_ENDIAN);
1325       ptvcursor_add(cursor, hf_homeplug_av_cc_net_info_bcn_slots, 1, ENC_BIG_ENDIAN);
1326       ptvcursor_add(cursor, hf_homeplug_av_cc_net_info_cco_sts, 1, ENC_BIG_ENDIAN);
1327       ptvcursor_add(cursor, hf_homeplug_av_cc_net_info_bcn_ofs, 2, ENC_BIG_ENDIAN);
1328    }
1329    ptvcursor_pop_subtree(cursor);
1330 }
1331
1332 static void
1333 dissect_homeplug_av_cc_disc_list_cnf(ptvcursor_t *cursor)
1334 {
1335    proto_item *it;
1336    guint8      num_stas;
1337    guint8      sta;
1338    guint8      num_nets;
1339    guint8      net;
1340
1341    if (!ptvcursor_tree(cursor))
1342       return;
1343
1344    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cc_disc_list_cnf, -1, ENC_NA);
1345
1346    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cc_disc_list_cnf);
1347    {
1348       num_stas = tvb_get_guint8(ptvcursor_tvbuff(cursor),
1349                                 ptvcursor_current_offset(cursor));
1350       ptvcursor_add(cursor, hf_homeplug_av_cc_disc_list_sta_cnt, 1, ENC_BIG_ENDIAN);
1351
1352       for (sta = 0; sta < num_stas; sta++) {
1353          dissect_homeplug_av_cc_sta_info(cursor);
1354       }
1355
1356       num_nets = tvb_get_guint8(ptvcursor_tvbuff(cursor),
1357                                 ptvcursor_current_offset(cursor));
1358       ptvcursor_add(cursor, hf_homeplug_av_cc_disc_list_net_cnt, 1, ENC_BIG_ENDIAN);
1359
1360       for (net = 0; net < num_nets; net++) {
1361          dissect_homeplug_av_cc_net_info(cursor);
1362       }
1363    }
1364    ptvcursor_pop_subtree(cursor);
1365 }
1366
1367 static void
1368 dissect_homeplug_av_cm_enc_pld_ind(ptvcursor_t *cursor)
1369 {
1370    proto_item *it;
1371    guint8      pid;
1372
1373    if (!ptvcursor_tree(cursor))
1374       return;
1375
1376    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cm_enc_pld_ind, -1, ENC_NA);
1377
1378    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cm_enc_pld_ind);
1379    {
1380       ptvcursor_add(cursor, hf_homeplug_av_nw_info_peks, 1, ENC_BIG_ENDIAN);
1381       ptvcursor_add(cursor, hf_homeplug_av_cm_enc_pld_ind_avlns, 1, ENC_BIG_ENDIAN);
1382       pid = tvb_get_guint8(ptvcursor_tvbuff(cursor),
1383                            ptvcursor_current_offset(cursor));
1384       ptvcursor_add(cursor, hf_homeplug_av_nw_info_pid, 1, ENC_BIG_ENDIAN);
1385       ptvcursor_add(cursor, hf_homeplug_av_nw_info_prn, 2, ENC_LITTLE_ENDIAN);
1386       ptvcursor_add(cursor, hf_homeplug_av_nw_info_pmn, 1, ENC_BIG_ENDIAN);
1387       if (pid == HOMEPLUG_AV_PID_HLE) {
1388          ptvcursor_add(cursor, hf_homeplug_av_cm_enc_pld_ind_iv, 16, ENC_NA);
1389       } else {
1390          ptvcursor_add(cursor, hf_homeplug_av_cm_enc_pld_ind_uuid, 16, ENC_LITTLE_ENDIAN);
1391       }
1392       ptvcursor_add(cursor, hf_homeplug_av_cm_enc_pld_ind_len, 2, ENC_LITTLE_ENDIAN);
1393
1394       /* Encrypted payload follows */
1395       if (pid != HOMEPLUG_AV_PID_HLE) {
1396          ptvcursor_add(cursor, hf_homeplug_av_cm_enc_pld_ind_pld, -1, ENC_NA);
1397       }
1398    }
1399    ptvcursor_pop_subtree(cursor);
1400 }
1401
1402 static void
1403 dissect_homeplug_av_cm_enc_pld_rsp(ptvcursor_t *cursor)
1404 {
1405    proto_item *it;
1406
1407    if (!ptvcursor_tree(cursor))
1408       return;
1409
1410    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cm_enc_pld_rsp, -1, ENC_NA);
1411
1412    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cm_enc_pld_rsp);
1413    {
1414       ptvcursor_add(cursor, hf_homeplug_av_cm_enc_pld_rsp_result, 1, ENC_BIG_ENDIAN);
1415       ptvcursor_add(cursor, hf_homeplug_av_nw_info_pid, 1, ENC_BIG_ENDIAN);
1416       ptvcursor_add(cursor, hf_homeplug_av_nw_info_prn, 2, ENC_LITTLE_ENDIAN);
1417    }
1418    ptvcursor_pop_subtree(cursor);
1419 }
1420
1421 static void
1422 dissect_homeplug_av_cm_set_key_req(ptvcursor_t *cursor)
1423 {
1424    proto_item *it;
1425
1426    if (!ptvcursor_tree(cursor))
1427       return;
1428
1429    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cm_set_key_req, -1, ENC_NA);
1430
1431    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cm_set_key_req);
1432    {
1433       ptvcursor_add(cursor, hf_homeplug_av_nw_info_key_type, 1, ENC_BIG_ENDIAN);
1434       ptvcursor_add(cursor, hf_homeplug_av_nw_info_my_nonce, 4, ENC_LITTLE_ENDIAN);
1435       ptvcursor_add(cursor, hf_homeplug_av_nw_info_your_nonce, 4, ENC_LITTLE_ENDIAN);
1436       ptvcursor_add(cursor, hf_homeplug_av_nw_info_pid, 1, ENC_BIG_ENDIAN);
1437       ptvcursor_add(cursor, hf_homeplug_av_nw_info_prn, 2, ENC_LITTLE_ENDIAN);
1438       ptvcursor_add(cursor, hf_homeplug_av_nw_info_pmn, 1, ENC_BIG_ENDIAN);
1439       ptvcursor_add(cursor, hf_homeplug_av_nw_info_cco_cap, 1, ENC_BIG_ENDIAN);
1440       ptvcursor_add(cursor, hf_homeplug_av_nw_info_nid, 7, ENC_NA);
1441       ptvcursor_add(cursor, hf_homeplug_av_nw_info_peks, 1, ENC_BIG_ENDIAN);
1442       ptvcursor_add(cursor, hf_homeplug_av_cm_set_key_req_nw_key, -1, ENC_NA);
1443    }
1444    ptvcursor_pop_subtree(cursor);
1445 }
1446
1447 static void
1448 dissect_homeplug_av_cm_set_key_cnf(ptvcursor_t *cursor)
1449 {
1450    proto_item *it;
1451
1452    if (!ptvcursor_tree(cursor))
1453       return;
1454
1455    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cm_set_key_cnf, -1, ENC_NA);
1456
1457    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cm_set_key_cnf);
1458    {
1459       ptvcursor_add(cursor, hf_homeplug_av_cm_set_key_cnf_result, 1, ENC_BIG_ENDIAN);
1460       ptvcursor_add(cursor, hf_homeplug_av_nw_info_my_nonce, 4, ENC_LITTLE_ENDIAN);
1461       ptvcursor_add(cursor, hf_homeplug_av_nw_info_your_nonce, 4, ENC_LITTLE_ENDIAN);
1462       ptvcursor_add(cursor, hf_homeplug_av_nw_info_pid, 1, ENC_BIG_ENDIAN);
1463       ptvcursor_add(cursor, hf_homeplug_av_nw_info_prn, 2, ENC_LITTLE_ENDIAN);
1464       ptvcursor_add(cursor, hf_homeplug_av_nw_info_pmn, 1, ENC_BIG_ENDIAN);
1465       ptvcursor_add(cursor, hf_homeplug_av_nw_info_cco_cap, 1, ENC_BIG_ENDIAN);
1466    }
1467    ptvcursor_pop_subtree(cursor);
1468 }
1469
1470 static void
1471 dissect_homeplug_av_cm_get_key_req(ptvcursor_t *cursor)
1472 {
1473    proto_item *it;
1474    guint8      key_type;
1475
1476    if (!ptvcursor_tree(cursor))
1477       return;
1478
1479    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cm_get_key_req, -1, ENC_NA);
1480
1481    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cm_get_key_req);
1482    {
1483
1484       ptvcursor_add(cursor, hf_homeplug_av_cm_get_key_req_type, 1, ENC_BIG_ENDIAN);
1485       key_type = tvb_get_guint8(ptvcursor_tvbuff(cursor),
1486                                 ptvcursor_current_offset(cursor));
1487       ptvcursor_add(cursor, hf_homeplug_av_nw_info_key_type, 1, ENC_BIG_ENDIAN);
1488       ptvcursor_add(cursor, hf_homeplug_av_nw_info_nid, 7, ENC_NA);
1489       ptvcursor_add(cursor, hf_homeplug_av_nw_info_my_nonce, 4, ENC_LITTLE_ENDIAN);
1490       ptvcursor_add(cursor, hf_homeplug_av_nw_info_pid, 1, ENC_BIG_ENDIAN);
1491       ptvcursor_add(cursor, hf_homeplug_av_nw_info_prn, 2, ENC_LITTLE_ENDIAN);
1492       ptvcursor_add(cursor, hf_homeplug_av_nw_info_pmn, 1, ENC_BIG_ENDIAN);
1493       if (key_type == HOMEPLUG_AV_KEY_TYPE_HASH) {
1494          ptvcursor_add(cursor, hf_homeplug_av_cm_get_key_req_has_key, -1, ENC_NA);
1495       }
1496    }
1497    ptvcursor_pop_subtree(cursor);
1498 }
1499
1500 static void
1501 dissect_homeplug_av_cm_get_key_cnf(ptvcursor_t *cursor)
1502 {
1503    proto_item *it;
1504
1505    if (!ptvcursor_tree(cursor))
1506       return;
1507
1508    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cm_get_key_cnf, -1, ENC_NA);
1509
1510    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cm_get_key_cnf);
1511    {
1512       ptvcursor_add(cursor, hf_homeplug_av_cm_get_key_cnf_result, 1, ENC_BIG_ENDIAN);
1513       ptvcursor_add(cursor, hf_homeplug_av_cm_get_key_cnf_rtype, 1, ENC_BIG_ENDIAN);
1514       ptvcursor_add(cursor, hf_homeplug_av_nw_info_my_nonce, 4, ENC_LITTLE_ENDIAN);
1515       ptvcursor_add(cursor, hf_homeplug_av_nw_info_your_nonce, 4, ENC_LITTLE_ENDIAN);
1516       ptvcursor_add(cursor, hf_homeplug_av_nw_info_nid, 7, ENC_NA);
1517       ptvcursor_add(cursor, hf_homeplug_av_nw_info_peks, 1, ENC_BIG_ENDIAN);
1518       ptvcursor_add(cursor, hf_homeplug_av_nw_info_pid, 1, ENC_BIG_ENDIAN);
1519       ptvcursor_add(cursor, hf_homeplug_av_nw_info_prn, 2, ENC_LITTLE_ENDIAN);
1520       ptvcursor_add(cursor, hf_homeplug_av_nw_info_pmn, 1, ENC_BIG_ENDIAN);
1521       ptvcursor_add(cursor, hf_homeplug_av_cm_get_key_cnf_key, -1, ENC_NA);
1522    }
1523    ptvcursor_pop_subtree(cursor);
1524 }
1525
1526 static void
1527 dissect_homeplug_av_get_brg_infos_cnf(ptvcursor_t *cursor)
1528 {
1529    proto_item *it;
1530    guint8      bridging;
1531    guint8      num_stas;
1532    guint8      sta;
1533
1534    if (!ptvcursor_tree(cursor))
1535       return;
1536
1537    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_brg_infos_cnf, -1, ENC_NA);
1538
1539    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_brg_infos_cnf);
1540    {
1541       bridging = tvb_get_guint8(ptvcursor_tvbuff(cursor),
1542                                 ptvcursor_current_offset(cursor));
1543       ptvcursor_add(cursor, hf_homeplug_av_brg_infos_cnf_brd, 1, ENC_BIG_ENDIAN);
1544
1545       if (bridging) {
1546          ptvcursor_add(cursor, hf_homeplug_av_brg_infos_cnf_btei, 1, ENC_BIG_ENDIAN);
1547
1548          num_stas = tvb_get_guint8(ptvcursor_tvbuff(cursor),
1549                                    ptvcursor_current_offset(cursor));
1550          ptvcursor_add(cursor, hf_homeplug_av_brg_infos_cnf_num_stas, 1, ENC_BIG_ENDIAN);
1551
1552          for (sta = 0; sta < num_stas; sta++) {
1553             ptvcursor_add(cursor, hf_homeplug_av_brg_infos_cnf_mac, 6, ENC_NA);
1554          }
1555       }
1556    }
1557    ptvcursor_pop_subtree(cursor);
1558 }
1559
1560 static void
1561 dissect_homeplug_av_nw_infos_cnf(ptvcursor_t *cursor)
1562 {
1563    proto_item *it;
1564    guint8      num_avlns;
1565    guint8      net;
1566
1567    if (!ptvcursor_tree(cursor))
1568       return;
1569
1570    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cm_nw_infos_cnf, -1, ENC_NA);
1571
1572    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cm_nw_infos_cnf);
1573    {
1574       num_avlns = tvb_get_guint8(ptvcursor_tvbuff(cursor),
1575                                  ptvcursor_current_offset(cursor));
1576       ptvcursor_add(cursor, hf_homeplug_av_nw_info_num_avlns, 1, ENC_BIG_ENDIAN);
1577
1578       for (net = 0; net < num_avlns; net++) {
1579          dissect_homeplug_av_nw_info_net(cursor, FALSE);
1580       }
1581    }
1582    ptvcursor_pop_subtree(cursor);
1583 }
1584
1585 static void
1586 dissect_homeplug_av_nw_stats_cnf(ptvcursor_t *cursor)
1587 {
1588    proto_item *it;
1589    guint8      num_stas;
1590    guint8      sta;
1591
1592    if (!ptvcursor_tree(cursor))
1593       return;
1594
1595    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_nw_stats_cnf, -1, ENC_NA);
1596
1597    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_nw_stats_cnf);
1598    {
1599       num_stas = tvb_get_guint8(ptvcursor_tvbuff(cursor),
1600                                 ptvcursor_current_offset(cursor));
1601       ptvcursor_add(cursor, hf_homeplug_av_nw_info_num_stas, 1, ENC_BIG_ENDIAN);
1602
1603       for (sta = 0; sta < num_stas; sta++) {
1604          dissect_homeplug_av_nw_info_sta(cursor, FALSE);
1605       }
1606    }
1607    ptvcursor_pop_subtree(cursor);
1608 }
1609
1610 /* Intellon specific vendor MMEs */
1611 static void
1612 dissect_homeplug_av_get_sw_cnf(ptvcursor_t *cursor)
1613 {
1614    proto_item *it;
1615
1616    if (!ptvcursor_tree(cursor))
1617       return;
1618
1619    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_get_sw_cnf, -1, ENC_NA);
1620
1621    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_get_sw_cnf);
1622    {
1623       ptvcursor_add(cursor, hf_homeplug_av_get_sw_cnf_status, 1, ENC_BIG_ENDIAN);
1624       ptvcursor_add(cursor, hf_homeplug_av_get_sw_cnf_dev_id, 1, ENC_BIG_ENDIAN);
1625       ptvcursor_add(cursor, hf_homeplug_av_get_sw_cnf_ver_len, 1, ENC_BIG_ENDIAN);
1626       ptvcursor_add(cursor, hf_homeplug_av_get_sw_cnf_ver_str, 64, ENC_ASCII|ENC_NA);
1627       ptvcursor_add(cursor, hf_homeplug_av_get_sw_cnf_upg, 1, ENC_BIG_ENDIAN);
1628    }
1629    ptvcursor_pop_subtree(cursor);
1630 }
1631
1632 static void
1633 dissect_homeplug_av_wr_mem_req(ptvcursor_t *cursor)
1634 {
1635    proto_item *it;
1636
1637    if (!ptvcursor_tree(cursor))
1638       return;
1639
1640    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_wr_mem_req, -1, ENC_NA);
1641
1642    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_wr_mem_req);
1643    {
1644       ptvcursor_add(cursor, hf_homeplug_av_mem_addr, 4, ENC_LITTLE_ENDIAN);
1645       ptvcursor_add(cursor, hf_homeplug_av_mem_len_32bits, 4, ENC_LITTLE_ENDIAN);
1646       ptvcursor_add_no_advance(cursor, hf_homeplug_av_mem_data, -1, ENC_NA);
1647    }
1648    ptvcursor_pop_subtree(cursor);
1649 }
1650
1651 static void
1652 dissect_homeplug_av_wr_mem_cnf(ptvcursor_t *cursor)
1653 {
1654    proto_item *it;
1655
1656    if (!ptvcursor_tree(cursor))
1657       return;
1658
1659    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_wr_mem_cnf, -1, ENC_NA);
1660
1661    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_wr_mem_cnf);
1662    {
1663       ptvcursor_add(cursor, hf_homeplug_av_mem_status, 1, ENC_BIG_ENDIAN);
1664       ptvcursor_add(cursor, hf_homeplug_av_mem_addr, 4, ENC_LITTLE_ENDIAN);
1665       ptvcursor_add(cursor, hf_homeplug_av_mem_len_32bits, 4, ENC_LITTLE_ENDIAN);
1666    }
1667    ptvcursor_pop_subtree(cursor);
1668 }
1669
1670 static void
1671 dissect_homeplug_av_rd_mem_req(ptvcursor_t *cursor)
1672 {
1673    proto_item *it;
1674
1675    if (!ptvcursor_tree(cursor))
1676       return;
1677
1678    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_rd_mem_req, -1, ENC_NA);
1679
1680    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_rd_mem_req);
1681    {
1682       ptvcursor_add(cursor, hf_homeplug_av_mem_addr, 4, ENC_LITTLE_ENDIAN);
1683       ptvcursor_add(cursor, hf_homeplug_av_mem_len_32bits, 4, ENC_LITTLE_ENDIAN);
1684    }
1685    ptvcursor_pop_subtree(cursor);
1686 }
1687
1688 static void
1689 dissect_homeplug_av_rd_mem_cnf(ptvcursor_t *cursor)
1690 {
1691    proto_item *it;
1692
1693    if (!ptvcursor_tree(cursor))
1694       return;
1695
1696    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_rd_mem_cnf, -1, ENC_NA);
1697
1698    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_rd_mem_cnf);
1699    {
1700       ptvcursor_add(cursor, hf_homeplug_av_mem_status, 1, ENC_BIG_ENDIAN);
1701       ptvcursor_add(cursor, hf_homeplug_av_mem_addr, 4, ENC_LITTLE_ENDIAN);
1702       ptvcursor_add(cursor, hf_homeplug_av_mem_len_32bits, 4, ENC_LITTLE_ENDIAN);
1703       ptvcursor_add_no_advance(cursor, hf_homeplug_av_mem_data, -1, ENC_NA);
1704    }
1705    ptvcursor_pop_subtree(cursor);
1706 }
1707
1708 static void
1709 dissect_homeplug_av_st_mac_req(ptvcursor_t *cursor)
1710 {
1711    proto_item *it;
1712
1713    if (!ptvcursor_tree(cursor))
1714       return;
1715
1716    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_st_mac_req, -1, ENC_NA);
1717
1718    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_st_mac_req);
1719    {
1720       ptvcursor_add(cursor, hf_homeplug_av_mac_module_id, 1, ENC_BIG_ENDIAN);
1721       ptvcursor_add(cursor, hf_homeplug_av_reserved, 3, ENC_NA);
1722       ptvcursor_add(cursor, hf_homeplug_av_st_mac_req_img_load, 4, ENC_LITTLE_ENDIAN);
1723       ptvcursor_add(cursor, hf_homeplug_av_st_mac_req_img_len, 4, ENC_LITTLE_ENDIAN);
1724       ptvcursor_add(cursor, hf_homeplug_av_st_mac_req_img_chksum, 4, ENC_LITTLE_ENDIAN);
1725       ptvcursor_add(cursor, hf_homeplug_av_st_mac_req_img_start, 4, ENC_LITTLE_ENDIAN);
1726    }
1727    ptvcursor_pop_subtree(cursor);
1728 }
1729
1730
1731 static void
1732 dissect_homeplug_av_st_mac_cnf(ptvcursor_t *cursor)
1733 {
1734    proto_item *it;
1735
1736    if (!ptvcursor_tree(cursor))
1737       return;
1738
1739    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_st_mac_cnf, -1, ENC_NA);
1740
1741    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_st_mac_cnf);
1742    {
1743       ptvcursor_add(cursor, hf_homeplug_av_st_mac_cnf_status, 1, ENC_BIG_ENDIAN);
1744       ptvcursor_add(cursor, hf_homeplug_av_mac_module_id, 1, ENC_BIG_ENDIAN);
1745    }
1746    ptvcursor_pop_subtree(cursor);
1747 }
1748
1749 static void
1750 dissect_homeplug_av_get_nvm_cnf(ptvcursor_t *cursor)
1751 {
1752    proto_item *it;
1753
1754    if (!ptvcursor_tree(cursor))
1755       return;
1756
1757    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_get_nvm_cnf, -1, ENC_NA);
1758
1759    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_get_nvm_cnf);
1760    {
1761       ptvcursor_add(cursor, hf_homeplug_av_get_nvm_cnf_status, 1, ENC_BIG_ENDIAN);
1762       ptvcursor_add(cursor, hf_homeplug_av_get_nvm_cnf_nvm_type, 4, ENC_LITTLE_ENDIAN);
1763       ptvcursor_add(cursor, hf_homeplug_av_get_nvm_cnf_nvm_page, 4, ENC_LITTLE_ENDIAN);
1764       ptvcursor_add(cursor, hf_homeplug_av_get_nvm_cnf_nvm_block, 4, ENC_LITTLE_ENDIAN);
1765       ptvcursor_add(cursor, hf_homeplug_av_get_nvm_cnf_nvm_size, 4, ENC_LITTLE_ENDIAN);
1766    }
1767    ptvcursor_pop_subtree(cursor);
1768 }
1769
1770 static void
1771 dissect_homeplug_av_rs_dev_cnf(ptvcursor_t *cursor)
1772 {
1773    proto_item *it;
1774
1775    if (!ptvcursor_tree(cursor))
1776       return;
1777
1778    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_rs_dev_cnf, -1, ENC_NA);
1779
1780    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_rs_dev_cnf);
1781    {
1782       ptvcursor_add(cursor, hf_homeplug_av_rs_dev_cnf_status, 1, ENC_BIG_ENDIAN);
1783    }
1784    ptvcursor_pop_subtree(cursor);
1785 }
1786
1787 static void dissect_homeplug_av_wr_mod_req(ptvcursor_t *cursor)
1788 {
1789    proto_item *it;
1790
1791    if (!ptvcursor_tree(cursor))
1792       return;
1793
1794    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_wr_mod_req, -1, ENC_NA);
1795
1796    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_wr_mod_req);
1797    {
1798       ptvcursor_add(cursor, hf_homeplug_av_mac_module_id, 1, ENC_BIG_ENDIAN);
1799       ptvcursor_add(cursor, hf_homeplug_av_reserved, 1, ENC_NA);
1800       ptvcursor_add(cursor, hf_homeplug_av_mem_len_16bits, 2, ENC_LITTLE_ENDIAN);
1801       ptvcursor_add(cursor, hf_homeplug_av_mem_offset, 4, ENC_LITTLE_ENDIAN);
1802       ptvcursor_add(cursor, hf_homeplug_av_mem_checksum, 4, ENC_LITTLE_ENDIAN);
1803       ptvcursor_add_no_advance(cursor, hf_homeplug_av_mem_data, -1, ENC_NA);
1804    }
1805    ptvcursor_pop_subtree(cursor);
1806 }
1807
1808 static void dissect_homeplug_av_wr_mod_cnf(ptvcursor_t *cursor)
1809 {
1810    proto_item *it;
1811
1812    if (!ptvcursor_tree(cursor))
1813       return;
1814
1815    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_wr_mod_cnf, -1, ENC_NA);
1816
1817    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_wr_mod_cnf);
1818    {
1819       ptvcursor_add(cursor, hf_homeplug_av_wr_mod_cnf_status, 1, ENC_BIG_ENDIAN);
1820       ptvcursor_add(cursor, hf_homeplug_av_mac_module_id, 1, ENC_BIG_ENDIAN);
1821       ptvcursor_add(cursor, hf_homeplug_av_reserved, 1, ENC_NA);
1822       ptvcursor_add(cursor, hf_homeplug_av_mem_len_16bits, 2, ENC_LITTLE_ENDIAN);
1823       ptvcursor_add(cursor, hf_homeplug_av_mem_offset, 4, ENC_LITTLE_ENDIAN);
1824    }
1825    ptvcursor_pop_subtree(cursor);
1826 }
1827
1828 static void dissect_homeplug_av_wr_mod_ind(ptvcursor_t *cursor)
1829 {
1830    proto_item *it;
1831
1832    if (!ptvcursor_tree(cursor))
1833       return;
1834
1835    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_wr_mod_ind, -1, ENC_NA);
1836
1837    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_wr_mod_ind);
1838    {
1839       ptvcursor_add(cursor, hf_homeplug_av_wr_mod_ind_status, 1, ENC_BIG_ENDIAN);
1840       ptvcursor_add(cursor, hf_homeplug_av_mac_module_id, 1, ENC_BIG_ENDIAN);
1841    }
1842    ptvcursor_pop_subtree(cursor);
1843 }
1844
1845 static void
1846 dissect_homeplug_av_rd_mod_req(ptvcursor_t *cursor)
1847 {
1848    proto_item *it;
1849
1850    if (!ptvcursor_tree(cursor))
1851       return;
1852
1853    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_rd_mod_req, -1, ENC_NA);
1854
1855    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_rd_mod_req);
1856    {
1857       ptvcursor_add(cursor, hf_homeplug_av_mac_module_id, 1, ENC_BIG_ENDIAN);
1858       ptvcursor_add(cursor, hf_homeplug_av_reserved, 1, ENC_NA);
1859       ptvcursor_add(cursor, hf_homeplug_av_mem_len_16bits, 2, ENC_LITTLE_ENDIAN);
1860       ptvcursor_add(cursor, hf_homeplug_av_mem_offset, 4, ENC_LITTLE_ENDIAN);
1861    }
1862    ptvcursor_pop_subtree(cursor);
1863 }
1864
1865 static void
1866 dissect_homeplug_av_rd_mod_cnf(ptvcursor_t *cursor)
1867 {
1868    proto_item *it;
1869
1870    if (!ptvcursor_tree(cursor))
1871       return;
1872
1873    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_rd_mod_cnf, -1, ENC_NA);
1874
1875    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_rd_mod_cnf);
1876    {
1877       ptvcursor_add(cursor, hf_homeplug_av_rd_mod_cnf_status, 1, ENC_BIG_ENDIAN);
1878       ptvcursor_add(cursor, hf_homeplug_av_reserved, 3, ENC_NA);
1879       ptvcursor_add(cursor, hf_homeplug_av_mac_module_id, 1, ENC_BIG_ENDIAN);
1880       ptvcursor_add(cursor, hf_homeplug_av_reserved, 1, ENC_NA);
1881       ptvcursor_add(cursor, hf_homeplug_av_mem_len_16bits, 2, ENC_LITTLE_ENDIAN);
1882       ptvcursor_add(cursor, hf_homeplug_av_mem_offset, 4, ENC_LITTLE_ENDIAN);
1883       ptvcursor_add(cursor, hf_homeplug_av_mem_checksum, 4, ENC_LITTLE_ENDIAN);
1884       ptvcursor_add_no_advance(cursor, hf_homeplug_av_mem_data, -1, ENC_NA);
1885    }
1886    ptvcursor_pop_subtree(cursor);
1887 }
1888
1889 static void
1890 dissect_homeplug_av_mod_nvm_req(ptvcursor_t *cursor)
1891 {
1892    proto_item *it;
1893
1894    if (!ptvcursor_tree(cursor))
1895       return;
1896
1897    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_mod_nvm_req, -1, ENC_NA);
1898
1899    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_mod_nvm_req);
1900    {
1901       ptvcursor_add(cursor, hf_homeplug_av_mac_module_id, 1, ENC_BIG_ENDIAN);
1902    }
1903    ptvcursor_pop_subtree(cursor);
1904 }
1905
1906 static void
1907 dissect_homeplug_av_mod_nvm_cnf(ptvcursor_t *cursor)
1908 {
1909    proto_item *it;
1910
1911    if (!ptvcursor_tree(cursor))
1912       return;
1913
1914    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_mod_nvm_cnf, -1, ENC_NA);
1915
1916    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_mod_nvm_cnf);
1917    {
1918       ptvcursor_add(cursor, hf_homeplug_av_mod_nvm_cnf_status, 1, ENC_BIG_ENDIAN);
1919       ptvcursor_add(cursor, hf_homeplug_av_mac_module_id, 1, ENC_BIG_ENDIAN);
1920    }
1921    ptvcursor_pop_subtree(cursor);
1922 }
1923
1924 static void
1925 dissect_homeplug_av_wd_rpt_req(ptvcursor_t *cursor)
1926 {
1927    proto_item *it;
1928
1929    if (!ptvcursor_tree(cursor))
1930       return;
1931
1932    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_wd_rpt_req, -1, ENC_NA);
1933
1934    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_wd_rpt_req);
1935    {
1936       ptvcursor_add(cursor, hf_homeplug_av_wd_rpt_req_session_id, 2, ENC_LITTLE_ENDIAN);
1937       ptvcursor_add(cursor, hf_homeplug_av_wd_rpt_req_clr, 1, ENC_BIG_ENDIAN);
1938    }
1939    ptvcursor_pop_subtree(cursor);
1940 }
1941
1942 static void
1943 dissect_homeplug_av_wd_rpt_ind(ptvcursor_t *cursor)
1944 {
1945    proto_item *it;
1946
1947    if (!ptvcursor_tree(cursor))
1948       return;
1949
1950    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_wd_rpt_ind, -1, ENC_NA);
1951
1952    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_wd_rpt_ind);
1953    {
1954       ptvcursor_add(cursor, hf_homeplug_av_wd_rpt_ind_status, 1, ENC_BIG_ENDIAN);
1955       ptvcursor_add(cursor, hf_homeplug_av_wd_rpt_ind_session_id, 2, ENC_LITTLE_ENDIAN);
1956       ptvcursor_add(cursor, hf_homeplug_av_wd_rpt_ind_num_parts, 1, ENC_BIG_ENDIAN);
1957       ptvcursor_add(cursor, hf_homeplug_av_wd_rpt_ind_curr_part, 1, ENC_BIG_ENDIAN);
1958       ptvcursor_add(cursor, hf_homeplug_av_wd_rpt_ind_rdata_len, 2, ENC_LITTLE_ENDIAN);
1959       ptvcursor_add(cursor, hf_homeplug_av_wd_rpt_ind_rdata_ofs, 1, ENC_BIG_ENDIAN);
1960       ptvcursor_add(cursor, hf_homeplug_av_wd_rpt_ind_rdata, -1, ENC_NA);
1961    }
1962    ptvcursor_pop_subtree(cursor);
1963 }
1964
1965 static void
1966 dissect_homeplug_av_lnk_stats_req(ptvcursor_t *cursor)
1967 {
1968    proto_item *it;
1969
1970    if (!ptvcursor_tree(cursor))
1971       return;
1972
1973    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_lnk_stats_req, -1, ENC_NA);
1974
1975    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_lnk_stats_req);
1976    {
1977       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_req_mcontrol, 1, ENC_BIG_ENDIAN);
1978       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_req_dir, 1, ENC_BIG_ENDIAN);
1979       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_req_lid, 1, ENC_BIG_ENDIAN);
1980       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_req_macaddr, 6, ENC_NA);
1981    }
1982    ptvcursor_pop_subtree(cursor);
1983 }
1984
1985 static void
1986 dissect_homeplug_av_lnk_stats_tx(ptvcursor_t *cursor)
1987 {
1988    proto_item *it;
1989
1990    if (!ptvcursor_tree(cursor))
1991       return;
1992
1993    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_lnk_stats_tx, -1, ENC_NA);
1994
1995    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_lnk_stats_tx);
1996    {
1997       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_tx_mpdu_ack, 8, ENC_LITTLE_ENDIAN);
1998       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_tx_mpdu_col, 8, ENC_LITTLE_ENDIAN);
1999       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_tx_mpdu_fai, 8, ENC_LITTLE_ENDIAN);
2000       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_tx_pbs_pass, 8, ENC_LITTLE_ENDIAN);
2001       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_tx_pbs_fail, 8, ENC_LITTLE_ENDIAN);
2002    }
2003    ptvcursor_pop_subtree(cursor);
2004 }
2005
2006 static void
2007 dissect_homeplug_av_lnk_stats_rx_interval(ptvcursor_t *cursor)
2008 {
2009    proto_item *it;
2010
2011    if (!ptvcursor_tree(cursor))
2012       return;
2013
2014    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_rx_inv_stats, -1, ENC_NA);
2015
2016    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_lnk_stats_rx_inv);
2017    {
2018       ptvcursor_add(cursor, hf_homeplug_av_rx_inv_phy_rate, 1, ENC_BIG_ENDIAN);
2019       ptvcursor_add(cursor, hf_homeplug_av_rx_inv_pbs_pass, 8, ENC_LITTLE_ENDIAN);
2020       ptvcursor_add(cursor, hf_homeplug_av_rx_inv_pbs_fail, 8, ENC_LITTLE_ENDIAN);
2021       ptvcursor_add(cursor, hf_homeplug_av_rx_inv_tb_pass, 8, ENC_LITTLE_ENDIAN);
2022       ptvcursor_add(cursor, hf_homeplug_av_rx_inv_tb_fail, 8, ENC_LITTLE_ENDIAN);
2023    }
2024    ptvcursor_pop_subtree(cursor);
2025 }
2026
2027 static void
2028 dissect_homeplug_av_lnk_stats_rx(ptvcursor_t *cursor)
2029 {
2030    proto_item *it;
2031    guint8      num_rx_interval;
2032    guint8      interval;
2033
2034    if (!ptvcursor_tree(cursor))
2035       return;
2036
2037    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_lnk_stats_rx, -1, ENC_NA);
2038
2039    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_lnk_stats_rx);
2040    {
2041       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_rx_mpdu_ack, 8, ENC_LITTLE_ENDIAN);
2042       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_rx_mpdu_fai, 8, ENC_LITTLE_ENDIAN);
2043       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_rx_pbs_pass, 8, ENC_LITTLE_ENDIAN);
2044       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_rx_pbs_fail, 8, ENC_LITTLE_ENDIAN);
2045       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_rx_tb_pass, 8, ENC_LITTLE_ENDIAN);
2046       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_rx_tb_fail, 8, ENC_LITTLE_ENDIAN);
2047       num_rx_interval = tvb_get_guint8(ptvcursor_tvbuff(cursor),
2048                                        ptvcursor_current_offset(cursor));
2049       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_rx_num_int, 1, ENC_BIG_ENDIAN);
2050
2051       for (interval = 0; interval < num_rx_interval; interval++) {
2052          dissect_homeplug_av_lnk_stats_rx_interval(cursor);
2053       }
2054    }
2055    ptvcursor_pop_subtree(cursor);
2056 }
2057
2058 static void
2059 dissect_homeplug_av_lnk_stats_cnf(ptvcursor_t *cursor)
2060 {
2061    proto_item *it;
2062    guint8      status;
2063    guint8      direction;
2064
2065    if (!ptvcursor_tree(cursor))
2066       return;
2067
2068    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_lnk_stats_cnf, -1, ENC_NA);
2069
2070    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_lnk_stats_cnf);
2071    {
2072       status = tvb_get_guint8(ptvcursor_tvbuff(cursor),
2073                               ptvcursor_current_offset(cursor));
2074       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_cnf_status, 1, ENC_BIG_ENDIAN);
2075
2076       direction = tvb_get_guint8(ptvcursor_tvbuff(cursor),
2077                                  ptvcursor_current_offset(cursor));
2078       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_cnf_dir, 1, ENC_BIG_ENDIAN);
2079
2080       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_cnf_lid, 1, ENC_BIG_ENDIAN);
2081       ptvcursor_add(cursor, hf_homeplug_av_lnk_stats_cnf_tei, 1, ENC_BIG_ENDIAN);
2082
2083       ptvcursor_add_no_advance(cursor, hf_homeplug_av_lnk_stats_cnf_lstats, -1, ENC_NA);
2084
2085       if (status == HOMEPLUG_AV_LNK_STATS_STATUS_SUCCESS)
2086       {
2087          switch (direction) {
2088          case HOMEPLUG_AV_LNK_STATS_DIR_TX:
2089             dissect_homeplug_av_lnk_stats_tx(cursor);
2090             break;
2091          case HOMEPLUG_AV_LNK_STATS_DIR_RX:
2092             dissect_homeplug_av_lnk_stats_rx(cursor);
2093             break;
2094          case HOMEPLUG_AV_LNK_STATS_DIR_TX_RX:
2095             dissect_homeplug_av_lnk_stats_tx(cursor);
2096             dissect_homeplug_av_lnk_stats_rx(cursor);
2097             break;
2098          }
2099       }
2100    }
2101    ptvcursor_pop_subtree(cursor);
2102 }
2103
2104 static void
2105 dissect_homeplug_av_sniffer_req(ptvcursor_t *cursor)
2106 {
2107    proto_item *it;
2108
2109    if (!ptvcursor_tree(cursor))
2110       return;
2111
2112    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_sniffer_req, -1, ENC_NA);
2113
2114    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_sniffer_req);
2115    {
2116       ptvcursor_add(cursor, hf_homeplug_av_sniffer_req_ctrl, 1, ENC_BIG_ENDIAN);
2117       ptvcursor_add(cursor, hf_homeplug_av_reserved, 4, ENC_NA);
2118    }
2119    ptvcursor_pop_subtree(cursor);
2120 }
2121
2122 static void
2123 dissect_homeplug_av_sniffer_cnf(ptvcursor_t *cursor)
2124 {
2125    proto_item *it;
2126
2127    if (!ptvcursor_tree(cursor))
2128       return;
2129
2130    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_sniffer_cnf, -1, ENC_NA);
2131
2132    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_sniffer_cnf);
2133    {
2134       ptvcursor_add(cursor, hf_homeplug_av_sniffer_cnf_status, 1, ENC_BIG_ENDIAN);
2135       ptvcursor_add(cursor, hf_homeplug_av_sniffer_cnf_state, 1, ENC_BIG_ENDIAN);
2136       ptvcursor_add(cursor, hf_homeplug_av_sniffer_cnf_da, 6, ENC_NA);
2137    }
2138    ptvcursor_pop_subtree(cursor);
2139 }
2140
2141 static void
2142 dissect_homeplug_av_sniffer_ind(ptvcursor_t *cursor)
2143 {
2144    proto_item *it;
2145    proto_item *it_data;
2146
2147    if (!ptvcursor_tree(cursor))
2148       return;
2149
2150    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_sniffer_ind, -1, ENC_NA);
2151
2152    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_sniffer_ind);
2153    {
2154       ptvcursor_add(cursor, hf_homeplug_av_sniffer_ind_type, 1, ENC_BIG_ENDIAN);
2155
2156       it_data = ptvcursor_add_no_advance(cursor, hf_homeplug_av_sniffer_ind_data, -1, ENC_NA);
2157
2158       ptvcursor_push_subtree(cursor, it_data, ett_homeplug_av_sniffer_ind_data);
2159       {
2160          ptvcursor_add(cursor, hf_homeplug_av_sniffer_data_dir, 1, ENC_BIG_ENDIAN);
2161          ptvcursor_add(cursor, hf_homeplug_av_sniffer_data_systime, 8, ENC_LITTLE_ENDIAN);
2162          ptvcursor_add(cursor, hf_homeplug_av_sniffer_data_bc_time, 4, ENC_LITTLE_ENDIAN);
2163          dissect_homeplug_av_frame_control(cursor);
2164          dissect_homeplug_av_beacon(cursor);
2165       }
2166       ptvcursor_pop_subtree(cursor);
2167    }
2168    ptvcursor_pop_subtree(cursor);
2169 }
2170
2171 static void
2172 dissect_homeplug_av_nw_info_cnf(ptvcursor_t *cursor)
2173 {
2174    proto_item *it;
2175    guint8      num_avlns;
2176    guint8      num_stas;
2177    guint8      sta;
2178
2179    if (!ptvcursor_tree(cursor))
2180       return;
2181
2182    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_nw_info_cnf, -1, ENC_NA);
2183
2184    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_nw_info_cnf);
2185    {
2186       num_avlns = tvb_get_guint8(ptvcursor_tvbuff(cursor),
2187                                  ptvcursor_current_offset(cursor));
2188       ptvcursor_add(cursor, hf_homeplug_av_nw_info_num_avlns, 1, ENC_BIG_ENDIAN);
2189
2190       if (num_avlns) {
2191          dissect_homeplug_av_nw_info_net(cursor, TRUE);
2192          num_stas = tvb_get_guint8(ptvcursor_tvbuff(cursor),
2193                                    ptvcursor_current_offset(cursor));
2194          ptvcursor_add(cursor, hf_homeplug_av_nw_info_num_stas, 1, ENC_BIG_ENDIAN);
2195
2196          for (sta = 0; sta < num_stas; sta++) {
2197             dissect_homeplug_av_nw_info_sta(cursor, TRUE);
2198          }
2199       }
2200    }
2201    ptvcursor_pop_subtree(cursor);
2202 }
2203
2204 static void
2205 dissect_homeplug_av_cp_rpt_req(ptvcursor_t *cursor)
2206 {
2207    proto_item *it;
2208
2209    if (!ptvcursor_tree(cursor))
2210       return;
2211
2212    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cp_rpt_req, -1, ENC_NA);
2213
2214    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cp_rpt_req);
2215    {
2216       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_req_session_id, 2, ENC_LITTLE_ENDIAN);
2217       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_req_clr, 1, ENC_BIG_ENDIAN);
2218    }
2219    ptvcursor_pop_subtree(cursor);
2220 }
2221
2222 static void
2223 dissect_homeplug_av_cp_rpt_ind(ptvcursor_t *cursor)
2224 {
2225    proto_item *it;
2226
2227    if (!ptvcursor_tree(cursor))
2228       return;
2229
2230    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cp_rpt_ind, -1, ENC_NA);
2231
2232    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cp_rpt_ind);
2233    {
2234       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_ind_status, 1, ENC_LITTLE_ENDIAN);
2235       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_ind_major_ver, 1, ENC_BIG_ENDIAN);
2236       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_ind_minor_ver, 1, ENC_BIG_ENDIAN);
2237       ptvcursor_add(cursor, hf_homeplug_av_reserved, 14, ENC_NA);
2238       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_ind_session_id, 2, ENC_LITTLE_ENDIAN);
2239       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_ind_total_size, 4, ENC_LITTLE_ENDIAN);
2240       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_ind_blk_offset, 4, ENC_LITTLE_ENDIAN);
2241       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_ind_byte_index, 4, ENC_LITTLE_ENDIAN);
2242       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_ind_num_parts, 1, ENC_BIG_ENDIAN);
2243       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_ind_curr_part, 1, ENC_BIG_ENDIAN);
2244       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_ind_data_len, 2, ENC_LITTLE_ENDIAN);
2245       ptvcursor_add(cursor, hf_homeplug_av_cp_rpt_ind_data_ofs, 1, ENC_LITTLE_ENDIAN);
2246       ptvcursor_add_no_advance(cursor, hf_homeplug_av_cp_rpt_ind_data, -1, ENC_NA);
2247    }
2248    ptvcursor_pop_subtree(cursor);
2249 }
2250
2251 static void
2252 dissect_homeplug_av_fr_lbk_req(ptvcursor_t *cursor)
2253 {
2254    proto_item *it;
2255
2256    if (!ptvcursor_tree(cursor))
2257       return;
2258
2259    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_fr_lbk_req, -1, ENC_NA);
2260
2261    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_fr_lbk_req);
2262    {
2263       ptvcursor_add(cursor, hf_homeplug_av_fr_lbk_duration, 1, ENC_BIG_ENDIAN);
2264       ptvcursor_add(cursor, hf_homeplug_av_reserved, 1, ENC_NA);
2265       ptvcursor_add(cursor, hf_homeplug_av_fr_lbk_len, 2, ENC_BIG_ENDIAN);
2266       ptvcursor_add_no_advance(cursor, hf_homeplug_av_fr_lbk_req_data, -1, ENC_NA);
2267    }
2268    ptvcursor_pop_subtree(cursor);
2269 }
2270
2271 static void
2272 dissect_homeplug_av_fr_lbk_cnf(ptvcursor_t *cursor)
2273 {
2274    proto_item *it;
2275
2276    if (!ptvcursor_tree(cursor))
2277       return;
2278
2279    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_fr_lbk_cnf, -1, ENC_NA);
2280
2281    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_fr_lbk_cnf);
2282    {
2283       ptvcursor_add(cursor, hf_homeplug_av_fr_lbk_cnf_status, 1, ENC_BIG_ENDIAN);
2284       ptvcursor_add(cursor, hf_homeplug_av_fr_lbk_duration, 1, ENC_BIG_ENDIAN);
2285       ptvcursor_add(cursor, hf_homeplug_av_fr_lbk_len, 2, ENC_BIG_ENDIAN);
2286    }
2287    ptvcursor_pop_subtree(cursor);
2288 }
2289
2290 static void
2291 dissect_homeplug_av_lbk_stat_cnf(ptvcursor_t *cursor)
2292 {
2293    proto_item *it;
2294
2295    if (!ptvcursor_tree(cursor))
2296       return;
2297
2298    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_lbk_stat_cnf, -1, ENC_NA);
2299
2300    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_lbk_stat_cnf);
2301    {
2302       ptvcursor_add(cursor, hf_homeplug_av_lbk_stat_cnf_status, 1, ENC_BIG_ENDIAN);
2303       ptvcursor_add(cursor, hf_homeplug_av_lbk_stat_cnf_lbk_stat, 1, ENC_BIG_ENDIAN);
2304    }
2305    ptvcursor_pop_subtree(cursor);
2306 }
2307
2308 static void
2309 dissect_homeplug_av_set_key_req(ptvcursor_t *cursor)
2310 {
2311    proto_item *it;
2312
2313    if (!ptvcursor_tree(cursor))
2314       return;
2315
2316    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_set_key_req, -1, ENC_NA);
2317
2318    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_set_key_req);
2319    {
2320       ptvcursor_add(cursor, hf_homeplug_av_set_key_req_eks, 1, ENC_BIG_ENDIAN);
2321       ptvcursor_add(cursor, hf_homeplug_av_set_key_req_nmk, 16, ENC_NA);
2322       ptvcursor_add(cursor, hf_homeplug_av_nw_info_peks, 1, ENC_BIG_ENDIAN);
2323       ptvcursor_add(cursor, hf_homeplug_av_set_key_req_rda, 6, ENC_NA);
2324       ptvcursor_add(cursor, hf_homeplug_av_set_key_req_dak, 16, ENC_NA);
2325    }
2326    ptvcursor_pop_subtree(cursor);
2327 }
2328
2329 static void
2330 dissect_homeplug_av_set_key_cnf(ptvcursor_t *cursor)
2331 {
2332    proto_item *it;
2333
2334    if (!ptvcursor_tree(cursor))
2335       return;
2336
2337    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_set_key_cnf, -1, ENC_NA);
2338
2339    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_set_key_cnf);
2340    {
2341       ptvcursor_add(cursor, hf_homeplug_av_set_key_cnf_status, 1, ENC_BIG_ENDIAN);
2342    }
2343    ptvcursor_pop_subtree(cursor);
2344 }
2345
2346 static void
2347 dissect_homeplug_av_mfg_string_cnf(ptvcursor_t *cursor)
2348 {
2349    proto_item *it;
2350
2351    if (!ptvcursor_tree(cursor))
2352       return;
2353
2354    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_mfg_string_cnf, -1, ENC_NA);
2355
2356    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_mfg_string_cnf);
2357    {
2358       ptvcursor_add(cursor, hf_homeplug_av_mfg_string_cnf_status, 1, ENC_BIG_ENDIAN);
2359       ptvcursor_add(cursor, hf_homeplug_av_mfg_string_cnf_len, 1, ENC_BIG_ENDIAN);
2360       ptvcursor_add(cursor, hf_homeplug_av_mfg_string_cnf_string, 64, ENC_ASCII|ENC_NA);
2361    }
2362    ptvcursor_pop_subtree(cursor);
2363 }
2364
2365 static void
2366 dissect_homeplug_av_cblock_hdr(ptvcursor_t *cursor)
2367 {
2368    proto_item *it;
2369
2370    if (!ptvcursor_tree(cursor))
2371       return;
2372
2373    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cblock_hdr, -1, ENC_NA);
2374
2375    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cblock_hdr);
2376    {
2377       ptvcursor_add(cursor, hf_homeplug_av_cblock_hdr_ver, 4, ENC_LITTLE_ENDIAN);
2378       ptvcursor_add(cursor, hf_homeplug_av_cblock_img_rom_addr, 4, ENC_LITTLE_ENDIAN);
2379       ptvcursor_add(cursor, hf_homeplug_av_cblock_img_addr, 4, ENC_LITTLE_ENDIAN);
2380       ptvcursor_add(cursor, hf_homeplug_av_cblock_img_len, 4, ENC_LITTLE_ENDIAN);
2381       ptvcursor_add(cursor, hf_homeplug_av_cblock_img_chksum, 4, ENC_LITTLE_ENDIAN);
2382       ptvcursor_add(cursor, hf_homeplug_av_cblock_entry_point, 4, ENC_LITTLE_ENDIAN);
2383       ptvcursor_add(cursor, hf_homeplug_av_reserved, 12, ENC_NA);
2384       ptvcursor_add(cursor, hf_homeplug_av_cblock_next_hdr, 4, ENC_LITTLE_ENDIAN);
2385       ptvcursor_add(cursor, hf_homeplug_av_cblock_hdr_chksum, 4, ENC_LITTLE_ENDIAN);
2386    }
2387    ptvcursor_pop_subtree(cursor);
2388 }
2389
2390 static void
2391 dissect_homeplug_av_cblock(ptvcursor_t *cursor)
2392 {
2393    proto_item *it;
2394
2395    if (!ptvcursor_tree(cursor))
2396       return;
2397
2398    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_cblock, -1, ENC_NA);
2399
2400    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_cblock);
2401    {
2402       ptvcursor_add(cursor, hf_homeplug_av_cblock_sdram_size, 4, ENC_LITTLE_ENDIAN);
2403       ptvcursor_add(cursor, hf_homeplug_av_cblock_sdram_conf, 4, ENC_LITTLE_ENDIAN);
2404       ptvcursor_add(cursor, hf_homeplug_av_cblock_sdram_tim0, 4, ENC_LITTLE_ENDIAN);
2405       ptvcursor_add(cursor, hf_homeplug_av_cblock_sdram_tim1, 4, ENC_LITTLE_ENDIAN);
2406       ptvcursor_add(cursor, hf_homeplug_av_cblock_sdram_cntrl, 4, ENC_LITTLE_ENDIAN);
2407       ptvcursor_add(cursor, hf_homeplug_av_cblock_sdram_refresh, 4, ENC_LITTLE_ENDIAN);
2408       ptvcursor_add(cursor, hf_homeplug_av_cblock_mac_clock, 4, ENC_LITTLE_ENDIAN);
2409       ptvcursor_add(cursor, hf_homeplug_av_reserved, 4, ENC_NA);
2410    }
2411    ptvcursor_pop_subtree(cursor);
2412 }
2413
2414 static void
2415 dissect_homeplug_av_rd_cblock_cnf(ptvcursor_t *cursor)
2416 {
2417    proto_item *it;
2418
2419    if (!ptvcursor_tree(cursor))
2420       return;
2421
2422    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_rd_cblock_cnf, -1, ENC_NA);
2423
2424    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_rd_cblock_cnf);
2425    {
2426       ptvcursor_add(cursor, hf_homeplug_av_rd_cblock_cnf_status, 1, ENC_BIG_ENDIAN);
2427       ptvcursor_add(cursor, hf_homeplug_av_rd_cblock_cnf_len, 1, ENC_BIG_ENDIAN);
2428       dissect_homeplug_av_cblock_hdr(cursor);
2429       dissect_homeplug_av_cblock(cursor);
2430    }
2431    ptvcursor_pop_subtree(cursor);
2432 }
2433
2434 static void
2435 dissect_homeplug_av_set_sdram_req(ptvcursor_t *cursor)
2436 {
2437    proto_item *it;
2438
2439    if (!ptvcursor_tree(cursor))
2440       return;
2441
2442    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_set_sdram_req, -1, ENC_NA);
2443
2444    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_set_sdram_req);
2445    {
2446       dissect_homeplug_av_cblock(cursor);
2447       ptvcursor_add(cursor, hf_homeplug_av_set_sdram_req_chksum, 4, ENC_LITTLE_ENDIAN);
2448    }
2449    ptvcursor_pop_subtree(cursor);
2450 }
2451
2452 static void
2453 dissect_homeplug_av_set_sdram_cnf(ptvcursor_t *cursor)
2454 {
2455    proto_item *it;
2456
2457    if (!ptvcursor_tree(cursor))
2458       return;
2459
2460    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_set_sdram_cnf, -1, ENC_NA);
2461
2462    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_set_sdram_cnf);
2463    {
2464       ptvcursor_add(cursor, hf_homeplug_av_set_sdram_cnf_status, 1, ENC_BIG_ENDIAN);
2465    }
2466    ptvcursor_pop_subtree(cursor);
2467 }
2468
2469 static void
2470 dissect_homeplug_av_host_action_ind(ptvcursor_t *cursor)
2471 {
2472    proto_item *it;
2473
2474    if (!ptvcursor_tree(cursor))
2475       return;
2476
2477    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_host_action_ind, -1, ENC_NA);
2478
2479    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_host_action_ind);
2480    {
2481       ptvcursor_add(cursor, hf_homeplug_av_host_action_ind_act, 1, ENC_BIG_ENDIAN);
2482    }
2483    ptvcursor_pop_subtree(cursor);
2484 }
2485
2486 static void
2487 dissect_homeplug_av_host_action_rsp(ptvcursor_t *cursor)
2488 {
2489    proto_item *it;
2490
2491    if (!ptvcursor_tree(cursor))
2492       return;
2493
2494    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_host_action_rsp, -1, ENC_NA);
2495
2496    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_host_action_rsp);
2497    {
2498       ptvcursor_add(cursor, hf_homeplug_av_host_action_rsp_sts, 1, ENC_BIG_ENDIAN);
2499    }
2500    ptvcursor_pop_subtree(cursor);
2501 }
2502
2503 static void
2504 dissect_homeplug_av_op_attr_req(ptvcursor_t *cursor)
2505 {
2506    proto_item *it;
2507
2508    if (!ptvcursor_tree(cursor))
2509       return;
2510
2511    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_op_attr_req, -1, ENC_NA);
2512
2513    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_op_attr_req);
2514    {
2515       ptvcursor_add(cursor, hf_homeplug_av_op_attr_cookie, 4, ENC_LITTLE_ENDIAN);
2516       ptvcursor_add(cursor, hf_homeplug_av_op_attr_rep_type, 1, ENC_BIG_ENDIAN);
2517    }
2518    ptvcursor_pop_subtree(cursor);
2519 }
2520
2521 static void
2522 dissect_homeplug_av_op_attr_bin_report(ptvcursor_t *cursor)
2523 {
2524    proto_item *it;
2525
2526    if (!ptvcursor_tree(cursor))
2527       return;
2528
2529    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_op_attr_cnf_data, -1, ENC_NA);
2530
2531    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_op_attr_data);
2532    {
2533       ptvcursor_add(cursor, hf_homeplug_av_op_attr_data_hw, 16, ENC_ASCII|ENC_NA);
2534       ptvcursor_add(cursor, hf_homeplug_av_op_attr_data_sw, 16, ENC_ASCII|ENC_NA);
2535       ptvcursor_add(cursor, hf_homeplug_av_op_attr_data_sw_major, 4, ENC_LITTLE_ENDIAN);
2536       ptvcursor_add(cursor, hf_homeplug_av_op_attr_data_sw_minor, 4, ENC_LITTLE_ENDIAN);
2537       ptvcursor_add(cursor, hf_homeplug_av_op_attr_data_sw_sub, 4, ENC_LITTLE_ENDIAN);
2538       ptvcursor_add(cursor, hf_homeplug_av_op_attr_data_sw_num, 4, ENC_LITTLE_ENDIAN);
2539       ptvcursor_add(cursor, hf_homeplug_av_reserved, 8, ENC_NA);
2540       ptvcursor_add(cursor, hf_homeplug_av_op_attr_data_sw_date, 8, ENC_ASCII|ENC_NA);
2541       ptvcursor_add(cursor, hf_homeplug_av_op_attr_data_sw_rel, 12, ENC_ASCII|ENC_NA);
2542    }
2543    ptvcursor_pop_subtree(cursor);
2544 }
2545
2546 static void
2547 dissect_homeplug_av_op_attr_cnf(ptvcursor_t *cursor)
2548 {
2549    proto_item *it;
2550
2551    if (!ptvcursor_tree(cursor))
2552       return;
2553
2554    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_op_attr_cnf, -1, ENC_NA);
2555
2556    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_op_attr_cnf);
2557    {
2558       ptvcursor_add(cursor, hf_homeplug_av_op_attr_cnf_status, 2, ENC_LITTLE_ENDIAN);
2559       ptvcursor_add(cursor, hf_homeplug_av_op_attr_cookie, 4, ENC_LITTLE_ENDIAN);
2560       ptvcursor_add(cursor, hf_homeplug_av_op_attr_rep_type, 1, ENC_BIG_ENDIAN);
2561       ptvcursor_add(cursor, hf_homeplug_av_op_attr_cnf_size, 2, ENC_LITTLE_ENDIAN);
2562       dissect_homeplug_av_op_attr_bin_report(cursor);
2563    }
2564    ptvcursor_pop_subtree(cursor);
2565 }
2566
2567 static void
2568 dissect_homeplug_av_get_enet_phy_req(ptvcursor_t *cursor)
2569 {
2570    proto_item *it;
2571
2572    if (!ptvcursor_tree(cursor))
2573       return;
2574
2575    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_enet_phy_req, -1, ENC_NA);
2576
2577    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_enet_phy_req);
2578    {
2579       ptvcursor_add(cursor, hf_homeplug_av_enet_phy_req_mcontrol, 1, ENC_BIG_ENDIAN);
2580       ptvcursor_add(cursor, hf_homeplug_av_enet_phy_req_addcaps, 1, ENC_BIG_ENDIAN);
2581       ptvcursor_add(cursor, hf_homeplug_av_reserved, 3, ENC_NA);
2582    }
2583    ptvcursor_pop_subtree(cursor);
2584 }
2585
2586 static void
2587 dissect_homeplug_av_get_enet_phy_cnf(ptvcursor_t *cursor)
2588 {
2589    proto_item *it;
2590
2591    if (!ptvcursor_tree(cursor))
2592       return;
2593
2594    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_enet_phy_cnf, -1, ENC_NA);
2595
2596    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_enet_phy_cnf);
2597    {
2598       ptvcursor_add(cursor, hf_homeplug_av_enet_phy_cnf_status, 1, ENC_BIG_ENDIAN);
2599       ptvcursor_add(cursor, hf_homeplug_av_enet_phy_cnf_speed, 1, ENC_BIG_ENDIAN);
2600       ptvcursor_add(cursor, hf_homeplug_av_enet_phy_cnf_duplex, 1, ENC_BIG_ENDIAN);
2601    }
2602    ptvcursor_pop_subtree(cursor);
2603 }
2604
2605 static void
2606 dissect_homeplug_av_tone_map_req(ptvcursor_t *cursor)
2607 {
2608    proto_item *it;
2609
2610    if (!ptvcursor_tree(cursor))
2611       return;
2612
2613    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_tone_map_req, -1, ENC_NA);
2614
2615    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_tone_map_req);
2616    {
2617       ptvcursor_add(cursor, hf_homeplug_av_tone_map_req_mac, 6, ENC_NA);
2618       ptvcursor_add(cursor, hf_homeplug_av_tone_map_req_slot, 1, ENC_BIG_ENDIAN);
2619    }
2620    ptvcursor_pop_subtree(cursor);
2621 }
2622
2623 static void
2624 dissect_homeplug_av_tone_map_carrier(ptvcursor_t *cursor)
2625 {
2626    proto_item *it;
2627
2628    if (!ptvcursor_tree(cursor))
2629       return;
2630
2631    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_tone_map_carrier, -1, ENC_NA);
2632
2633    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_tone_map_carrier);
2634    {
2635       ptvcursor_add_no_advance(cursor, hf_homeplug_av_tone_map_carrier_lo, 1, ENC_BIG_ENDIAN);
2636       ptvcursor_add(cursor, hf_homeplug_av_tone_map_carrier_hi, 1, ENC_BIG_ENDIAN);
2637    }
2638    ptvcursor_pop_subtree(cursor);
2639 }
2640
2641 static void
2642 dissect_homeplug_av_tone_map_cnf(ptvcursor_t *cursor)
2643 {
2644    proto_item *it;
2645    guint16     i;
2646    guint16     num_act_carriers;
2647    guint16     max_carriers;
2648
2649    if (!ptvcursor_tree(cursor))
2650       return;
2651
2652    it = ptvcursor_add_no_advance(cursor, hf_homeplug_av_tone_map_cnf, -1, ENC_NA);
2653
2654    ptvcursor_push_subtree(cursor, it, ett_homeplug_av_tone_map_cnf);
2655    {
2656       ptvcursor_add(cursor, hf_homeplug_av_tone_map_cnf_status, 1, ENC_BIG_ENDIAN);
2657       ptvcursor_add(cursor, hf_homeplug_av_tone_map_cnf_slot, 1, ENC_BIG_ENDIAN);
2658       ptvcursor_add(cursor, hf_homeplug_av_tone_map_cnf_num_tms, 1, ENC_BIG_ENDIAN);
2659       num_act_carriers = tvb_get_letohs(ptvcursor_tvbuff(cursor),
2660                                 ptvcursor_current_offset(cursor));
2661       ptvcursor_add(cursor, hf_homeplug_av_tone_map_cnf_num_act, 2, ENC_LITTLE_ENDIAN);
2662
2663       if (num_act_carriers) {
2664          max_carriers = num_act_carriers / 2;
2665
2666           /* check if number of carriers is odd */
2667          if (num_act_carriers & 1)
2668             max_carriers += 1;
2669
2670          for (i = 0; i < max_carriers; i++) {
2671             dissect_homeplug_av_tone_map_carrier(cursor);
2672          }
2673       }
2674    }
2675    ptvcursor_pop_subtree(cursor);
2676 }
2677
2678 static void
2679 dissect_homeplug_av_mme(ptvcursor_t *cursor, guint16 homeplug_av_mmtype)
2680 {
2681
2682    switch (homeplug_av_mmtype) {
2683       /* Public MMEs */
2684    case HOMEPLUG_AV_MMTYPE_CC_DISC_LIST_CNF:
2685       dissect_homeplug_av_cc_disc_list_cnf(cursor);
2686       break;
2687    case HOMEPLUG_AV_MMTYPE_CM_ENC_PLD_IND:
2688       dissect_homeplug_av_cm_enc_pld_ind(cursor);
2689       break;
2690    case HOMEPLUG_AV_MMTYPE_CM_ENC_PLD_RSP:
2691       dissect_homeplug_av_cm_enc_pld_rsp(cursor);
2692       break;
2693    case HOMEPLUG_AV_MMTYPE_CM_SET_KEY_REQ:
2694       dissect_homeplug_av_cm_set_key_req(cursor);
2695       break;
2696    case HOMEPLUG_AV_MMTYPE_CM_SET_KEY_CNF:
2697       dissect_homeplug_av_cm_set_key_cnf(cursor);
2698       break;
2699    case HOMEPLUG_AV_MMTYPE_CM_GET_KEY_REQ:
2700       dissect_homeplug_av_cm_get_key_req(cursor);
2701       break;
2702    case HOMEPLUG_AV_MMTYPE_CM_GET_KEY_CNF:
2703       dissect_homeplug_av_cm_get_key_cnf(cursor);
2704       break;
2705    case HOMEPLUG_AV_MMTYPE_CM_BRG_INFO_CNF:
2706       dissect_homeplug_av_get_brg_infos_cnf(cursor);
2707       break;
2708    case HOMEPLUG_AV_MMTYPE_CM_NW_INFO_CNF:
2709       dissect_homeplug_av_nw_infos_cnf(cursor);
2710       break;
2711    case HOMEPLUG_AV_MMTYPE_CM_NW_STATS_CNF:
2712       dissect_homeplug_av_nw_stats_cnf(cursor);
2713       break;
2714
2715       /* Intellon Vendor-specific MMEs */
2716    case HOMEPLUG_AV_MMTYPE_GET_SW_CNF:
2717       dissect_homeplug_av_get_sw_cnf(cursor);
2718       break;
2719    case HOMEPLUG_AV_MMTYPE_WR_MEM_REQ:
2720       dissect_homeplug_av_wr_mem_req(cursor);
2721       break;
2722    case HOMEPLUG_AV_MMTYPE_WR_MEM_CNF:
2723       dissect_homeplug_av_wr_mem_cnf(cursor);
2724       break;
2725    case HOMEPLUG_AV_MMTYPE_RD_MEM_REQ:
2726       dissect_homeplug_av_rd_mem_req(cursor);
2727       break;
2728    case HOMEPLUG_AV_MMTYPE_RD_MEM_CNF:
2729       dissect_homeplug_av_rd_mem_cnf(cursor);
2730       break;
2731    case HOMEPLUG_AV_MMTYPE_ST_MAC_REQ:
2732       dissect_homeplug_av_st_mac_req(cursor);
2733       break;
2734    case HOMEPLUG_AV_MMTYPE_ST_MAC_CNF:
2735       dissect_homeplug_av_st_mac_cnf(cursor);
2736       break;
2737    case HOMEPLUG_AV_MMTYPE_GET_NVM_CNF:
2738       dissect_homeplug_av_get_nvm_cnf(cursor);
2739       break;
2740    case HOMEPLUG_AV_MMTYPE_RS_DEV_CNF:
2741       dissect_homeplug_av_rs_dev_cnf(cursor);
2742       break;
2743    case HOMEPLUG_AV_MMTYPE_WR_MOD_REQ:
2744       dissect_homeplug_av_wr_mod_req(cursor);
2745       break;
2746    case HOMEPLUG_AV_MMTYPE_WR_MOD_CNF:
2747       dissect_homeplug_av_wr_mod_cnf(cursor);
2748       break;
2749    case HOMEPLUG_AV_MMTYPE_WR_MOD_IND:
2750       dissect_homeplug_av_wr_mod_ind(cursor);
2751       break;
2752    case HOMEPLUG_AV_MMTYPE_RD_MOD_REQ:
2753       dissect_homeplug_av_rd_mod_req(cursor);
2754       break;
2755    case HOMEPLUG_AV_MMTYPE_RD_MOD_CNF:
2756       dissect_homeplug_av_rd_mod_cnf(cursor);
2757       break;
2758    case HOMEPLUG_AV_MMTYPE_NVM_MOD_REQ:
2759       dissect_homeplug_av_mod_nvm_req(cursor);
2760       break;
2761    case HOMEPLUG_AV_MMTYPE_NVM_MOD_CNF:
2762       dissect_homeplug_av_mod_nvm_cnf(cursor);
2763       break;
2764    case HOMEPLUG_AV_MMTYPE_WD_RPT_REQ:
2765       dissect_homeplug_av_wd_rpt_req(cursor);
2766       break;
2767    case HOMEPLUG_AV_MMTYPE_WD_RPT_IND:
2768       dissect_homeplug_av_wd_rpt_ind(cursor);
2769       break;
2770    case HOMEPLUG_AV_MMTYPE_LNK_STATS_REQ:
2771       dissect_homeplug_av_lnk_stats_req(cursor);
2772       break;
2773    case HOMEPLUG_AV_MMTYPE_LNK_STATS_CNF:
2774       dissect_homeplug_av_lnk_stats_cnf(cursor);
2775       break;
2776    case HOMEPLUG_AV_MMTYPE_SNIFFER_REQ:
2777       dissect_homeplug_av_sniffer_req(cursor);
2778       break;
2779    case HOMEPLUG_AV_MMTYPE_SNIFFER_CNF:
2780       dissect_homeplug_av_sniffer_cnf(cursor);
2781       break;
2782    case HOMEPLUG_AV_MMTYPE_SNIFFER_IND:
2783       dissect_homeplug_av_sniffer_ind(cursor);
2784       break;
2785    case HOMEPLUG_AV_MMTYPE_NW_INFO_CNF:
2786       dissect_homeplug_av_nw_info_cnf(cursor);
2787       break;
2788    case HOMEPLUG_AV_MMTYPE_CP_RPT_REQ:
2789       dissect_homeplug_av_cp_rpt_req(cursor);
2790       break;
2791    case HOMEPLUG_AV_MMTYPE_CP_RPT_IND:
2792       dissect_homeplug_av_cp_rpt_ind(cursor);
2793       break;
2794    case HOMEPLUG_AV_MMTYPE_FR_LBK_REQ:
2795       dissect_homeplug_av_fr_lbk_req(cursor);
2796       break;
2797    case HOMEPLUG_AV_MMTYPE_FR_LBK_CNF:
2798       dissect_homeplug_av_fr_lbk_cnf(cursor);
2799       break;
2800    case HOMEPLUG_AV_MMTYPE_LBK_STAT_CNF:
2801       dissect_homeplug_av_lbk_stat_cnf(cursor);
2802       break;
2803    case HOMEPLUG_AV_MMTYPE_SET_KEY_REQ:
2804       dissect_homeplug_av_set_key_req(cursor);
2805       break;
2806    case HOMEPLUG_AV_MMTYPE_SET_KEY_CNF:
2807       dissect_homeplug_av_set_key_cnf(cursor);
2808       break;
2809    case HOMEPLUG_AV_MMTYPE_MFG_STRING_CNF:
2810       dissect_homeplug_av_mfg_string_cnf(cursor);
2811       break;
2812    case HOMEPLUG_AV_MMTYPE_RD_CBLOCK_CNF:
2813       dissect_homeplug_av_rd_cblock_cnf(cursor);
2814       break;
2815    case HOMEPLUG_AV_MMTYPE_SET_SDRAM_REQ:
2816       dissect_homeplug_av_set_sdram_req(cursor);
2817       break;
2818    case HOMEPLUG_AV_MMTYPE_SET_SDRAM_CNF:
2819       dissect_homeplug_av_set_sdram_cnf(cursor);
2820       break;
2821    case HOMEPLUG_AV_MMTYPE_HOST_ACTION_IND:
2822       dissect_homeplug_av_host_action_ind(cursor);
2823       break;
2824    case HOMEPLUG_AV_MMTYPE_HOST_ACTION_RSP:
2825       dissect_homeplug_av_host_action_rsp(cursor);
2826       break;
2827    case HOMEPLUG_AV_MMTYPE_OP_ATTR_REQ:
2828       dissect_homeplug_av_op_attr_req(cursor);
2829       break;
2830    case HOMEPLUG_AV_MMTYPE_OP_ATTR_CNF:
2831       dissect_homeplug_av_op_attr_cnf(cursor);
2832       break;
2833    case HOMEPLUG_AV_MMTYPE_GET_ENET_PHY_REQ:
2834       dissect_homeplug_av_get_enet_phy_req(cursor);
2835       break;
2836    case HOMEPLUG_AV_MMTYPE_GET_ENET_PHY_CNF:
2837       dissect_homeplug_av_get_enet_phy_cnf(cursor);
2838       break;
2839    case HOMEPLUG_AV_MMTYPE_TONE_MAP_REQ:
2840       dissect_homeplug_av_tone_map_req(cursor);
2841       break;
2842    case HOMEPLUG_AV_MMTYPE_TONE_MAP_CNF:
2843       dissect_homeplug_av_tone_map_cnf(cursor);
2844       break;
2845    default:
2846       break;
2847    }
2848
2849    return;
2850 }
2851
2852 static void
2853 dissect_homeplug_av(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2854 {
2855    proto_item  *ti               = NULL;
2856    proto_tree  *homeplug_av_tree = NULL;
2857    ptvcursor_t *cursor;
2858    guint16      homeplug_av_mmtype;
2859
2860    col_set_str(pinfo->cinfo, COL_PROTOCOL, "HomePlug AV");
2861    col_set_str(pinfo->cinfo, COL_INFO, "MAC Management");
2862
2863    if (tree) {
2864       ti = proto_tree_add_item(tree, proto_homeplug_av, tvb, 0, -1, ENC_NA);
2865       homeplug_av_tree = proto_item_add_subtree(ti, ett_homeplug_av);
2866    }
2867
2868    cursor = ptvcursor_new(homeplug_av_tree, tvb, 0);
2869
2870    /* Check if we have enough data to process the header */
2871    if (check_tvb_length(cursor, HOMEPLUG_AV_MMHDR_LEN) != TVB_LEN_SHORTEST) {
2872
2873       homeplug_av_mmtype = dissect_homeplug_av_mmhdr(cursor);
2874
2875       if (check_col(pinfo->cinfo, COL_INFO)) {
2876          col_append_sep_str(pinfo->cinfo, COL_INFO, ", ",
2877                             val_to_str_ext(homeplug_av_mmtype, &homeplug_av_mmtype_vals_ext, "Unknown 0x%x"));
2878       }
2879
2880       dissect_homeplug_av_mme(cursor, homeplug_av_mmtype);
2881    }
2882
2883    ptvcursor_free(cursor);
2884 }
2885
2886 void
2887 proto_register_homeplug_av(void)
2888 {
2889    static hf_register_info hf[] = {
2890       { &hf_homeplug_av_reserved,
2891         { "Reserved", "homeplug_av.reserved",
2892           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
2893       },
2894       /* MM Header */
2895       { &hf_homeplug_av_mmhdr,
2896         { "MAC Management Header", "homeplug_av.mmhdr",
2897           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
2898       },
2899       { &hf_homeplug_av_mmhdr_mmver,
2900         { "Version", "homeplug_av.mmhdr.mmver",
2901           FT_UINT8, BASE_DEC, VALS(homeplug_av_mmver_vals), HOMEPLUG_AV_MMVER_MASK, NULL, HFILL }
2902       },
2903       { &hf_homeplug_av_mmhdr_mmtype,
2904         { "Type", "homeplug_av.mmhdr.mmtype",
2905           FT_UINT16, BASE_HEX | BASE_EXT_STRING, &homeplug_av_mmtype_vals_ext, 0x0000, NULL, HFILL }
2906       },
2907       { &hf_homeplug_av_mmhdr_mmtype_lsb,
2908         { "LSB", "homeplug_av.mmhdr.mmtype.lsb",
2909           FT_UINT8, BASE_HEX, VALS(homeplug_av_mmtype_lsb_vals), HOMEPLUG_AV_MMTYPE_LSB_MASK, NULL, HFILL }
2910       },
2911       { &hf_homeplug_av_mmhdr_mmtype_msb,
2912         { "MSB", "homeplug_av.mmhdr.mmtype.msb",
2913           FT_UINT8, BASE_HEX, VALS(homeplug_av_mmtype_msb_vals), HOMEPLUG_AV_MMTYPE_MSB_MASK, "Reserved", HFILL },
2914       },
2915       /* Public MME */
2916       { &hf_homeplug_av_public,
2917         { "Public MME", "homeplug_av.public",
2918           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
2919       },
2920       { &hf_homeplug_av_public_frag_count,
2921         { "Fragment count", "homeplug_av.public.frag_count",
2922           FT_UINT8, BASE_DEC, NULL, HOMEPLUG_AV_PUBLIC_FRAG_COUNT_MASK, NULL, HFILL }
2923       },
2924       { &hf_homeplug_av_public_frag_index,
2925         { "Fragment index", "homeplug_av.public.frag_index",
2926           FT_UINT8, BASE_DEC, NULL, HOMEPLUG_AV_PUBLIC_FRAG_INDEX_MASK, NULL, HFILL }
2927       },
2928       { &hf_homeplug_av_public_frag_seqnum,
2929         { "Fragment Sequence number", "homeplug_av.public.frag_seqnum",
2930           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
2931       },
2932       /* Frame Control */
2933       { &hf_homeplug_av_fc,
2934         { "Frame control", "homeplug_av.fc",
2935           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
2936       },
2937       { &hf_homeplug_av_fc_stei,
2938         { "Source Terminal Equipment Identifier", "homeplug_av.fc.snei",
2939           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
2940       },
2941       { &hf_homeplug_av_fc_dtei,
2942         { "Destination Terminal Equipment Identifier", "homeplug_av.fc.dtei",
2943           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
2944       },
2945       { &hf_homeplug_av_fc_lid,
2946         { "Link ID", "homeplug_av.fc.lid",
2947           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
2948       },
2949       { &hf_homeplug_av_fc_cfs,
2950         { "Contention free session", "homeplug_av.fc.cfs",
2951           FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }
2952       },
2953       { &hf_homeplug_av_fc_bdf,
2954         { "Beacon detect flag", "homeplug_av.fc.bdf",
2955           FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }
2956       },
2957       { &hf_homeplug_av_fc_hp10df,
2958         { "Homeplug AV version 1.0", "homeplug_av.fc.hp10df",
2959           FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }
2960       },
2961       { &hf_homeplug_av_fc_hp11df,
2962         { "Homeplug AV version 1.1", "homeplug_av.fc.hp11df",
2963           FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }
2964       },
2965       { &hf_homeplug_av_fc_ppb,
2966         { "Pending PHY blocks", "homeplug_av.fc.ppb",
2967           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
2968       },
2969       { &hf_homeplug_av_fc_ble,
2970         { "Bit loading estimate", "homeplug_av.fc.ble",
2971           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
2972       },
2973       { &hf_homeplug_av_fc_pbsz,
2974         { "PHY block size", "homeplug_av.fc.pbsz",
2975           FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }
2976       },
2977       { &hf_homeplug_av_fc_num_sym,
2978         { "Number of symbols", "homeplug_av.fc.num_sym",
2979           FT_UINT8, BASE_DEC, NULL, 0x06, NULL, HFILL }
2980       },
2981       { &hf_homeplug_av_fc_tmi_av,
2982         { "Tonemap index", "homeplug_av.fc.tmi_av",
2983           FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL }
2984       },
2985       { &hf_homeplug_av_fc_fl_av,
2986         { "Frame length", "homeplug_av.fc.fl_av",
2987           FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL }
2988       },
2989       { &hf_homeplug_av_fc_mpdu_cnt,
2990         { "MPDU count", "homeplug_av.fc.mpdu_cnt",
2991           FT_UINT8, BASE_DEC, NULL, 0x3000, NULL, HFILL }
2992       },
2993       { &hf_homeplug_av_fc_burst_cnt,
2994         { "Burst count", "homeplug_av.fc.burst_cnt",
2995           FT_UINT8, BASE_DEC, NULL, 0xC000, NULL, HFILL }
2996       },
2997       { &hf_homeplug_av_fc_clst,
2998         { "Convergence layer SAP type", "homeplug_av.fc.clst",
2999           FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL }
3000       },
3001       { &hf_homeplug_av_fc_rg_len,
3002         { "Reverse grant length", "homeplug_av.fc.rg_len",
3003           FT_UINT8, BASE_DEC, NULL, 0x3F, NULL, HFILL }
3004       },
3005       { &hf_homeplug_av_fc_mfs_cmd_mgmt,
3006         { "Management MAC frame stream command", "homeplug_av.fc.mfs_cmd_mgmt",
3007           FT_UINT8, BASE_DEC, NULL, 0x0E, NULL, HFILL }
3008       },
3009       { &hf_homeplug_av_fc_mfs_cmd_data,
3010         { "Data MAC frame stream command", "homeplug_av.fc.mfs_data_mgmt",
3011           FT_UINT8, BASE_DEC, NULL, 0x70, NULL, HFILL }
3012       },
3013       { &hf_homeplug_av_fc_rsr,
3014         { "Request SACK transmission", "homeplug_av.fc.rsr",
3015           FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }
3016       },
3017       { &hf_homeplug_av_fc_mcf,
3018         { "Multicast", "homeplug_av.fc.mcf",
3019           FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }
3020       },
3021       { &hf_homeplug_av_fc_dccpcf,
3022         { "Different CP PHY clock", "homeplug_av.fc.dccpcf",
3023           FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }
3024       },
3025       { &hf_homeplug_av_fc_mnbf,
3026         { "Multinetwork broadcast", "homeplug_av.fc.mnbf",
3027           FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }
3028       },
3029       /* Beacon body */
3030       { &hf_homeplug_av_bcn,
3031         { "Beacon", "homeplug_av.bcn",
3032           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3033       },
3034       { &hf_homeplug_av_bcn_bts,
3035         { "Beacon timestamp", "homeplug_av.bcn.bts",
3036           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
3037       },
3038       { &hf_homeplug_av_bcn_bto_0,
3039         { "Beacon transmission offset 0", "homeplug_av.bcn.bto_0",
3040           FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL }
3041       },
3042       { &hf_homeplug_av_bcn_bto_1,
3043         { "Beacon transmission offset 1", "homeplug_av.bcn.bto_1",
3044           FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL }
3045       },
3046       { &hf_homeplug_av_bcn_bto_2,
3047         { "Beacon transmission offset 2", "homeplug_av.bcn.bto_2",
3048           FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL }
3049       },
3050       { &hf_homeplug_av_bcn_bto_3,
3051         { "Beacon transmission offset 3", "homeplug_av.bcn.bto_3",
3052           FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL }
3053       },
3054       /* Central Coordination Discovery List Confirmation */
3055       { &hf_homeplug_av_cc_disc_list_cnf,
3056         { "Central Coordination Discovery List Confirmation", "homeplug_av.cc_disc_list_cnf",
3057           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3058       },
3059       /* Station informations */
3060       { &hf_homeplug_av_cc_disc_list_sta_cnt,
3061         { "Station count", "homeplug_av.cc_disc_list_cnf.sta_cnt",
3062           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3063       },
3064       { &hf_homeplug_av_cc_sta_info,
3065         { "Station information", "homeplug_av.cc_disc_list_cnf.sta_info",
3066           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3067       },
3068       { &hf_homeplug_av_cc_sta_info_mac,
3069         { "MAC address", "homeplug_av.cc_disc_list_cnf.sta_info.mac",
3070           FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL }
3071       },
3072       { &hf_homeplug_av_cc_sta_info_tei,
3073         { "Terminal Equipment Identifier", "homeplug_av.cc_disc_list_cnf.sta_info.tei",
3074           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3075       },
3076       { &hf_homeplug_av_cc_sta_info_same_net,
3077         { "Network type", "homeplug_av.cc_disc_list_cnf.sta_info.same_net",
3078           FT_UINT8, BASE_HEX, VALS(homeplug_av_cc_sta_net_type_vals), HOMEPLUG_AV_CC_STA_NET_MASK, NULL, HFILL }
3079       },
3080       { &hf_homeplug_av_cc_sta_info_sig_level,
3081         { "Signal level", "homeplug_av.cc_disc_list_cnf.sta_info.sig_level",
3082           FT_UINT8, BASE_HEX | BASE_EXT_STRING, &homeplug_av_sig_level_vals_ext, 0x00, "Reserved", HFILL }
3083       },
3084       { &hf_homeplug_av_cc_sta_info_avg_ble,
3085         { "Average BLE", "homeplug_av.cc_disc_list_cnf.sta_info.avg_ble",
3086           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3087       },
3088       /* Network infos */
3089       { &hf_homeplug_av_cc_disc_list_net_cnt,
3090         { "Network count", "homeplug_av.cc_disc_list_cnf.net_cnt",
3091           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3092       },
3093       { &hf_homeplug_av_cc_net_info,
3094         { "Network information", "homeplug_av.cc_disc_list_cnf.net_info",
3095           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3096       },
3097       { &hf_homeplug_av_cc_net_info_hyb_mode,
3098         { "Hybrid mode", "homeplug_av.cc_disc_list_cnf.net_info.hyb_mode",
3099           FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL }
3100       },
3101       { &hf_homeplug_av_cc_net_info_bcn_slots,
3102         { "Beacon slots", "homeplug_av.cc_disc_list_cnf.net_info.bcn_slots",
3103           FT_UINT8, BASE_DEC, NULL, 0x08, "Reserved", HFILL }
3104       },
3105       { &hf_homeplug_av_cc_net_info_cco_sts,
3106         { "Coordinating status", "homeplug_av.cc_disc_list_cnf.net_info.cco_status",
3107           FT_UINT8, BASE_HEX, VALS(homeplug_av_cco_status_vals), HOMEPLUG_AV_CCO_STATUS_MASK, "Unknown", HFILL }
3108       },
3109       { &hf_homeplug_av_cc_net_info_bcn_ofs,
3110         { "Beacon offset", "homeplug_av.cc_disc_list_cnf.net_info.bcn_ofs",
3111           FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL }
3112       },
3113       /* Shared encrypted related fields */
3114       { &hf_homeplug_av_nw_info_del_type,
3115         { "Delimiter type", "homeplug_av.nw_info.del_type",
3116           FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL }
3117       },
3118       { &hf_homeplug_av_nw_info_fccs_av,
3119         { "Frame control check sequence", "homeplug_av.nw_info.fccs_av",
3120           FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }
3121       },
3122       { &hf_homeplug_av_nw_info_peks,
3123         { "Payload Encryption Key Select", "homeplug_av.nw_info.peks",
3124           FT_UINT8, BASE_HEX | BASE_EXT_STRING, &homeplug_av_peks_vals_ext, HOMEPLUG_AV_PEKS_MASK, NULL, HFILL }
3125       },
3126       { &hf_homeplug_av_nw_info_pid,
3127         { "Protocol ID", "homeplug_av.nw_info.pid",
3128           FT_UINT8, BASE_HEX, VALS(homeplug_av_pid_vals), HOMEPLUG_AV_PID_MASK, "Reserved", HFILL }
3129       },
3130       { &hf_homeplug_av_nw_info_prn,
3131         { "Protocol run number", "homeplug_av.nw_info.prn",
3132           FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
3133       },
3134       { &hf_homeplug_av_nw_info_pmn,
3135         { "Protocol message number", "homeplug_av.nw_info.pmn",
3136           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3137       },
3138       { &hf_homeplug_av_nw_info_my_nonce,
3139         { "My nonce", "homeplug_av.nw_info.my_nonce",
3140           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3141       },
3142       { &hf_homeplug_av_nw_info_your_nonce,
3143         { "Your nonce", "homeplug_av.nw_info.your_nonce",
3144           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3145       },
3146       { &hf_homeplug_av_nw_info_cco_cap,
3147         { "CCo capabilities", "homeplug_av.nw_info.cco_cap",
3148           FT_UINT8, BASE_HEX, VALS(homeplug_av_nw_info_role_vals), HOMEPLUG_AV_NW_INFO_ROLE_MASK, NULL, HFILL }
3149       },
3150       { &hf_homeplug_av_nw_info_key_type,
3151         { "Key type", "homeplug_av.nw_info.key_type",
3152           FT_UINT8, BASE_HEX, VALS(homeplug_av_key_type_vals), HOMEPLUG_AV_KEY_TYPE_MASK, NULL, HFILL }
3153       },
3154       /* Encrypted Payload Indicate */
3155       { &hf_homeplug_av_cm_enc_pld_ind,
3156         { "Encrypted Payload Indicate", "homeplug_av.cm_enc_pld_ind",
3157           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3158       },
3159       { &hf_homeplug_av_cm_enc_pld_ind_avlns,
3160         { "AVLN status", "homeplug_av.cm_enc_pld_ind.avlns",
3161           FT_UINT8, BASE_HEX, VALS(homeplug_av_avln_status_vals), HOMEPLUG_AV_AVLN_STATUS_MASK, "Reserved", HFILL }
3162       },
3163       { &hf_homeplug_av_cm_enc_pld_ind_iv,
3164         { "Initialization vector", "homeplug_av.cm_enc_pld_ind.iv",
3165           FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }
3166       },
3167       { &hf_homeplug_av_cm_enc_pld_ind_uuid,
3168         { "UUID", "homeplug_av.cm_enc_pld_ind.uuid",
3169           FT_GUID, BASE_NONE, NULL, 0x00, NULL, HFILL }
3170       },
3171       { &hf_homeplug_av_cm_enc_pld_ind_len,
3172         { "Length", "homeplug_av.cm_enc_pld_ind.len",
3173           FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
3174       },
3175       { &hf_homeplug_av_cm_enc_pld_ind_pld,
3176         { "Encrypted payload", "homeplug_av.cm_enc_pld_ind.pld",
3177           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3178       },
3179       /* Encrypted Payload Response */
3180       { &hf_homeplug_av_cm_enc_pld_rsp,
3181         { "Encrypted Payload Response", "homeplug_av.cm_enc_pld_rsp",
3182           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3183       },
3184       { &hf_homeplug_av_cm_enc_pld_rsp_result,
3185         { "Result", "homeplug_av.cm_enc_pld_rsp.result",
3186           FT_UINT8, BASE_HEX, VALS(homeplug_av_generic_status_vals), HOMEPLUG_AV_GEN_STATUS_MASK, NULL, HFILL }
3187       },
3188       /* Set Key Request */
3189       { &hf_homeplug_av_cm_set_key_req,
3190         { "Set Key Request", "homeplug_av.cm_set_key_req",
3191           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3192       },
3193       { &hf_homeplug_av_cm_set_key_req_nw_key,
3194         { "New Key", "homeplug_av.cm_set_key_req.nw_key",
3195           FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }
3196       },
3197       /* Set Key Confirmation */
3198       { &hf_homeplug_av_cm_set_key_cnf,
3199         { "Set Key Confirmation", "homeplug_av.cm_set_key_cnf",
3200           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3201       },
3202       { &hf_homeplug_av_cm_set_key_cnf_result,
3203         { "Result", "homeplug_av.cm_set_key_cnf.result",
3204           FT_UINT8, BASE_HEX, VALS(homeplug_av_generic_status_vals), HOMEPLUG_AV_GEN_STATUS_MASK, NULL, HFILL }
3205       },
3206       /* Get Key Request */
3207       { &hf_homeplug_av_cm_get_key_req,
3208         { "Get Key request", "homeplug_av.cm_get_key_req",
3209           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3210       },
3211       { &hf_homeplug_av_cm_get_key_req_type,
3212         { "Request type", "homeplug_av.cm_get_key_req.type",
3213           FT_UINT8, BASE_HEX, VALS(homeplug_av_req_type_vals), HOMEPLUG_AV_REQ_TYPE_MASK, "Reserved", HFILL }
3214       },
3215       { &hf_homeplug_av_cm_get_key_req_has_key,
3216         { "Hash key", "homeplug_av.cm_get_key_req.hash_key",
3217           FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }
3218       },
3219       /* Get Key Confirmation */
3220       { &hf_homeplug_av_cm_get_key_cnf,
3221         { "Get Key Confirmation", "homeplug_av.cm_get_key_cnf",
3222           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3223       },
3224       { &hf_homeplug_av_cm_get_key_cnf_result,
3225         { "Result", "homeplug_av.cm_get_key_cnf.result",
3226           FT_UINT8, BASE_HEX, VALS(homeplug_av_key_result_vals), HOMEPLUG_AV_KEY_RESULT_MASK, NULL, HFILL }
3227       },
3228       { &hf_homeplug_av_cm_get_key_cnf_rtype,
3229         { "Requested key type", "homeplug_av.cm_get_key_cnf.rtype",
3230           FT_UINT8, BASE_HEX, VALS(homeplug_av_key_type_vals), HOMEPLUG_AV_KEY_TYPE_MASK, NULL, HFILL }
3231       },
3232       { &hf_homeplug_av_cm_get_key_cnf_key,
3233         { "Encryption/Hash key", "homeplug_av.cm_get_key_cnf.key",
3234           FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }
3235       },
3236       /* Get Bridge Informations Confirmation */
3237       { &hf_homeplug_av_brg_infos_cnf,
3238         { "Get Bridge Informations Confirmation", "homeplug_av.brg_infos_cnf",
3239           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3240       },
3241       { &hf_homeplug_av_brg_infos_cnf_brd,
3242         { "Bridging", "homeplug_av.brg_infos_cnf.brd",
3243           FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }
3244       },
3245       { &hf_homeplug_av_brg_infos_cnf_btei,
3246         { "Bridge Terminal Equipement Identifier", "homeplug_av.brg_infos_cnf.btei",
3247           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3248       },
3249       { &hf_homeplug_av_brg_infos_cnf_num_stas,
3250         { "Number of stations", "homeplug_av.brg_infos_cnf.num_stas",
3251           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3252       },
3253       { &hf_homeplug_av_brg_infos_cnf_mac,
3254         { "Bridged Destination Address", "homeplug_av.brg_infos_cnf.mac",
3255           FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL }
3256       },
3257       /* Get Network Informations Confirmation */
3258       { &hf_homeplug_av_cm_nw_infos_cnf,
3259         { "Get Network Informations Confirmation", "homeplug_av.nw_infos_cnf",
3260           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3261       },
3262       /* Get Network Statistics Confirmation */
3263       { &hf_homeplug_av_nw_stats_cnf,
3264         { "Get Network Statistics Confirmation", "homeplug_av.nw_stats_cnf",
3265           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3266       },
3267       /* Vendor Specific */
3268       { &hf_homeplug_av_vendor,
3269         { "Vendor MME", "homeplug_av.vendor",
3270           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3271       },
3272       { &hf_homeplug_av_vendor_oui,
3273         { "OUI", "homeplug_av.vendor.oui",
3274           FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }
3275       },
3276       /* Get Device/SW Version */
3277       { &hf_homeplug_av_get_sw_cnf,
3278         { "Get Device/SW Version", "homeplug_av.get_sw_cnf",
3279           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3280       },
3281       { &hf_homeplug_av_get_sw_cnf_status,
3282         { "Status", "homeplug_av.get_sw_cnf.status",
3283           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3284       },
3285       { &hf_homeplug_av_get_sw_cnf_dev_id,
3286         { "Device ID", "homeplug_av.get_sw_cnf.dev_id",
3287           FT_UINT8, BASE_HEX, VALS(homeplug_av_dev_id_vals), HOMEPLUG_AV_DEV_ID_MASK, NULL, HFILL }
3288       },
3289       { &hf_homeplug_av_get_sw_cnf_ver_len,
3290         { "Version length", "homeplug_av.get_sw_cnf.ver_len",
3291           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3292       },
3293       { &hf_homeplug_av_get_sw_cnf_ver_str,
3294         { "Version", "homeplug_av.get_sw_cnf.ver_str",
3295           FT_STRING, BASE_NONE, NULL, 0x00, NULL, HFILL }
3296       },
3297       { &hf_homeplug_av_get_sw_cnf_upg,
3298         { "Upgradable", "homeplug_av.get_sw_cnf.upg",
3299           FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }
3300       },
3301       /* Write MAC Memory Request */
3302       { &hf_homeplug_av_wr_mem_req,
3303         { "Write MAC Memory Request", "homeplug_av.wr_mem_req",
3304           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3305       },
3306       { &hf_homeplug_av_mem_addr,
3307         { "Address", "homeplug_av.mem.addr",
3308           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3309       },
3310       { &hf_homeplug_av_mem_len_32bits,
3311         { "Length", "homeplug_av.mem.len_32bits",
3312           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3313       },
3314       /* Write MAC Memory Confirmation */
3315       { &hf_homeplug_av_wr_mem_cnf,
3316         { "Write MAC Memory Confirmation", "homeplug_av.wr_mem_cnf",
3317           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3318       },
3319       /* Read MAC Memory Request */
3320       { &hf_homeplug_av_rd_mem_req,
3321         { "Read MAC Memory Request", "homeplug_av.rd_mem_req",
3322           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3323       },
3324       { &hf_homeplug_av_rd_mem_cnf,
3325         { "Read MAC Memory Confirmation", "homeplug_av.rd_mem_cnf",
3326           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3327       },
3328       /* Start MAC Request */
3329       { &hf_homeplug_av_st_mac_req,
3330         { "Start MAC Request", "homeplug_av.st_mac_req",
3331           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3332       },
3333       { &hf_homeplug_av_st_mac_req_img_load,
3334         { "Image Load Starting Address", "homeplug_av.st_mac_req.img_load",
3335           FT_UINT32, BASE_HEX, NULL, 0x00, "Unknown", HFILL }
3336       },
3337       { &hf_homeplug_av_st_mac_req_img_len,
3338         { "Image Length", "homeplug_av.st_mac_req.img_len",
3339           FT_UINT32, BASE_HEX, NULL, 0x00, "Unknown", HFILL }
3340       },
3341       { &hf_homeplug_av_st_mac_req_img_chksum,
3342         { "Image Checksum", "homeplug_av.st_mac_req.img_chksum",
3343           FT_UINT32, BASE_HEX, NULL, 0x00, "Unknown", HFILL }
3344       },
3345       { &hf_homeplug_av_st_mac_req_img_start,
3346         { "Image Starting Address", "homeplug_av.st_mac_req.img_start",
3347           FT_UINT32, BASE_HEX, NULL, 0x00, "Unknown", HFILL }
3348       },
3349       /* Start MAC Confirmation */
3350       { &hf_homeplug_av_st_mac_cnf,
3351         { "Start MAC Confirmation", "homeplug_av.st_mac_cnf",
3352           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3353       },
3354       { &hf_homeplug_av_st_mac_cnf_status,
3355         { "Module ID", "homeplug_av.st_mac_cnf.status",
3356           FT_UINT8, BASE_HEX, VALS(homeplug_av_st_mac_status_vals), 0x00, "Unknown", HFILL }
3357       },
3358       /* Get NVM Parameters Confirmation */
3359       { &hf_homeplug_av_get_nvm_cnf,
3360         { "Get NVM Parameters Confirmation", "homeplug_av.get_nvm_cnf",
3361           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3362       },
3363       { &hf_homeplug_av_get_nvm_cnf_status,
3364         { "Status", "homeplug_av.get_nvm_cnf.status",
3365           FT_UINT8, BASE_HEX, VALS(homeplug_av_get_nvm_status_vals), 0x00, "Unknown", HFILL }
3366       },
3367       { &hf_homeplug_av_get_nvm_cnf_nvm_type,
3368         { "NVM Type", "homeplug_av.get_nvm_cnf.nvm_type",
3369           FT_UINT32, BASE_HEX, NULL, 0x00, "Unknown", HFILL }
3370       },
3371       { &hf_homeplug_av_get_nvm_cnf_nvm_page,
3372         { "NVM Page Size", "homeplug_av.get_nvm_cnf.nvm_page",
3373           FT_UINT32, BASE_HEX, NULL, 0x00, "Unknown", HFILL }
3374       },
3375       { &hf_homeplug_av_get_nvm_cnf_nvm_block,
3376         { "NVM Block Size", "homeplug_av.get_nvm_cnf.nvm_block",
3377           FT_UINT32, BASE_HEX, NULL, 0x00, "Unknown", HFILL }
3378       },
3379       { &hf_homeplug_av_get_nvm_cnf_nvm_size,
3380         { "NVM Memory Size", "homeplug_av.get_nvm_cnf.nvm_size",
3381           FT_UINT32, BASE_HEX, NULL, 0x00, "Unknown", HFILL }
3382       },
3383       /* Reset Device Confirmation */
3384       { &hf_homeplug_av_rs_dev_cnf,
3385         { "Reset Device Confirmation", "homeplug_av.rs_dev_cnf",
3386           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3387       },
3388       { &hf_homeplug_av_rs_dev_cnf_status,
3389         { "Status", "homeplug_av.rs_dev_cnf.status",
3390           FT_UINT8, BASE_HEX, VALS(homeplug_av_rs_dev_status_vals), 0x00, "Unknown", HFILL }
3391       },
3392       /* Shared memory related fields */
3393       { &hf_homeplug_av_mem_len_16bits,
3394         { "Length", "homeplug_av.mem.len_16bits",
3395           FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL }
3396       },
3397       { &hf_homeplug_av_mem_offset,
3398         { "Offset", "homeplug_av.mem.offset",
3399           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3400       },
3401       { &hf_homeplug_av_mem_checksum,
3402         { "Checksum", "homeplug_av.mem.checksum",
3403           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3404       },
3405       { &hf_homeplug_av_mem_data,
3406         { "Data", "homeplug_av.mem.data",
3407           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3408       },
3409       { &hf_homeplug_av_mem_status,
3410         { "Status", "homeplug_av.mem.status",
3411           FT_UINT8, BASE_HEX, VALS(homeplug_av_wr_rd_mem_status_vals), 0x00, "Unknown", HFILL }
3412       },
3413       /* Write Module Data Request */
3414       { &hf_homeplug_av_wr_mod_req,
3415         { "Write Module Data Request", "homeplug_av.wr_mod_req",
3416           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3417       },
3418       /* Write Module Data Confirmation */
3419       { &hf_homeplug_av_wr_mod_cnf,
3420         { "Write Module Data Confirmation", "homeplug_av.wr_mod_cnf",
3421           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3422       },
3423       { &hf_homeplug_av_wr_mod_cnf_status,
3424         { "Status", "homeplug_av.wr_mod_cnf.status",
3425           FT_UINT8, BASE_HEX, VALS(homeplug_av_wr_rd_mod_cnf_status_vals), 0x00, "Unknown", HFILL }
3426       },
3427       /* Write Module Data Indicate */
3428       { &hf_homeplug_av_wr_mod_ind,
3429         { "Write Module Data Indicate", "homeplug_av.wr_mod_ind",
3430           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3431       },
3432       { &hf_homeplug_av_wr_mod_ind_status,
3433         { "Status", "homeplug_av.wr_mod_ind.status",
3434           FT_UINT8, BASE_HEX, VALS(homeplug_av_wr_mod_ind_status_vals), 0x00, "Unknown", HFILL }
3435       },
3436       /* Read Module Data Request */
3437       { &hf_homeplug_av_rd_mod_req,
3438         { "Read Module Data Request", "homeplug_av.rd_mod_req",
3439           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3440       },
3441       /* Read Module Data Confirmation */
3442       { &hf_homeplug_av_rd_mod_cnf,
3443         { "Read Module Data Confirmation", "homeplug_av.rd_mod_cnf",
3444           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3445       },
3446       { &hf_homeplug_av_rd_mod_cnf_status,
3447         { "Status", "homeplug_av.rd_mod_cnf.status",
3448           FT_UINT8, BASE_HEX, VALS(homeplug_av_wr_rd_mod_cnf_status_vals), 0x00, "Unknown", HFILL }
3449       },
3450       { &hf_homeplug_av_mac_module_id,
3451         { "Module ID", "homeplug_av.module_id",
3452           FT_UINT8, BASE_HEX, VALS(homeplug_av_mac_module_id_vals), 0x00, "Unknown", HFILL }
3453       },
3454       /* Write Module Data to NVM Request */
3455       { &hf_homeplug_av_mod_nvm_req,
3456         { "Write Module Data to NVM Request", "homeplug_av.mod_nvm_req",
3457           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3458       },
3459       /* Write Module Data to NVM Confirmation */
3460       { &hf_homeplug_av_mod_nvm_cnf,
3461         { "Write Module Data to NVM Confirmation", "homeplug_av.mod_nvm_cnf",
3462           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3463       },
3464       { &hf_homeplug_av_mod_nvm_cnf_status,
3465         { "Status", "homeplug_av.mod_nvm_cnf.status",
3466           FT_UINT8, BASE_HEX, VALS(homeplug_av_mod_nvm_status_vals), 0x00, "Unknown", HFILL }
3467       },
3468       /* Get Watchdog Report Request */
3469       { &hf_homeplug_av_wd_rpt_req,
3470         { "Get Watchdog Report Request", "homeplug_av.wd_rpt_req",
3471           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3472       },
3473       { &hf_homeplug_av_wd_rpt_req_session_id,
3474         { "Session ID", "homeplug_av.wd_rpt_req.session_id",
3475           FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
3476       },
3477       { &hf_homeplug_av_wd_rpt_req_clr,
3478         { "Clear flag", "homeplug_av.wd_rpt_req.clr",
3479           FT_UINT8, BASE_HEX, VALS(homeplug_av_rpt_clr_vals), HOMEPLUG_AV_RPT_CLR_MASK, "Unknown", HFILL }
3480       },
3481       /* Get Watchdog Report Indicate */
3482       { &hf_homeplug_av_wd_rpt_ind,
3483         { "Get Watchdog Report Indicate", "homeplug_av.wd_rpt_ind",
3484           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3485       },
3486       { &hf_homeplug_av_wd_rpt_ind_status,
3487         { "Status", "homeplug_av.wd_rpt_ind.status",
3488           FT_UINT8, BASE_HEX, VALS(homeplug_av_generic_status_vals), HOMEPLUG_AV_GEN_STATUS_MASK, "Unknown", HFILL }
3489       },
3490       { &hf_homeplug_av_wd_rpt_ind_session_id,
3491         { "Session ID", "homeplug_av.wd_rpt_ind.session_id",
3492           FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
3493       },
3494       { &hf_homeplug_av_wd_rpt_ind_num_parts,
3495         { "Number of parts", "homeplug_av.wd_rpt_ind.num_parts",
3496           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3497       },
3498       { &hf_homeplug_av_wd_rpt_ind_curr_part,
3499         { "Current Part", "homeplug_av.wd_rpt_ind.curr_part",
3500           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3501       },
3502       { &hf_homeplug_av_wd_rpt_ind_rdata_len,
3503         { "Report Data Length", "homeplug_av.wd_rpt_ind.rdata_len",
3504           FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
3505       },
3506       { &hf_homeplug_av_wd_rpt_ind_rdata_ofs,
3507         { "Report Data Offset", "homeplug_av.wd_rpt_ind.rdata_offset",
3508           FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL }
3509       },
3510       { &hf_homeplug_av_wd_rpt_ind_rdata,
3511         { "Report Data", "homeplug_av.wd_rpt_ind.rdata",
3512           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3513       },
3514       /* Link Statistics Request */
3515       { &hf_homeplug_av_lnk_stats_req,
3516         { "Link Statistics Request", "homeplug_av.lnk_stats_req",
3517           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3518       },
3519       { &hf_homeplug_av_lnk_stats_req_mcontrol,
3520         { "Control", "homeplug_av.lnk_stats_req.mcontrol",
3521           FT_UINT8, BASE_HEX, VALS(homeplug_av_lnk_stats_mctrl_vals), HOMEPLUG_AV_LNK_STATS_MCTL_MASK, "Unknown", HFILL }
3522       },
3523       { &hf_homeplug_av_lnk_stats_req_dir,
3524         { "Direction", "homeplug_av.lnk_stats_req.dir",
3525           FT_UINT8, BASE_HEX, VALS(homeplug_av_lnk_stats_dir_vals), HOMEPLUG_AV_LNK_STATS_DIR_MASK, "Unknown", HFILL }
3526       },
3527       { &hf_homeplug_av_lnk_stats_req_lid,
3528         { "Link ID", "homeplug_av.lnk_stats_req.lid",
3529           FT_UINT8, BASE_HEX, VALS(homeplug_av_lnk_stats_lid_vals), 0x00, "Unknown", HFILL }
3530       },
3531       { &hf_homeplug_av_lnk_stats_req_macaddr,
3532         { "Peer Node", "homeplug_av.lnk_stats_req.macaddr",
3533           FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL }
3534       },
3535       /* Link Statistics Confirmation */
3536       { &hf_homeplug_av_lnk_stats_cnf,
3537         { "Link Statistics Confirmation", "homeplug_av.lnk_stats_cnf",
3538           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3539       },
3540       { &hf_homeplug_av_lnk_stats_cnf_status,
3541         { "Status", "homeplug_av.lnk_stats_cnf.status",
3542           FT_UINT8, BASE_HEX, VALS(homeplug_av_lnk_status_vals), 0x00, "Unknown", HFILL }
3543       },
3544       { &hf_homeplug_av_lnk_stats_cnf_dir,
3545         { "Direction", "homeplug_av.lnk_stats_cnf.dir",
3546           FT_UINT8, BASE_HEX, VALS(homeplug_av_lnk_stats_dir_vals), HOMEPLUG_AV_LNK_STATS_DIR_MASK, "Unknown", HFILL }
3547       },
3548       { &hf_homeplug_av_lnk_stats_cnf_lid,
3549         { "Link ID", "homeplug_av.lnk_stats_cnf.lid",
3550           FT_UINT8, BASE_HEX, VALS(homeplug_av_lnk_stats_lid_vals), 0x00, "Unknown", HFILL }
3551       },
3552       { &hf_homeplug_av_lnk_stats_cnf_tei,
3553         { "TEI", "homeplug_av.lnk_stats_cnf.tei",
3554           FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL }
3555       },
3556       { &hf_homeplug_av_lnk_stats_cnf_lstats,
3557         { "Link statistics", "homeplug_av.lnk_stats_cnf.lstats",
3558           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3559       },
3560       /* Link statistics members */
3561       { &hf_homeplug_av_lnk_stats_tx,
3562         { "Tx link statistics", "homeplug_av.lnk_stats.tx",
3563           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3564       },
3565       { &hf_homeplug_av_lnk_stats_tx_mpdu_ack,
3566         { "Number of MPDUs Transmitted and Acknowledged", "homeplug_av.lnk_stats.tx.mpdu_ack",
3567           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3568       },
3569       { &hf_homeplug_av_lnk_stats_tx_mpdu_col,
3570         { "Number of MPDUs Transmitted and Collided", "homeplug_av.lnk_stats.tx.mpdu_col",
3571           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3572       },
3573       { &hf_homeplug_av_lnk_stats_tx_mpdu_fai,
3574         { "Number of MPDUs Transmitted and Failed", "homeplug_av.lnk_stats.tx.mpdu_fail",
3575           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3576       },
3577       { &hf_homeplug_av_lnk_stats_tx_pbs_pass,
3578         { "Number of PB Transmitted Successfully", "homeplug_av.lnk_stats.tx.pbs_pass",
3579           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3580       },
3581       { &hf_homeplug_av_lnk_stats_tx_pbs_fail,
3582         { "Number of PB Transmitted Unsuccessfully", "homeplug_av.lnk_stats.tx.pbs_fail",
3583           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3584       },
3585       { &hf_homeplug_av_lnk_stats_rx,
3586         { "Rx link statistics", "homeplug_av.lnk_stats.rx",
3587           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3588       },
3589       { &hf_homeplug_av_lnk_stats_rx_mpdu_ack,
3590         { "Number of MPDUs Received and Acknowledged", "homeplug_av.lnk_stats.rx.mdpu_ack",
3591           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3592       },
3593       { &hf_homeplug_av_lnk_stats_rx_mpdu_fai,
3594         { "Number of MPDUs Received and Failed", "homeplug_av.lnk_stats.rx.mdpu_fail",
3595           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3596       },
3597       { &hf_homeplug_av_lnk_stats_rx_pbs_pass,
3598         { "Number of PB Received Successfully", "homeplug_av.lnk_stats.rx.pbs_pass",
3599           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3600       },
3601       { &hf_homeplug_av_lnk_stats_rx_pbs_fail,
3602         { "Number of PB Received Unsuccessfully", "homeplug_av.lnk_stats.rx.pbs_fail",
3603           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3604       },
3605       { &hf_homeplug_av_lnk_stats_rx_tb_pass,
3606         { "Sum of Turbo Bit Error over successfully recevied PBs", "homeplug_av.lnk_stats.rx.tb_pass",
3607           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3608       },
3609       { &hf_homeplug_av_lnk_stats_rx_tb_fail,
3610         { "Sum of Turbo Bit Error over unsuccessfully recevied PBs", "homeplug_av.lnk_stats.rx.tb_fail",
3611           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3612       },
3613       { &hf_homeplug_av_lnk_stats_rx_num_int,
3614         { "Number of Tone Map Intervals", "homeplug_av.lnk_stats.rx.num_int",
3615           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3616       },
3617       { &hf_homeplug_av_rx_inv_stats,
3618         { "Rx Interval Statistics", "homeplug_av.lnk_stats.rx.inv",
3619           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3620       },
3621       { &hf_homeplug_av_rx_inv_phy_rate,
3622         { "Rx Phy Rate for Tone Map Interval 0", "homeplug_av.lnk_stats.rx.inv.phy_rate",
3623           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3624       },
3625       { &hf_homeplug_av_rx_inv_pbs_pass,
3626         { "Number of PB Received Successfully", "homeplug_av.lnk_stats.rx.inv.pbs_pass",
3627           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3628       },
3629       { &hf_homeplug_av_rx_inv_pbs_fail,
3630         { "Number of PB Received Unsuccessfully", "homeplug_av.lnk_stats.rx.inv.pbs_fail",
3631           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3632       },
3633       { &hf_homeplug_av_rx_inv_tb_pass,
3634         { "Sum of the Turbo Bit Error over all PBs received successfully", "homeplug_av.lnk_stats.rx.inv.tb_pass",
3635           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3636       },
3637       { &hf_homeplug_av_rx_inv_tb_fail,
3638         { "Sum of the Turbo Bit Error over all PBs received unsuccessfully", "homeplug_av.lnk_stats.rx.inv.tb_fail",
3639           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3640       },
3641       /* Sniffer Request */
3642       { &hf_homeplug_av_sniffer_req,
3643         { "Sniffer Request", "homeplug_av.sniffer_req",
3644           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3645       },
3646       { &hf_homeplug_av_sniffer_req_ctrl,
3647         { "Sniffer Control", "homeplug_av.sniffer_req.ctrl",
3648           FT_UINT8, BASE_HEX, VALS(homeplug_av_sniffer_ctrl_vals), HOMEPLUG_AV_SNIFFER_CTRL_MASK, NULL, HFILL }
3649       },
3650       /* Sniffer Confirmation */
3651       { &hf_homeplug_av_sniffer_cnf,
3652         { "Sniffer Confirmation" , "homeplug_av.sniffer_cnf",
3653           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3654       },
3655       { &hf_homeplug_av_sniffer_cnf_status,
3656         { "Status", "homeplug_av.sniffer_cnf.status",
3657           FT_UINT8, BASE_HEX, VALS(homeplug_av_sniffer_status_vals), 0x00, NULL, HFILL }
3658       },
3659       { &hf_homeplug_av_sniffer_cnf_state,
3660         { "State", "homeplug_av.sniffer_cnf.state",
3661           FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }
3662       },
3663       { &hf_homeplug_av_sniffer_cnf_da,
3664         { "Destination address", "homeplug_av.sniffer_cnf.da",
3665           FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL }
3666       },
3667       /* Sniffer Indicate */
3668       { &hf_homeplug_av_sniffer_ind,
3669         { "Sniffer Indicate", "homeplug_av.sniffer_ind",
3670           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3671       },
3672       { &hf_homeplug_av_sniffer_ind_type,
3673         { "Sniffer Type", "homeplug_av.sniffer_ind.type",
3674           FT_UINT8, BASE_HEX, VALS(homeplug_av_sniffer_type_vals), 0x00, "Unknown", HFILL }
3675       },
3676       { &hf_homeplug_av_sniffer_ind_data,
3677         { "Sniffer Data", "homeplug_av.sniffer_ind.data",
3678           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3679       },
3680       { &hf_homeplug_av_sniffer_data_dir,
3681         { "Direction", "homeplug_av.sniffer_ind.data.dir",
3682           FT_UINT8, BASE_HEX, VALS(homeplug_av_lnk_stats_dir_vals), HOMEPLUG_AV_LNK_STATS_DIR_MASK, NULL, HFILL }
3683       },
3684       { &hf_homeplug_av_sniffer_data_systime,
3685         { "System time", "homeplug_av.sniffer_ind.data.systime",
3686           FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }
3687       },
3688       { &hf_homeplug_av_sniffer_data_bc_time,
3689         { "Beacon time", "homeplug_av.sniffer_ind.data.bc_time",
3690           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
3691       },
3692       /* Network Info Confirmation */
3693       { &hf_homeplug_av_nw_info_cnf,
3694         { "Network Info Confirmation", "homeplug_av.nw_info_cnf",
3695           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3696       },
3697       { &hf_homeplug_av_nw_info_net_info,
3698         { "Networks informations", "homeplug_av.nw_info_cnf.net_info",
3699           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3700       },
3701       { &hf_homeplug_av_nw_info_num_avlns,
3702         { "Number of AV Logical Networks", "homeplug_av.nw_info.num_avlns",
3703           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3704       },
3705       { &hf_homeplug_av_nw_info_nid,
3706         { "Network ID", "homeplug_av.nw_info.nid",
3707           FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }
3708       },
3709       { &hf_homeplug_av_nw_info_snid,
3710         { "Short Network ID", "homeplug_av.nw_info.snid",
3711           FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL }
3712       },
3713       { &hf_homeplug_av_nw_info_tei,
3714         { "Terminal Equipement Identifer", "homeplug_av.nw_info.tei",
3715           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3716       },
3717       { &hf_homeplug_av_nw_info_sta_role,
3718         { "Station Role", "homeplug_av.nw_info.sta_role",
3719           FT_UINT8, BASE_HEX, VALS(homeplug_av_nw_info_role_vals), HOMEPLUG_AV_NW_INFO_ROLE_MASK, "Reserved", HFILL }
3720       },
3721       { &hf_homeplug_av_nw_info_cco_mac,
3722         { "CCo MAC Address", "homeplug_av.nw_info_cnf.cco_mac",
3723           FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL }
3724       },
3725       { &hf_homeplug_av_nw_info_cco_tei,
3726         { "CCo Terminal Equipement Identifier", "homeplug_av.nw_info_cnf.cco_tei",
3727           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3728       },
3729       { &hf_homeplug_av_nw_info_num_stas,
3730         { "Number of AV Stations", "homeplug_av.nw_info_cnf.num_stas",
3731           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3732       },
3733       { &hf_homeplug_av_nw_info_access,
3734         { "Access network", "homeplug_av.nw_info_cnf.access",
3735           FT_UINT8, BASE_HEX, VALS(homeplug_nw_info_access_vals), HOMEPLUG_AV_NW_INFO_NID_MASK, "Reserved", HFILL }
3736       },
3737       { &hf_homeplug_av_nw_info_num_coord,
3738         { "Number of neighbor networks coordinating", "homeplug_av.nw_info_cnf.num_coord",
3739           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3740       },
3741       /* Network Info per station */
3742       { &hf_homeplug_av_nw_info_sta_info,
3743         { "Stations Informations", "homeplug_av.nw_info_cnf.sta_info",
3744           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3745       },
3746       { &hf_homeplug_av_nw_info_sta_da,
3747         { "Station MAC Address", "homeplug_av.nw_info_cnf.sta_info.da",
3748           FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL }
3749       },
3750       { &hf_homeplug_av_nw_info_sta_tei,
3751         { "Station Terminal Equipement Identifier", "homeplug_av.nw_info_cnf.sta_indo.tei",
3752           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3753       },
3754       { &hf_homeplug_av_nw_info_sta_bda,
3755         { "MAC Address of first Node Bridged by Station", "homeplug_av.nw_info_cnf.sta_indo.bda",
3756           FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL }
3757       },
3758       { &hf_homeplug_av_nw_info_sta_phy_dr_tx,
3759         { "Average PHY Tx data Rate (Mbits/sec)", "homeplug_av.nw_info_cnf.sta_indo.phy_dr_tx",
3760           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3761       },
3762       { &hf_homeplug_av_nw_info_sta_phy_dr_rx,
3763         { "Average PHY Rx data Rate (Mbits/sec)", "homeplug_av.nw_info_cnf.sta_indo.phy_dr_rx",
3764           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3765       },
3766       /* Check Points Request */
3767       { &hf_homeplug_av_cp_rpt_req,
3768         { "Check Points Request", "homeplug_av.cp_rpt_req",
3769           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3770       },
3771       { &hf_homeplug_av_cp_rpt_req_session_id,
3772         { "Session ID", "homeplug_av.cp_rpt_req.session_id",
3773           FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
3774       },
3775       { &hf_homeplug_av_cp_rpt_req_clr,
3776         { "Clear flag", "homeplug_av.cp_rpt_req.clr",
3777           FT_UINT8, BASE_HEX, VALS(homeplug_av_rpt_clr_vals), HOMEPLUG_AV_RPT_CLR_MASK, "Unknown", HFILL }
3778       },
3779       /* Check Points Confirmation */
3780       { &hf_homeplug_av_cp_rpt_ind,
3781         { "Check Points Confirmation", "homeplug_av.cp_rpt_ind",
3782           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3783       },
3784       { &hf_homeplug_av_cp_rpt_ind_status,
3785         { "Status", "homeplug_av.cp_rpt_ind.status",
3786           FT_UINT8, BASE_HEX, VALS(homeplug_av_generic_status_vals), HOMEPLUG_AV_GEN_STATUS_MASK, "Unknown", HFILL }
3787       },
3788       { &hf_homeplug_av_cp_rpt_ind_major_ver,
3789         { "Major version", "homeplug_av.cp_rpt_ind.major_ver",
3790           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3791       },
3792       { &hf_homeplug_av_cp_rpt_ind_minor_ver,
3793         { "Minor version", "homeplug_av.cp_rpt_ind.minor_ver",
3794           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3795       },
3796       { &hf_homeplug_av_cp_rpt_ind_session_id,
3797         { "Session ID", "homeplug_av.cp_rpt_ind.session_id",
3798           FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
3799       },
3800       { &hf_homeplug_av_cp_rpt_ind_total_size,
3801         { "Total size", "homeplug_av.cp_rpt_ind.total_size",
3802           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
3803       },
3804       { &hf_homeplug_av_cp_rpt_ind_blk_offset,
3805         { "Offset", "homeplug_av.cp_rpt_ind.blk_offset",
3806           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
3807       },
3808       { &hf_homeplug_av_cp_rpt_ind_byte_index,
3809         { "Byte Index", "homeplug_av.cp_rpt_ind.byte_index",
3810           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
3811       },
3812       { &hf_homeplug_av_cp_rpt_ind_num_parts,
3813         { "Number of parts", "homeplug_av.cp_rpt_ind.num_parts",
3814           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3815       },
3816       { &hf_homeplug_av_cp_rpt_ind_curr_part,
3817         { "Current part", "homeplug_av.cp_rpt_ind.curr_part",
3818           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3819       },
3820       { &hf_homeplug_av_cp_rpt_ind_data_len,
3821         { "Data length", "homeplug_av.cp_rpt_ind.data_len",
3822           FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
3823       },
3824       { &hf_homeplug_av_cp_rpt_ind_data_ofs,
3825         { "Data offset", "homeplug_av.cp_rpt_ind.data_ofs",
3826           FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL }
3827       },
3828       { &hf_homeplug_av_cp_rpt_ind_data,
3829         { "Report Data", "homeplug_av.cp_rpt_ind.data",
3830           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3831       },
3832       /* Loopback Request */
3833       { &hf_homeplug_av_fr_lbk_req,
3834         { "Loopback Request", "homeplug_av.fr_lbk.req",
3835           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3836       },
3837       { &hf_homeplug_av_fr_lbk_duration,
3838         { "Duration", "homeplug_av.lbk.duration",
3839           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3840       },
3841       { &hf_homeplug_av_fr_lbk_len,
3842         { "Length", "homeplug_av.lbk.len",
3843           FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
3844       },
3845       { &hf_homeplug_av_fr_lbk_req_data,
3846         { "Data", "homeplug_av.fr_lbj_req.data",
3847           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3848       },
3849       /* Loopback Confirmation */
3850       { &hf_homeplug_av_fr_lbk_cnf,
3851         { "Loopback Confirmation", "homeplug_av.fr_lbk_cnf",
3852           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3853       },
3854       { &hf_homeplug_av_fr_lbk_cnf_status,
3855         { "Status", "homeplug_av.fr_lbk_cnf.status",
3856           FT_UINT8, BASE_HEX, VALS(homeplug_av_generic_status_vals), HOMEPLUG_AV_GEN_STATUS_MASK, "Unknown", HFILL }
3857       },
3858       { &hf_homeplug_av_lbk_stat_cnf,
3859         { "Loopback Status Confirmation", "homeplug_av.lnk_stat_cnf",
3860           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3861       },
3862       { &hf_homeplug_av_lbk_stat_cnf_status,
3863         { "Status", "homeplug_av.lnk_stat_cnf.status",
3864           FT_UINT8, BASE_HEX, VALS(homeplug_av_generic_status_vals), HOMEPLUG_AV_GEN_STATUS_MASK, NULL, HFILL }
3865       },
3866       { &hf_homeplug_av_lbk_stat_cnf_lbk_stat,
3867         { "Loopback Status", "homeplug_av.lnk_stat_cnf.lbk_stat",
3868           FT_UINT8, BASE_HEX, VALS(homeplug_av_lbk_status_vals), HOMEPLUG_AV_LBK_STATUS_MASK, NULL, HFILL }
3869       },
3870       /* Set Encryption Key Request */
3871       { &hf_homeplug_av_set_key_req,
3872         { "Set Encryption Key Request", "homeplug_av.set_key_req",
3873           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3874       },
3875       { &hf_homeplug_av_set_key_req_eks,
3876         { "EKS", "homeplug_av.set_key_req.eks",
3877           FT_UINT8, BASE_HEX, VALS(homeplug_av_set_key_peks_vals), 0x00, "Unknown", HFILL }
3878       },
3879       { &hf_homeplug_av_set_key_req_nmk,
3880         { "NMK", "homeplug_av.set_key_req.nmk",
3881           FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }
3882       },
3883       { &hf_homeplug_av_set_key_req_rda,
3884         { "Destination Address", "homeplug_av.set_key_req.rda",
3885           FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL }
3886       },
3887       { &hf_homeplug_av_set_key_req_dak,
3888         { "DAK", "homeplug_av.set_key_req.dak",
3889           FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }
3890       },
3891       /* Set Encryption Key Confirmation */
3892       { &hf_homeplug_av_set_key_cnf,
3893         { "Set Encryption Key Confirmation", "homeplug_av.set_key_cnf",
3894           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3895       },
3896       { &hf_homeplug_av_set_key_cnf_status,
3897         { "Status", "homeplug_av.set_key_cnf.status",
3898           FT_UINT8, BASE_HEX, VALS(homeplug_av_set_key_status_vals), 0x00, NULL, HFILL }
3899       },
3900       /* Get Manufacturer String Confirmation */
3901       { &hf_homeplug_av_mfg_string_cnf,
3902         { "Get Manufacturer String Confirmation", "homeplug_av.mfg_string_cnf",
3903           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3904       },
3905       { &hf_homeplug_av_mfg_string_cnf_status,
3906         { "Status", "homeplug_av.mfg_string_cnf.status",
3907           FT_UINT8, BASE_HEX, VALS(homeplug_av_generic_status_vals), HOMEPLUG_AV_GEN_STATUS_MASK, NULL, HFILL }
3908       },
3909       { &hf_homeplug_av_mfg_string_cnf_len,
3910         { "Length", "homeplug_av.mfg_string_cnf.len",
3911           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3912       },
3913       { &hf_homeplug_av_mfg_string_cnf_string,
3914         { "Manufacturing String", "homeplug_av.mfg_string_cnf.string",
3915           FT_STRING, BASE_NONE, NULL, 0x00, NULL, HFILL }
3916       },
3917       /* Read Configuration Block Confirmation */
3918       { &hf_homeplug_av_rd_cblock_cnf,
3919         { "Read Configuration Block Confirmation", "homeplug_av.rd_block_cnf",
3920           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3921       },
3922       { &hf_homeplug_av_rd_cblock_cnf_status,
3923         { "Status", "homeplug_av.rd_block_cnf.status",
3924           FT_UINT8, BASE_HEX, VALS(homeplug_av_cblock_status_vals), 0x00, NULL, HFILL }
3925       },
3926       { &hf_homeplug_av_rd_cblock_cnf_len,
3927         { "Length", "homeplug_av.rd_block_cnf.len",
3928           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
3929       },
3930       /* Configuration Block Header */
3931       { &hf_homeplug_av_cblock_hdr,
3932         { "Configuration Block Header", "homeplug_av.cblock_hdr",
3933           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3934       },
3935       { &hf_homeplug_av_cblock_hdr_ver,
3936         { "Header Version Number", "homeplug_av.cblock_hdr.ver",
3937           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3938       },
3939       { &hf_homeplug_av_cblock_img_rom_addr,
3940         { "Image address in NVM", "homeplug_av.cblock_hdr.img_rom_addr",
3941           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3942       },
3943       { &hf_homeplug_av_cblock_img_addr,
3944         { "Image address in SDRAM", "homeplug_av.cblock_hdr.img_addr",
3945           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3946       },
3947       { &hf_homeplug_av_cblock_img_len,
3948         { "Image length", "homeplug_av.cblock_hdr.img_len",
3949           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
3950       },
3951       { &hf_homeplug_av_cblock_img_chksum,
3952         { "Image Checksum", "homeplug_av.cblock_hdr.img_chksum",
3953           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3954       },
3955       { &hf_homeplug_av_cblock_entry_point,
3956         { "Entry Point", "homeplug_av.cblock_hdr.entry_point",
3957           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3958       },
3959       { &hf_homeplug_av_cblock_next_hdr,
3960         { "Address of next header in NVM", "homeplug_av.cblock_hdr.next_hdr",
3961           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3962       },
3963       { &hf_homeplug_av_cblock_hdr_chksum,
3964         { "Header checksum", "homeplug_av.cblock_hdr.hdr_chksum",
3965           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3966       },
3967       /* Configuration Block */
3968       { &hf_homeplug_av_cblock,
3969         { "Configuration Block", "homeplug_av.cblock",
3970           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
3971       },
3972       { &hf_homeplug_av_cblock_sdram_size,
3973         { "SDRAM size", "homeplug_av.cblock.sdram_size",
3974           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
3975       },
3976       { &hf_homeplug_av_cblock_sdram_conf,
3977         { "SDRAM Configuration Register", "homeplug_av.cblock.sdram_conf",
3978           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3979       },
3980       { &hf_homeplug_av_cblock_sdram_tim0,
3981         { "SDRAM Timing Register 0", "homeplug_av.cblock.sdram_tim0",
3982           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3983       },
3984       { &hf_homeplug_av_cblock_sdram_tim1,
3985         { "SDRAM Timing Register 1", "homeplug_av.cblock.sdram_tim1",
3986           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3987       },
3988       { &hf_homeplug_av_cblock_sdram_cntrl,
3989         { "SDRAM Control Register", "homeplug_av.cblock.sdram_cntrl",
3990           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3991       },
3992       { &hf_homeplug_av_cblock_sdram_refresh,
3993         { "SDRAM Refresh Register", "homeplug_av.cblock.sdram_refresh",
3994           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3995       },
3996       { &hf_homeplug_av_cblock_mac_clock,
3997         { "MAC Clock Register", "homeplug_av.cblock.mac_clock",
3998           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
3999       },
4000       /* Set SDRAM Configuration Request */
4001       { &hf_homeplug_av_set_sdram_req,
4002         { "Set SDRAM Configuration Request", "homeplug_av.set_sdram_req",
4003           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4004       },
4005       { &hf_homeplug_av_set_sdram_req_chksum,
4006         { "Checksum", "homeplug_av.set_sdram_req.chksum",
4007           FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL }
4008       },
4009       /* Set SDRAM Configuration Confirmation */
4010       { &hf_homeplug_av_set_sdram_cnf,
4011         { "Set SDRAM Configuration Confirmation", "homeplug_av.set_sdram_cnf",
4012           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4013       },
4014       { &hf_homeplug_av_set_sdram_cnf_status,
4015         { "Status", "homeplug_av.set_sdram_cnf.status",
4016           FT_UINT8, BASE_HEX, VALS(homeplug_av_cblock_status_vals), 0x00, "Unknown", HFILL }
4017       },
4018       /* Embedded Host Action Required Indicate */
4019       { &hf_homeplug_av_host_action_ind,
4020         { "Embedded Host Action Required Indicate", "homeplug_av.host_action_ind",
4021           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4022       },
4023       { &hf_homeplug_av_host_action_ind_act,
4024         { "Action required", "homeplug_av.host_action_ind.action",
4025           FT_UINT8, BASE_HEX, VALS(homeplug_av_host_action_vals), 0x00, NULL, HFILL }
4026       },
4027       /* Embedded Host Action Required Reponse */
4028       { &hf_homeplug_av_host_action_rsp,
4029         { "Embedded Host Action Required Response", "homeplug_av.host_action_rsp",
4030           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4031       },
4032       { &hf_homeplug_av_host_action_rsp_sts,
4033         { "Status", "homeplug_av.host_action_rsp.status",
4034           FT_UINT8, BASE_HEX, VALS(homeplug_av_generic_status_vals), HOMEPLUG_AV_GEN_STATUS_MASK, "Unknown", HFILL }
4035       },
4036       /* Get Device Attributes Request */
4037       { &hf_homeplug_av_op_attr_req,
4038         { "Get Device Attributes Request", "homeplug_av.op_attr_req",
4039           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4040       },
4041       { &hf_homeplug_av_op_attr_cookie,
4042         { "Cookie", "homeplug_av.op_attr.cookie",
4043           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
4044       },
4045       { &hf_homeplug_av_op_attr_rep_type,
4046         { "Report Type", "homeplug_av.op_attr.rep_type",
4047           FT_UINT8, BASE_HEX, VALS(homeplug_av_op_attr_report_vals), 0x00, NULL, HFILL }
4048       },
4049       /* Get Device Attributes Confirmation */
4050       { &hf_homeplug_av_op_attr_cnf,
4051         { "Get Device Attributes Confirmation", "homeplug_av.op_attr_cnf",
4052           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4053       },
4054       { &hf_homeplug_av_op_attr_cnf_status,
4055         { "Status", "homeplug_av.op_attr_cnf.status",
4056           FT_UINT16, BASE_HEX, VALS(homeplug_av_generic_status_vals), HOMEPLUG_AV_GEN_STATUS_MASK, NULL, HFILL }
4057       },
4058       { &hf_homeplug_av_op_attr_cnf_size,
4059         { "Size", "homeplug_av.op_attr_cnf.size",
4060           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
4061       },
4062       { &hf_homeplug_av_op_attr_cnf_data,
4063         { "Data", "homeplug_av.op_attr_cnf.data",
4064           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4065       },
4066       /* Device Attributes binary report */
4067       { &hf_homeplug_av_op_attr_data_hw,
4068         { "Hardware platform", "homeplug_av.op_attr_cnf.data.hw",
4069           FT_STRING, BASE_NONE, NULL, 0x00, NULL, HFILL }
4070       },
4071       { &hf_homeplug_av_op_attr_data_sw,
4072         { "Software platform", "homeplug_av.op_attr_cnf.data.sw",
4073           FT_STRING, BASE_NONE, NULL, 0x00, NULL, HFILL }
4074       },
4075       { &hf_homeplug_av_op_attr_data_sw_major,
4076         { "Major version", "homeplug_av.op_attr_cnf.data.sw_major",
4077           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
4078       },
4079       { &hf_homeplug_av_op_attr_data_sw_minor,
4080         { "Minor version", "homeplug_av.op_attr_cnf.data.sw_minor",
4081           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
4082       },
4083       { &hf_homeplug_av_op_attr_data_sw_sub,
4084         { "Software/PIB version", "homeplug_av.op_attr_cnf.data.sw_sub",
4085           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
4086       },
4087       { &hf_homeplug_av_op_attr_data_sw_num,
4088         { "Software build number", "homeplug_av.op_attr_cnf.data.sw_sub",
4089           FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
4090       },
4091       { &hf_homeplug_av_op_attr_data_sw_date,
4092         { "Build date", "homeplug_av.op_attr_cnf.data.sw_date",
4093           FT_STRING, BASE_NONE, NULL, 0x00, NULL, HFILL }
4094       },
4095       { &hf_homeplug_av_op_attr_data_sw_rel,
4096         { "Release type", "homeplug_av.op_attr_cnf.data.sw_rel",
4097           FT_STRING, BASE_NONE, NULL, 0x00, NULL, HFILL }
4098       },
4099       /* Get Ethernet PHY Settings Request */
4100       { &hf_homeplug_av_enet_phy_req,
4101         { "Get Ethernet PHY Settings Request", "homeplug_av.enet_phy_req",
4102           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4103       },
4104       { &hf_homeplug_av_enet_phy_req_mcontrol,
4105         { "Message Control", "homeplug_av.enet_phy_req.mcontrol",
4106           FT_UINT8, BASE_DEC, VALS(homeplug_av_enet_phy_mcontrol_vals), HOMEPLUG_AV_ENET_PHY_MCONTROL_MASK, "Unknown", HFILL }
4107       },
4108       { &hf_homeplug_av_enet_phy_req_addcaps,
4109         { "Advertisement Capabilities", "homeplug_av.enet_phy_req.addcaps",
4110           FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL }
4111       },
4112       /* Get Ethernet PHY Settings Confirmation */
4113       { &hf_homeplug_av_enet_phy_cnf,
4114         { "Get Ethernet PHY Settings Confirmation", "homeplug_av.enet_phy_cnf",
4115           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4116       },
4117       { &hf_homeplug_av_enet_phy_cnf_status,
4118         { "Status", "homeplug_av.enet_phy_cnf.status",
4119           FT_UINT8, BASE_DEC, VALS(homeplug_av_generic_status_vals), HOMEPLUG_AV_GEN_STATUS_MASK, NULL, HFILL }
4120       },
4121       { &hf_homeplug_av_enet_phy_cnf_speed,
4122         { "Speed", "homeplug_av.enet_phy.speed",
4123           FT_UINT8, BASE_DEC, VALS(homeplug_av_enet_phy_speed_vals), HOMEPLUG_AV_ENET_PHY_SPEED_MASK, "Unknown", HFILL },
4124       },
4125       { &hf_homeplug_av_enet_phy_cnf_duplex,
4126         { "Duplex", "homeplug_av.enet_phy.duplex",
4127           FT_UINT8, BASE_DEC, VALS(homeplug_av_enet_phy_duplex_vals), HOMEPLUG_AV_ENET_PHY_DUPLEX_MASK, "Unknown", HFILL },
4128       },
4129       /* Tone Map Characteristics Request */
4130       { &hf_homeplug_av_tone_map_req,
4131         { "Tone Map Characteristics Request", "homeplug_av.tone_map_req",
4132           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4133       },
4134       { &hf_homeplug_av_tone_map_req_mac,
4135         { "Peer address", "homeplug_av.tone_map_req.mac",
4136           FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL }
4137       },
4138       { &hf_homeplug_av_tone_map_req_slot,
4139         { "Tone Map slot", "homeplug_av.tone_map_req.slot",
4140           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
4141       },
4142       /* Tone Map Characteristics Confirmation */
4143       { &hf_homeplug_av_tone_map_cnf,
4144         { "Tone Map Characteristics Confirmation", "homeplug_av.tone_map_cnf",
4145           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4146       },
4147       { &hf_homeplug_av_tone_map_cnf_status,
4148         { "Status", "homeplug_av.tone_map_cnf.status",
4149           FT_UINT8, BASE_HEX, VALS(homeplug_av_tone_map_status_vals), HOMEPLUG_AV_TONE_MAP_STATUS_MASK, NULL, HFILL }
4150       },
4151       { &hf_homeplug_av_tone_map_cnf_slot,
4152         { "Slot", "homeplug_av.tone_map_cnf.slot",
4153           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
4154       },
4155       { &hf_homeplug_av_tone_map_cnf_num_tms,
4156         { "Number of Tone Maps in use", "homeplug_av.tone_map_cnf.num_tms",
4157           FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
4158       },
4159       { &hf_homeplug_av_tone_map_cnf_num_act,
4160         { "Tone map number of active carriers", "homeplug_av.tone_map_cnf.num_act",
4161           FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
4162       },
4163       /* Tone Map Carrier informations */
4164       { &hf_homeplug_av_tone_map_carrier,
4165         { "Modulation per carrier", "homeplug_av.tone_map_cnf.carrier",
4166           FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
4167       },
4168       { &hf_homeplug_av_tone_map_carrier_lo,
4169         { "Modulation (Low carrier)", "homeplug_av.tone_map_cnf.carrier.lo",
4170           FT_UINT8, BASE_HEX, VALS(homeplug_av_tone_map_vals), HOMEPLUG_AV_TONE_MAP_MASK, NULL, HFILL }
4171       },
4172       { &hf_homeplug_av_tone_map_carrier_hi,
4173         { "Modulation (High carrier)", "homeplug_av.tone_map_cnf.carrier.hi",
4174           FT_UINT8, BASE_HEX, VALS(homeplug_av_tone_map_vals), HOMEPLUG_AV_TONE_MAP_MASK << 4, NULL, HFILL }
4175       }
4176    };
4177
4178    static gint *ett[] = {
4179       &ett_homeplug_av,
4180       &ett_homeplug_av_mmhdr,
4181       &ett_homeplug_av_mmtype,
4182       &ett_homeplug_av_vendor,
4183       &ett_homeplug_av_public,
4184
4185       &ett_homeplug_av_fc,
4186       &ett_homeplug_av_bcn,
4187       &ett_homeplug_av_cc_disc_list_cnf,
4188       &ett_homeplug_av_cc_sta_info,
4189       &ett_homeplug_av_cc_net_info,
4190       &ett_homeplug_av_cm_enc_pld_ind,
4191       &ett_homeplug_av_cm_enc_pld_rsp,
4192       &ett_homeplug_av_cm_set_key_req,
4193       &ett_homeplug_av_cm_set_key_cnf,
4194       &ett_homeplug_av_cm_get_key_req,
4195       &ett_homeplug_av_cm_get_key_cnf,
4196       &ett_homeplug_av_brg_infos_cnf,
4197       &ett_homeplug_av_cm_nw_infos_cnf,
4198       &ett_homeplug_av_nw_stats_cnf,
4199
4200       &ett_homeplug_av_get_sw_cnf,
4201       &ett_homeplug_av_wr_mem_req,
4202       &ett_homeplug_av_wr_mem_cnf,
4203       &ett_homeplug_av_rd_mem_req,
4204       &ett_homeplug_av_st_mac_req,
4205       &ett_homeplug_av_st_mac_cnf,
4206       &ett_homeplug_av_rd_mem_cnf,
4207       &ett_homeplug_av_get_nvm_cnf,
4208       &ett_homeplug_av_rs_dev_cnf,
4209       &ett_homeplug_av_wr_mod_req,
4210       &ett_homeplug_av_wr_mod_cnf,
4211       &ett_homeplug_av_wr_mod_ind,
4212       &ett_homeplug_av_rd_mod_req,
4213       &ett_homeplug_av_rd_mod_cnf,
4214       &ett_homeplug_av_mod_nvm_req,
4215       &ett_homeplug_av_mod_nvm_cnf,
4216       &ett_homeplug_av_wd_rpt_req,
4217       &ett_homeplug_av_wd_rpt_ind,
4218       &ett_homeplug_av_lnk_stats_req,
4219       &ett_homeplug_av_lnk_stats_cnf,
4220       &ett_homeplug_av_lnk_stats_tx,
4221       &ett_homeplug_av_lnk_stats_rx,
4222       &ett_homeplug_av_lnk_stats_rx_inv,
4223       &ett_homeplug_av_sniffer_req,
4224       &ett_homeplug_av_sniffer_cnf,
4225       &ett_homeplug_av_sniffer_ind,
4226       &ett_homeplug_av_sniffer_ind_data,
4227       &ett_homeplug_av_nw_info_cnf,
4228       &ett_homeplug_av_nw_info_sta_info,
4229       &ett_homeplug_av_nw_info_net_info,
4230       &ett_homeplug_av_cp_rpt_req,
4231       &ett_homeplug_av_cp_rpt_ind,
4232       &ett_homeplug_av_fr_lbk_req,
4233       &ett_homeplug_av_fr_lbk_cnf,
4234       &ett_homeplug_av_lbk_stat_cnf,
4235       &ett_homeplug_av_set_key_req,
4236       &ett_homeplug_av_set_key_cnf,
4237       &ett_homeplug_av_mfg_string_cnf,
4238       &ett_homeplug_av_rd_cblock_cnf,
4239       &ett_homeplug_av_cblock_hdr,
4240       &ett_homeplug_av_cblock,
4241       &ett_homeplug_av_set_sdram_req,
4242       &ett_homeplug_av_set_sdram_cnf,
4243       &ett_homeplug_av_host_action_ind,
4244       &ett_homeplug_av_host_action_rsp,
4245       &ett_homeplug_av_op_attr_req,
4246       &ett_homeplug_av_op_attr_cnf,
4247       &ett_homeplug_av_op_attr_data,
4248       &ett_homeplug_av_enet_phy_req,
4249       &ett_homeplug_av_enet_phy_cnf,
4250       &ett_homeplug_av_tone_map_req,
4251       &ett_homeplug_av_tone_map_cnf,
4252       &ett_homeplug_av_tone_map_carrier
4253    };
4254
4255
4256    proto_homeplug_av = proto_register_protocol("HomePlug AV protocol", "HomePlug AV", "homeplug-av");
4257
4258    proto_register_field_array(proto_homeplug_av, hf, array_length(hf));
4259
4260    proto_register_subtree_array(ett, array_length(ett));
4261 }
4262
4263 void
4264 proto_reg_handoff_homeplug_av(void)
4265 {
4266    dissector_handle_t homeplug_av_handle;
4267
4268    homeplug_av_handle = create_dissector_handle(dissect_homeplug_av, proto_homeplug_av);
4269    dissector_add_uint("ethertype", ETHERTYPE_HOMEPLUG_AV, homeplug_av_handle);
4270 }
4271
4272 /*
4273  * Editor modelines
4274  *
4275  * Local Variables:
4276  * c-basic-offset: 3
4277  * tab-width: 8
4278  * indent-tabs-mode: nil
4279  * End:
4280  *
4281  * ex: set shiftwidth=3 tabstop=8 expandtab:
4282  * :indentSize=3:tabSize=8:noTabs=true:
4283  */