2 * Routines for homeplug dissection
4 * Copyright 2006, Sebastien Tandel <sebastien[AT]tandel.be>
5 * Copyright 2009, Luca Ceresoli <luca[AT]lucaceresoli.net>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 #include <epan/packet.h>
36 #include <epan/etypes.h>
38 #include <epan/proto.h>
39 #include <epan/ptvcursor.h>
41 static int proto_homeplug = -1;
43 static int hf_homeplug_mctrl = -1;
44 static int hf_homeplug_mctrl_reserved = -1;
45 static int hf_homeplug_mctrl_ne = -1;
46 static int hf_homeplug_mehdr = -1;
47 static int hf_homeplug_mehdr_mev = -1;
48 static int hf_homeplug_mehdr_metype = -1;
49 static int hf_homeplug_melen = -1;
50 static int hf_homeplug_mme = -1;
51 /* Request Channel Estimation */
52 static int hf_homeplug_rce = -1;
53 static int hf_homeplug_rce_cev = -1;
54 static int hf_homeplug_rce_rsvd = -1;
55 /* Channel Estimation Response */
56 static int hf_homeplug_cer = -1;
57 static int hf_homeplug_cer_cerv = -1;
58 static int hf_homeplug_cer_rsvd1 = -1;
59 static int hf_homeplug_cer_rxtmi = -1;
60 static int hf_homeplug_cer_vt = -1;
61 static int hf_homeplug_cer_rate = -1;
62 static int hf_homeplug_cer_bp = -1;
63 static int hf_homeplug_cer_mod = -1;
64 static int hf_homeplug_cer_vt11 = -1;
65 static int hf_homeplug_cer_rsvd2 = -1;
66 static int hf_homeplug_cer_nbdas = -1;
67 static int hf_homeplug_cer_bda = -1;
68 /* Replace Bridge Address */
69 static int hf_homeplug_rba = -1;
71 static int hf_homeplug_vs = -1;
72 static int hf_homeplug_vs_oui = -1;
73 static int hf_homeplug_vs_dir = -1;
74 static int hf_homeplug_vs_mid = -1;
75 /* Set Network Encryption Key */
76 static int hf_homeplug_snk = -1;
77 static int hf_homeplug_snk_eks = -1;
78 static int hf_homeplug_snk_nek = -1;
79 /* Multicast With Response */
80 static int hf_homeplug_mwr = -1;
81 /* Confirm Network Encryption Key */
82 static int hf_homeplug_cnk = -1;
84 static int hf_homeplug_htag = -1;
85 /* Request Parameters and Statistics */
86 static int hf_homeplug_rps = -1;
87 /* Parameters and Statistics Response */
88 static int hf_homeplug_psr = -1;
89 static int hf_homeplug_psr_txack = -1;
90 static int hf_homeplug_psr_txnack = -1;
91 static int hf_homeplug_psr_txfail = -1;
92 static int hf_homeplug_psr_txcloss = -1;
93 static int hf_homeplug_psr_txcoll = -1;
94 static int hf_homeplug_psr_txca3lat = -1;
95 static int hf_homeplug_psr_txca2lat = -1;
96 static int hf_homeplug_psr_txca1lat = -1;
97 static int hf_homeplug_psr_txca0lat = -1;
98 static int hf_homeplug_psr_rxbp40 = -1;
99 /* Set Local Parameters */
100 static int hf_homeplug_slp = -1;
101 static int hf_homeplug_slp_ma = -1;
103 static int hf_homeplug_loader = -1;
104 static int hf_homeplug_loader_mid = -1;
105 static int hf_homeplug_loader_length = -1;
106 static int hf_homeplug_loader_status = -1;
107 static int hf_homeplug_loader_version = -1;
108 static int hf_homeplug_loader_gdfv = -1;
109 static int hf_homeplug_loader_lsf = -1;
110 static int hf_homeplug_loader_lwm = -1;
111 static int hf_homeplug_loader_lrm = -1;
112 static int hf_homeplug_loader_lrnvm = -1;
113 static int hf_homeplug_loader_lwnvm = -1;
114 static int hf_homeplug_loader_lreset = -1;
115 static int hf_homeplug_loader_gmd = -1;
116 static int hf_homeplug_loader_smd = -1;
117 static int hf_homeplug_loader_module_id = -1;
118 static int hf_homeplug_loader_module_offset = -1;
119 static int hf_homeplug_loader_module_size = -1;
120 static int hf_homeplug_loader_data_length = -1;
121 static int hf_homeplug_loader_data_address = -1;
122 static int hf_homeplug_loader_data = -1;
123 static int hf_homeplug_loader_cm = -1;
124 static int hf_homeplug_loader_lemd = -1;
125 static int hf_homeplug_loader_lenvms = -1;
126 static int hf_homeplug_loader_gnvmp = -1;
127 static int hf_homeplug_loader_snvmp = -1;
128 static int hf_homeplug_loader_nvmp_type = -1;
129 static int hf_homeplug_loader_nvmp_pagesize = -1;
130 static int hf_homeplug_loader_nvmp_blocksize = -1;
131 static int hf_homeplug_loader_nvmp_memorysize = -1;
133 static int hf_homeplug_hreq = -1;
134 static int hf_homeplug_hreq_mid = -1;
135 static int hf_homeplug_hreq_gdv = -1;
136 static int hf_homeplug_hreq_gfv = -1;
137 static int hf_homeplug_hreq_gnek = -1;
138 static int hf_homeplug_hreq_gclbpl = -1;
139 static int hf_homeplug_hreq_nvds = -1;
140 static int hf_homeplug_hreq_grbt = -1;
141 static int hf_homeplug_hreq_gslnm = -1;
142 static int hf_homeplug_hreq_gsss = -1;
143 static int hf_homeplug_hreq_rsl = -1;
144 static int hf_homeplug_hreq_reset = -1;
145 static int hf_homeplug_hreq_reset_type = -1;
146 static int hf_homeplug_hreq_reset_delay = -1;
148 static int hf_homeplug_hrsp = -1;
149 static int hf_homeplug_hrsp_mid = -1;
150 static int hf_homeplug_hrsp_gdvr = -1;
151 static int hf_homeplug_hrsp_gfvr = -1;
152 static int hf_homeplug_hrsp_gnekr = -1;
153 static int hf_homeplug_hrsp_gnekr_select = -1;
154 static int hf_homeplug_hrsp_gnekr_key = -1;
155 static int hf_homeplug_hrsp_invalid = -1;
156 static int hf_homeplug_hrsp_version = -1;
157 /* Network Statistics */
158 static int hf_homeplug_ns = -1;
159 static int hf_homeplug_ns_extended = -1;
161 static int hf_homeplug_ns_netw_ctrl_ac = -1;
162 static int hf_homeplug_ns_netw_ctrl_icid = -1;
163 static int hf_homeplug_ns_bytes40_robo = -1;
164 static int hf_homeplug_ns_fails_robo = -1;
165 static int hf_homeplug_ns_drops_robo = -1;
166 static int hf_homeplug_ns_netw_da = -1;
167 static int hf_homeplug_ns_bytes40 = -1;
168 static int hf_homeplug_ns_fails = -1;
169 static int hf_homeplug_ns_drops = -1;
171 static int hf_homeplug_ns_tx_bfr_state = -1;
172 static int hf_homeplug_ns_buf_in_use = -1;
173 static int hf_homeplug_ns_prio = -1;
174 static int hf_homeplug_ns_msdu_len = -1;
175 static int hf_homeplug_ns_seqn = -1;
176 static int hf_homeplug_ns_toneidx = -1;
177 /* Bridging Characteristics Network */
178 static int hf_homeplug_bcn = -1;
179 static int hf_homeplug_bcn_network = -1;
180 static int hf_homeplug_bcn_return = -1;
181 static int hf_homeplug_bcn_rsvd = -1;
182 static int hf_homeplug_bcn_fbn = -1;
183 static int hf_homeplug_bcn_brda = -1;
184 static int hf_homeplug_bcn_bp_das = -1;
185 static int hf_homeplug_bcn_bp_da = -1;
186 /* Bridging Characteristics Local */
187 static int hf_homeplug_bcl = -1;
188 static int hf_homeplug_bcl_network = -1;
189 static int hf_homeplug_bcl_return = -1;
190 static int hf_homeplug_bcl_rsvd = -1;
191 static int hf_homeplug_bcl_hprox_das= -1;
192 static int hf_homeplug_bcl_hpbda = -1;
193 /* Set Transmit Characteristics */
194 static int hf_homeplug_stc = -1;
195 static int hf_homeplug_stc_lco = -1;
196 static int hf_homeplug_stc_encf = -1;
197 static int hf_homeplug_stc_txprio = -1;
198 static int hf_homeplug_stc_rexp = -1;
199 static int hf_homeplug_stc_txcf = -1;
200 static int hf_homeplug_stc_cftop = -1;
201 static int hf_homeplug_stc_rsvd1 = -1;
202 static int hf_homeplug_stc_retry = -1;
203 static int hf_homeplug_stc_rsvd2 = -1;
204 static int hf_homeplug_stc_dder = -1;
205 static int hf_homeplug_stc_dur = -1;
206 static int hf_homeplug_stc_ebp = -1;
207 static int hf_homeplug_stc_dees = -1;
208 static int hf_homeplug_stc_txeks = -1;
209 static int hf_homeplug_data = -1;
211 static gint ett_homeplug = -1;
212 static gint ett_homeplug_mctrl = -1;
213 static gint ett_homeplug_mehdr = -1;
214 static gint ett_homeplug_vs_mid = -1;
215 static gint ett_homeplug_rce = -1;
216 static gint ett_homeplug_cer = -1;
217 static gint ett_homeplug_vs = -1;
218 static gint ett_homeplug_snk = -1;
219 static gint ett_homeplug_rps = -1;
220 static gint ett_homeplug_psr = -1;
221 static gint ett_homeplug_slp = -1;
222 static gint ett_homeplug_loader = -1;
223 static gint ett_homeplug_hreq = -1;
224 static gint ett_homeplug_hrsp = -1;
225 static gint ett_homeplug_ns = -1;
226 static gint ett_homeplug_tone = -1;
227 static gint ett_homeplug_tx_bfr_state = -1;
228 static gint ett_homeplug_bridge = -1;
229 static gint ett_homeplug_bcn = -1;
230 static gint ett_homeplug_bcl = -1;
231 static gint ett_homeplug_stc = -1;
234 static guint8 homeplug_ne = 0;
235 static guint8 homeplug_melen = 0;
236 static guint8 homeplug_metype = 0;
238 static guint32 homeplug_offset = 0;
242 #define HOMEPLUG_MME_RCE 0x00
243 #define HOMEPLUG_MME_CER 0x01
244 #define HOMEPLUG_MME_VS 0x02
245 #define HOMEPLUG_MME_RBA 0x03
246 #define HOMEPLUG_MME_SNK 0x04
247 #define HOMEPLUG_MME_MWR 0x05
248 #define HOMEPLUG_MME_CNK 0x06
249 #define HOMEPLUG_MME_RPS 0x07
250 #define HOMEPLUG_MME_PSR 0x08
251 #define HOMEPLUG_MME_SLP 0x19
252 #define HOMEPLUG_MME_LOADER 0x10
253 #define HOMEPLUG_MME_HREQ 0x12
254 #define HOMEPLUG_MME_HRSP 0x13
255 #define HOMEPLUG_MME_HTAG 0x14
256 #define HOMEPLUG_MME_NS 0x1A
257 #define HOMEPLUG_MME_RES 0x1B
258 #define HOMEPLUG_MME_PS 0x1C
259 #define HOMEPLUG_MME_SLO 0x1D
260 #define HOMEPLUG_MME_BC 0x1E
261 #define HOMEPLUG_MME_STC 0x1F
262 static const value_string homeplug_metype_vals[] = {
263 { HOMEPLUG_MME_RCE, "Request Channel Estimation" },
264 { HOMEPLUG_MME_CER, "Channel Estimation Response" },
265 { HOMEPLUG_MME_VS , "Vendor Specific" },
266 { HOMEPLUG_MME_RBA, "Replace Bridge Address" },
267 { HOMEPLUG_MME_SNK, "Set Network Encryption Key" },
268 { HOMEPLUG_MME_MWR, "Multicast With Response" },
269 { HOMEPLUG_MME_CNK, "Confirm Network Encryption Key" },
270 { HOMEPLUG_MME_RPS, "Request Parameters and Statistics" },
271 { HOMEPLUG_MME_PSR, "Parameters and Statistics Response" },
272 { HOMEPLUG_MME_SLP, "Set Local Parameters" },
273 { HOMEPLUG_MME_NS , "Network Statistics" },
274 { HOMEPLUG_MME_RES, "Reserved" },
275 { HOMEPLUG_MME_PS , "Performance Statistics" },
276 { HOMEPLUG_MME_SLO, "Set Local Overrides" },
277 { HOMEPLUG_MME_BC , "Bridging Characteristics" },
278 { HOMEPLUG_MME_STC, "Set Transmit Characteristics" },
282 /* MID Values, second field is METYPE they occur in */
283 #define HOMEPLUG_MID_GDD 16 /* 0x02 */
284 #define HOMEPLUG_MID_GCC 24 /* 0x02 */
285 #define HOMEPLUG_MID_GEC 25 /* 0x02 */
286 #define HOMEPLUG_MID_PRE 96 /* 0x02 */
287 #define HOMEPLUG_MID_PSI 97 /* 0x02 */
289 #define HOMEPLUG_MID_LGDFV 1 /* 0x10 */
290 #define HOMEPLUG_MID_LSF 2 /* 0x10 */
291 #define HOMEPLUG_MID_LWM 4 /* 0x10 */
292 #define HOMEPLUG_MID_LRM 9 /* 0x10 */
293 #define HOMEPLUG_MID_LRNVM 21 /* 0x10 */
294 #define HOMEPLUG_MID_LWNVM 22 /* 0x10 */
295 #define HOMEPLUG_MID_LRESET 127 /* 0x10 */
296 #define HOMEPLUG_MID_GMD 128 /* 0x10 */
297 #define HOMEPLUG_MID_SMD 129 /* 0x10 */
298 #define HOMEPLUG_MID_CM 130 /* 0x10 */
299 #define HOMEPLUG_MID_LEMD 132 /* 0x10 */
300 #define HOMEPLUG_MID_LENVMS 140 /* 0x10 */
301 #define HOMEPLUG_MID_GNVMP 141 /* 0x10 */
302 #define HOMEPLUG_MID_SNVMP 142 /* 0x10 */
304 #define HOMEPLUG_MID_GDV 1 /* 0x12 */
305 #define HOMEPLUG_MID_GFV 32 /* 0x12 */
306 #define HOMEPLUG_MID_GNEK 33 /* 0x12 */
307 #define HOMEPLUG_MID_GCLBPL 39 /* 0x12 */
308 #define HOMEPLUG_MID_NVDS 64 /* 0x12 */
309 #define HOMEPLUG_MID_GRBT 66 /* 0x12 */
310 #define HOMEPLUG_MID_GSLNM 68 /* 0x12 */
311 #define HOMEPLUG_MID_GSSS 72 /* 0x12 */
312 #define HOMEPLUG_MID_RSL 103 /* 0x12 */
313 #define HOMEPLUG_MID_RESET 127 /* 0x12 */
315 #define HOMEPLUG_MID_GDVR 1 /* 0x13 */
316 #define HOMEPLUG_MID_GFVR 32 /* 0x13 */
317 #define HOMEPLUG_MID_GNEKR 33 /* 0x13 */
318 #define HOMEPLUG_MID_INVALID 128 /* 0x13 */
320 #define HOMEPLUG_MID_EKT 1 /* 0x14 */
324 /* Bit mask Operation */
325 #define HOMEPLUG_MCTRL_RSVD 0x80
326 #define HOMEPLUG_MCTRL_NE 0x7F
328 #define HOMEPLUG_MEHDR_MEV 0xE0
329 #define HOMEPLUG_MEHDR_METYPE 0x1F
331 #define HOMEPLUG_VS_DIR 0x80
332 #define HOMEPLUG_VS_MID 0x3F
334 #define HOMEPLUG_NS_AC 0x80
335 #define HOMEPLUG_NS_ICID 0x7F
336 #define HOMEPLUG_NS_BUF_IN_USE 0x80
337 #define HOMEPLUG_NS_PRIO 0x60
338 #define HOMEPLUG_NS_MSDU_LEN 0x1F
339 #define HOMEPLUG_NS_SEQN 0xF0
340 #define HOMEPLUG_NS_TONEIDX 0x0F
342 /* string values in function of AC */
343 static const true_false_string homeplug_ns_ac_vals = {
344 "(from host) Return basic network statistics",
345 "(from host) Clear basic network statistics"
348 /* string values in function of BUF_IN_USE */
349 static const true_false_string homeplug_ns_buf_in_use_vals = {
351 "Buffer is available"
354 #define HOMEPLUG_RCE_CEV 0xF0
355 #define HOMEPLUG_RCE_RSVD 0x0F
357 #define HOMEPLUG_CER_CERV 0xF0
358 #define HOMEPLUG_CER_RSVD 0x0FE0
359 #define HOMEPLUG_CER_RXTMI 0x1F
360 #define HOMEPLUG_CER_RATE 0x80
361 #define HOMEPLUG_CER_BP 0x40
362 #define HOMEPLUG_CER_VT11 0x0F
363 #define HOMEPLUG_CER_RSVD2 0x80
364 #define HOMEPLUG_CER_NBDAS 0x7F
366 #define HOMEPLUG_BC_NETWORK 0x80
367 #define HOMEPLUG_BC_RETURN 0x40
368 #define HOMEPLUG_BCL_RSVD 0x3F
369 #define HOMEPLUG_BCN_RSVD 0x30
370 #define HOMEPLUG_BCN_FBN 0x0F
372 /* string values in function of BC_NETWORK */
373 static const true_false_string homeplug_bc_network_vals = {
374 "Network bridge information",
375 "Local bridge information"
378 /* string values in function of BC_RETURN */
379 static const true_false_string homeplug_bc_return_vals = {
380 "Return bridging characteristics",
381 "Set bridging characteristics"
384 #define HOMEPLUG_STC_LCO 0x80
385 #define HOMEPLUG_STC_ENCF 0x40
386 #define HOMEPLUG_STC_TXPRIO 0x30
387 #define HOMEPLUG_STC_REXP 0x08
388 #define HOMEPLUG_STC_TXCF 0x04
389 #define HOMEPLUG_STC_CFTOP 0x02
390 #define HOMEPLUG_STC_RSVD1 0x01
391 #define HOMEPLUG_STC_RETRY 0xC0
392 #define HOMEPLUG_STC_RSVD2 0x30
393 #define HOMEPLUG_STC_DDER 0x08
394 #define HOMEPLUG_STC_DUR 0x04
395 #define HOMEPLUG_STC_EBP 0x02
396 #define HOMEPLUG_STC_DEES 0x01
398 /* string values in function of CFTOP */
399 static const true_false_string homeplug_stc_cftop_vals = {
404 /* string values in function of RETRY */
405 static const value_string homeplug_stc_retry_vals[] = {
407 { 1, "One retry only"},
408 { 2, "Normal retries based on specification"},
413 /* Length of Network Statistics Response defines whether it is the Basic or
414 * the Extended Response */
415 #define HOMEPLUG_NS_BASIC_LEN 187
416 #define HOMEPLUG_NS_EXT_LEN 199
419 #define HOMEPLUG_NS_ICID5130A1 0x00
420 #define HOMEPLUG_NS_ICID51X1USB 0x01
421 #define HOMEPLUG_NS_ICID51X1PHY 0x02
422 #define HOMEPLUG_NS_ICID51X1HOST 0x03
423 #define HOMEPLUG_NS_ICID5130A2 0x04
424 #define HOMEPLUG_NS_ICID_RSVD_MIN 0x05
425 #define HOMEPLUG_NS_ICID_RSVD_MAX 0x7F
426 /* string values in function of IC_ID values */
427 static const range_string homeplug_ns_icid_vals[] = {
428 { HOMEPLUG_NS_ICID5130A1, HOMEPLUG_NS_ICID5130A1, "INT5130A1" },
429 { HOMEPLUG_NS_ICID51X1USB, HOMEPLUG_NS_ICID51X1USB, "INT51X1 (USB Option)" },
430 { HOMEPLUG_NS_ICID51X1PHY, HOMEPLUG_NS_ICID51X1PHY, "INT51X1 (PHY Option)" },
431 { HOMEPLUG_NS_ICID51X1HOST, HOMEPLUG_NS_ICID51X1HOST, "INT51X1 (Host/DTE Option)" },
432 { HOMEPLUG_NS_ICID5130A2, HOMEPLUG_NS_ICID5130A2, "INT5130A2" },
433 { HOMEPLUG_NS_ICID_RSVD_MIN, HOMEPLUG_NS_ICID_RSVD_MAX, "Reserved"},
437 /* Modulation Method Bit Mask */
438 #define HOMEPLUG_CER_MOD_MASK 0x30
439 /* Modulation Method Values */
440 #define HOMEPLUG_CER_MOD_ROBO 0x00
441 #define HOMEPLUG_CER_MOD_DBPSK 0x01
442 #define HOMEPLUG_CER_MOD_DQPSK 0x02
443 #define HOMEPLUG_CER_MOD_RSVD 0x03
444 /* string values in function of Modulation Method Values */
445 static const value_string homeplug_cer_mod_vals[] = {
446 { HOMEPLUG_CER_MOD_ROBO, "ROBO Modulation"},
447 { HOMEPLUG_CER_MOD_DBPSK, "DBPSK Modulation"},
448 { HOMEPLUG_CER_MOD_DQPSK, "DQPSK Modulation"},
449 { HOMEPLUG_CER_MOD_RSVD, "Reserved"},
453 /* Constants used by various MMEs */
455 #define HOMEPLUG_ADDR_INEXISTANT G_GINT64_CONSTANT(010000000000U)
457 /* string values in function of TXPRIO */
458 static const value_string homeplug_txprio_vals[] = {
466 #define HOMEPLUG_MCTRL_LEN 1
467 #define HOMEPLUG_MEHDR_LEN 1
468 #define HOMEPLUG_MELEN_LEN 1
471 /* Dissection of MCTRL */
472 static void dissect_homeplug_mctrl(ptvcursor_t * cursor)
474 proto_item * it = NULL;
476 if (!ptvcursor_tree(cursor))
479 it = ptvcursor_add_no_advance(cursor, hf_homeplug_mctrl, 1, FALSE);
480 /* Extract Number Of MAC Data Entries */
481 homeplug_ne = tvb_get_guint8(ptvcursor_tvbuff(cursor),
482 ptvcursor_current_offset(cursor)) & HOMEPLUG_MCTRL_NE;
484 ptvcursor_push_subtree(cursor, it, ett_homeplug_mctrl);
485 ptvcursor_add_no_advance(cursor, hf_homeplug_mctrl_reserved, 1, FALSE);
486 ptvcursor_add(cursor, hf_homeplug_mctrl_ne, 1, FALSE);
488 ptvcursor_pop_subtree(cursor);
491 /* Dissection of MEHDR */
492 static void dissect_homeplug_mehdr(ptvcursor_t * cursor)
494 proto_item * it = NULL;
496 if (!ptvcursor_tree(cursor))
499 it = ptvcursor_add_no_advance(cursor, hf_homeplug_mehdr, 1, FALSE);
500 homeplug_metype = tvb_get_guint8(ptvcursor_tvbuff(cursor),
501 ptvcursor_current_offset(cursor)) & HOMEPLUG_MEHDR_METYPE;
503 ptvcursor_push_subtree(cursor, it, ett_homeplug_mehdr);
504 ptvcursor_add_no_advance(cursor, hf_homeplug_mehdr_mev, 1, FALSE);
505 ptvcursor_add(cursor, hf_homeplug_mehdr_metype, 1, FALSE);
507 ptvcursor_pop_subtree(cursor);
510 /* dissection of MELEN */
511 static void dissect_homeplug_melen(ptvcursor_t * cursor)
513 if (!ptvcursor_tree(cursor))
516 homeplug_melen = tvb_get_guint8(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
517 ptvcursor_add(cursor, hf_homeplug_melen, 1, FALSE);
521 /* Dissection of Request Channel Estimation MME */
522 static void dissect_homeplug_rce(ptvcursor_t * cursor)
524 proto_item * it = NULL;
526 if (!ptvcursor_tree(cursor))
529 it = ptvcursor_add_no_advance(cursor, hf_homeplug_rce, homeplug_melen, FALSE);
531 ptvcursor_push_subtree(cursor, it, ett_homeplug_rce);
532 ptvcursor_add_no_advance(cursor, hf_homeplug_rce_cev, 1, FALSE);
533 ptvcursor_add(cursor, hf_homeplug_rce_rsvd, 1, FALSE);
535 ptvcursor_pop_subtree(cursor);
538 /* Dissection of Channel Estimation Response MME */
539 static void dissect_homeplug_cer(ptvcursor_t * cursor)
541 proto_item * it = NULL;
546 if (!ptvcursor_tree(cursor))
549 it = ptvcursor_add_no_advance(cursor, hf_homeplug_cer, homeplug_melen, FALSE);
551 ptvcursor_push_subtree(cursor, it, ett_homeplug_cer);
552 ptvcursor_add_no_advance(cursor, hf_homeplug_cer_cerv, 1, FALSE);
553 ptvcursor_add(cursor, hf_homeplug_cer_rsvd1, 2, FALSE);
554 ptvcursor_add(cursor, hf_homeplug_cer_rxtmi, 1, FALSE);
556 for (;iTone < 10; iTone++) {
557 ptvcursor_add(cursor, hf_homeplug_cer_vt, 1, FALSE);
560 ptvcursor_add_no_advance(cursor, hf_homeplug_cer_rate, 1, FALSE);
561 ptvcursor_add_no_advance(cursor, hf_homeplug_cer_bp, 1, FALSE);
562 BP = tvb_get_guint8(ptvcursor_tvbuff(cursor),
563 ptvcursor_current_offset(cursor)) & HOMEPLUG_CER_BP;
564 ptvcursor_add_no_advance(cursor, hf_homeplug_cer_mod, 1, FALSE);
565 ptvcursor_add(cursor, hf_homeplug_cer_vt11, 1, FALSE);
566 ptvcursor_add_no_advance(cursor, hf_homeplug_cer_rsvd2, 1, FALSE);
569 iNBDA = tvb_get_guint8(ptvcursor_tvbuff(cursor),
570 ptvcursor_current_offset(cursor)) & HOMEPLUG_CER_NBDAS;
571 ptvcursor_add(cursor, hf_homeplug_cer_nbdas, 1, FALSE);
572 /* TODO : Check on iNBDA! INT51X1 up to 16 dba. But up to 32 for INT51X1 (Host/DTE) */
573 for (;iNBDA > 0; iNBDA--) {
574 ptvcursor_add(cursor, hf_homeplug_cer_bda, 6, FALSE);
577 ptvcursor_pop_subtree(cursor);
580 /* Dissection of Vendor Specific MME */
581 static void dissect_homeplug_vs(ptvcursor_t * cursor)
584 proto_item * it = NULL;
586 if (!ptvcursor_tree(cursor))
589 it = ptvcursor_add_no_advance(cursor, hf_homeplug_vs, homeplug_melen, FALSE);
591 ptvcursor_push_subtree(cursor, it, ett_homeplug_vs);
592 ptvcursor_add(cursor, hf_homeplug_vs_oui, 3, FALSE);
594 it = ptvcursor_add_no_advance(cursor, hf_homeplug_vs_mid, 1, FALSE);
595 mid = tvb_get_guint8(ptvcursor_tvbuff(cursor),
596 ptvcursor_current_offset(cursor)) & HOMEPLUG_VS_MID;
598 ptvcursor_push_subtree(cursor, it, ett_homeplug_vs_mid);
599 ptvcursor_add_no_advance(cursor, hf_homeplug_vs_dir, 1, FALSE);
600 ptvcursor_add(cursor, hf_homeplug_vs_mid, 1, FALSE);
602 ptvcursor_pop_subtree(cursor);
607 ptvcursor_pop_subtree(cursor);
610 /* Dissection of Replace Bridge Address MME */
611 static void dissect_homeplug_rba(ptvcursor_t * cursor)
613 proto_item * it = NULL;
615 if (!ptvcursor_tree(cursor))
618 it = ptvcursor_add_no_advance(cursor, hf_homeplug_rba, homeplug_melen, FALSE);
621 /* Dissection of Request Parameters and Statistics MME */
622 static void dissect_homeplug_rps(ptvcursor_t * cursor)
624 if (!ptvcursor_tree(cursor))
627 ptvcursor_add(cursor, hf_homeplug_rps, homeplug_melen, FALSE);
630 /* Dissection of Set Network Encryption Key MME */
631 static void dissect_homeplug_snk(ptvcursor_t * cursor)
633 proto_item * it = NULL;
635 if (!ptvcursor_tree(cursor))
638 it = ptvcursor_add_no_advance(cursor, hf_homeplug_snk, homeplug_melen, FALSE);
640 ptvcursor_push_subtree(cursor, it, ett_homeplug_snk);
641 ptvcursor_add(cursor, hf_homeplug_snk_eks, 1, FALSE);
642 ptvcursor_add(cursor, hf_homeplug_snk_nek, 8, FALSE);
644 ptvcursor_pop_subtree(cursor);
647 /* Dissection of Multicast with Response MME */
648 static void dissect_homeplug_mwr(ptvcursor_t * cursor)
650 proto_item * it = NULL;
652 if (!ptvcursor_tree(cursor))
655 it = ptvcursor_add_no_advance(cursor, hf_homeplug_mwr, homeplug_melen, FALSE);
658 /* Dissection of Confirm Network Encryption Key MME */
659 static void dissect_homeplug_cnk(ptvcursor_t * cursor)
661 proto_item * it = NULL;
663 if (!ptvcursor_tree(cursor))
666 it = ptvcursor_add_no_advance(cursor, hf_homeplug_cnk, homeplug_melen, FALSE);
669 /* Dissection of Parameters and Statistics Response MME */
670 static void dissect_homeplug_psr(ptvcursor_t * cursor)
672 proto_item * it = NULL;
674 if (!ptvcursor_tree(cursor))
677 it = ptvcursor_add_no_advance(cursor, hf_homeplug_psr, homeplug_melen, FALSE);
679 ptvcursor_push_subtree(cursor, it, ett_homeplug_psr);
680 ptvcursor_add(cursor, hf_homeplug_psr_txack, 2, FALSE);
681 ptvcursor_add(cursor, hf_homeplug_psr_txnack, 2, FALSE);
682 ptvcursor_add(cursor, hf_homeplug_psr_txfail, 2, FALSE);
683 ptvcursor_add(cursor, hf_homeplug_psr_txcloss, 2, FALSE);
684 ptvcursor_add(cursor, hf_homeplug_psr_txcoll, 2, FALSE);
685 ptvcursor_add(cursor, hf_homeplug_psr_txca3lat, 2, FALSE);
686 ptvcursor_add(cursor, hf_homeplug_psr_txca2lat, 2, FALSE);
687 ptvcursor_add(cursor, hf_homeplug_psr_txca1lat, 2, FALSE);
688 ptvcursor_add(cursor, hf_homeplug_psr_txca0lat, 2, FALSE);
689 ptvcursor_add(cursor, hf_homeplug_psr_rxbp40, 4, FALSE);
691 ptvcursor_pop_subtree(cursor);
694 /* Dissection of the Set Local Parameters MME */
695 static void dissect_homeplug_slp(ptvcursor_t * cursor)
697 proto_item * it = NULL;
699 if (!ptvcursor_tree(cursor))
702 it = ptvcursor_add_no_advance(cursor, hf_homeplug_slp, homeplug_melen, FALSE);
704 ptvcursor_push_subtree(cursor, it, ett_homeplug_slp);
705 ptvcursor_add(cursor, hf_homeplug_slp_ma, 6, FALSE);
706 ptvcursor_pop_subtree(cursor);
709 /* Dissection of Load MME */
710 static void dissect_homeplug_loader(ptvcursor_t * cursor, packet_info * pinfo)
712 int mid, length, dlen;
713 proto_item * it = NULL;
715 if (!ptvcursor_tree(cursor))
718 it = ptvcursor_add_no_advance(cursor, hf_homeplug_loader, -1, FALSE);
720 ptvcursor_push_subtree(cursor, it, ett_homeplug_loader);
722 mid = tvb_get_guint8(ptvcursor_tvbuff(cursor),
723 ptvcursor_current_offset(cursor));
725 length = tvb_get_ntohs(ptvcursor_tvbuff(cursor),
726 ptvcursor_current_offset(cursor) + 1);
729 case HOMEPLUG_MID_LGDFV:
730 if (check_col(pinfo->cinfo, COL_INFO)) {
731 col_set_str(pinfo->cinfo, COL_INFO, "Loader Get Firmware Version");
733 ptvcursor_add(cursor, hf_homeplug_loader_gdfv, 1, FALSE);
734 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
736 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
737 ptvcursor_add(cursor, hf_homeplug_loader_version, -1, FALSE);
740 case HOMEPLUG_MID_LSF:
741 if (check_col(pinfo->cinfo, COL_INFO)) {
742 col_set_str(pinfo->cinfo, COL_INFO, "Loader Start Firmware");
744 ptvcursor_add(cursor, hf_homeplug_loader_lsf, 1, FALSE);
745 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
747 case HOMEPLUG_MID_LWM:
748 if (check_col(pinfo->cinfo, COL_INFO)) {
749 col_set_str(pinfo->cinfo, COL_INFO, "Loader Write Memory");
751 ptvcursor_add(cursor, hf_homeplug_loader_lwm, 1, FALSE);
752 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
754 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
755 ptvcursor_add(cursor, hf_homeplug_loader_data_address, 4, FALSE);
757 dlen = tvb_get_ntohs(ptvcursor_tvbuff(cursor),
758 ptvcursor_current_offset(cursor));
759 ptvcursor_add(cursor, hf_homeplug_loader_data_length, 2, FALSE);
761 ptvcursor_add(cursor, hf_homeplug_loader_data, dlen, FALSE);
763 case HOMEPLUG_MID_LRM:
764 if (check_col(pinfo->cinfo, COL_INFO)) {
765 col_set_str(pinfo->cinfo, COL_INFO, "Loader Read Memory");
767 ptvcursor_add(cursor, hf_homeplug_loader_lrm, 1, FALSE);
768 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
770 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
771 ptvcursor_add(cursor, hf_homeplug_loader_data_address, 4, FALSE);
772 dlen = tvb_get_ntohs(ptvcursor_tvbuff(cursor),
773 ptvcursor_current_offset(cursor));
774 ptvcursor_add(cursor, hf_homeplug_loader_data_length, 2, FALSE);
776 ptvcursor_add(cursor, hf_homeplug_loader_data, dlen, FALSE);
778 case HOMEPLUG_MID_LRNVM:
779 if (check_col(pinfo->cinfo, COL_INFO)) {
780 col_set_str(pinfo->cinfo, COL_INFO, "Loader Read NVM");
782 ptvcursor_add(cursor, hf_homeplug_loader_lrnvm, 1, FALSE);
783 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
785 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
786 ptvcursor_add(cursor, hf_homeplug_loader_data_address, 4, FALSE);
787 dlen = tvb_get_ntohs(ptvcursor_tvbuff(cursor),
788 ptvcursor_current_offset(cursor));
789 ptvcursor_add(cursor, hf_homeplug_loader_data_length, 2, FALSE);
791 ptvcursor_add(cursor, hf_homeplug_loader_data, dlen, FALSE);
793 case HOMEPLUG_MID_LWNVM:
794 if (check_col(pinfo->cinfo, COL_INFO)) {
795 col_set_str(pinfo->cinfo, COL_INFO, "Loader Write NVM");
797 ptvcursor_add(cursor, hf_homeplug_loader_lwnvm, 1, FALSE);
798 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
800 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
801 ptvcursor_add(cursor, hf_homeplug_loader_data_address, 4, FALSE);
802 dlen = tvb_get_ntohs(ptvcursor_tvbuff(cursor),
803 ptvcursor_current_offset(cursor));
804 ptvcursor_add(cursor, hf_homeplug_loader_data_length, 2, FALSE);
806 ptvcursor_add(cursor, hf_homeplug_loader_data, dlen, FALSE);
808 case HOMEPLUG_MID_LRESET:
809 if (check_col(pinfo->cinfo, COL_INFO)) {
810 col_set_str(pinfo->cinfo, COL_INFO, "Loader Reset");
812 ptvcursor_add(cursor, hf_homeplug_loader_lreset, 1, FALSE);
813 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
815 case HOMEPLUG_MID_GMD:
816 if (check_col(pinfo->cinfo, COL_INFO)) {
817 col_set_str(pinfo->cinfo, COL_INFO, "Loader Get Module Data");
819 ptvcursor_add(cursor, hf_homeplug_loader_gmd, 1, FALSE);
820 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
822 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
823 ptvcursor_add(cursor, hf_homeplug_loader_module_id, 4, FALSE);
824 ptvcursor_add(cursor, hf_homeplug_loader_module_offset, 4, FALSE);
826 ptvcursor_add(cursor, hf_homeplug_loader_data_length, 2, FALSE);
828 ptvcursor_add(cursor, hf_homeplug_loader_module_size, 4, FALSE);
829 ptvcursor_add(cursor, hf_homeplug_loader_data, length - 13, FALSE);
832 case HOMEPLUG_MID_SMD:
833 if (check_col(pinfo->cinfo, COL_INFO)) {
834 col_set_str(pinfo->cinfo, COL_INFO, "Loader Set Module Data");
836 ptvcursor_add(cursor, hf_homeplug_loader_smd, 1, FALSE);
837 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
839 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
840 ptvcursor_add(cursor, hf_homeplug_loader_module_id, 4, FALSE);
841 ptvcursor_add(cursor, hf_homeplug_loader_module_offset, 4, FALSE);
842 dlen = tvb_get_ntohs(ptvcursor_tvbuff(cursor),
843 ptvcursor_current_offset(cursor));
845 ptvcursor_add(cursor, hf_homeplug_loader_data_length, 2, FALSE);
846 ptvcursor_add(cursor, hf_homeplug_loader_data, dlen, FALSE);
848 ptvcursor_add(cursor, hf_homeplug_loader_module_size, 4, FALSE);
850 case HOMEPLUG_MID_CM:
851 if (check_col(pinfo->cinfo, COL_INFO)) {
852 col_set_str(pinfo->cinfo, COL_INFO, "Loader Commit Module");
854 ptvcursor_add(cursor, hf_homeplug_loader_cm, 1, FALSE);
855 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
857 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
858 ptvcursor_add(cursor, hf_homeplug_loader_module_id, 4, FALSE);
860 case HOMEPLUG_MID_LEMD:
861 if (check_col(pinfo->cinfo, COL_INFO)) {
862 col_set_str(pinfo->cinfo, COL_INFO, "Loader Erase Module Data");
864 ptvcursor_add(cursor, hf_homeplug_loader_lemd, 1, FALSE);
865 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
867 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
868 ptvcursor_add(cursor, hf_homeplug_loader_module_id, 4, FALSE);
870 case HOMEPLUG_MID_LENVMS:
871 if (check_col(pinfo->cinfo, COL_INFO)) {
872 col_set_str(pinfo->cinfo, COL_INFO, "Loader Erase NVM Sectors");
874 ptvcursor_add(cursor, hf_homeplug_loader_lenvms, 1, FALSE);
875 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
877 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
878 ptvcursor_add(cursor, hf_homeplug_loader_data_address, 4, FALSE);
879 ptvcursor_add(cursor, hf_homeplug_loader_module_size, 4, FALSE);
881 case HOMEPLUG_MID_GNVMP:
882 if (check_col(pinfo->cinfo, COL_INFO)) {
883 col_set_str(pinfo->cinfo, COL_INFO, "Loader Get NVM Parametes");
885 ptvcursor_add(cursor, hf_homeplug_loader_gnvmp, 1, FALSE);
886 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
888 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
889 ptvcursor_add(cursor, hf_homeplug_loader_nvmp_type, 4, FALSE);
890 ptvcursor_add(cursor, hf_homeplug_loader_nvmp_pagesize, 4, FALSE);
891 ptvcursor_add(cursor, hf_homeplug_loader_nvmp_blocksize, 4, FALSE);
892 ptvcursor_add(cursor, hf_homeplug_loader_nvmp_memorysize, 4, FALSE);
895 case HOMEPLUG_MID_SNVMP:
896 if (check_col(pinfo->cinfo, COL_INFO)) {
897 col_set_str(pinfo->cinfo, COL_INFO, "Loader Set NVM Parametes");
899 ptvcursor_add(cursor, hf_homeplug_loader_snvmp, 1, FALSE);
900 ptvcursor_add(cursor, hf_homeplug_loader_length, 2, FALSE);
902 ptvcursor_add(cursor, hf_homeplug_loader_status, 1, FALSE);
903 ptvcursor_add(cursor, hf_homeplug_loader_nvmp_type, 4, FALSE);
904 ptvcursor_add(cursor, hf_homeplug_loader_nvmp_pagesize, 4, FALSE);
905 ptvcursor_add(cursor, hf_homeplug_loader_nvmp_blocksize, 4, FALSE);
906 ptvcursor_add(cursor, hf_homeplug_loader_nvmp_memorysize, 4, FALSE);
909 ptvcursor_add(cursor, hf_homeplug_loader_mid, 1, FALSE);
912 ptvcursor_pop_subtree(cursor);
915 /* Dissection of Host Request MME */
916 static void dissect_homeplug_hreq(ptvcursor_t * cursor, packet_info * pinfo)
919 proto_item * it = NULL;
921 if (!ptvcursor_tree(cursor))
924 it = ptvcursor_add_no_advance(cursor, hf_homeplug_hreq, homeplug_melen, FALSE);
926 ptvcursor_push_subtree(cursor, it, ett_homeplug_hreq);
928 mid = tvb_get_guint8(ptvcursor_tvbuff(cursor),
929 ptvcursor_current_offset(cursor));
930 length = tvb_get_ntohs(ptvcursor_tvbuff(cursor),
931 ptvcursor_current_offset(cursor) + 1);
934 case HOMEPLUG_MID_GDV:
935 if (check_col(pinfo->cinfo, COL_INFO)) {
936 col_set_str(pinfo->cinfo, COL_INFO, "Host Request: Get Device Version");
938 ptvcursor_add(cursor, hf_homeplug_hreq_gdv, 1, FALSE);
940 case HOMEPLUG_MID_GFV:
941 if (check_col(pinfo->cinfo, COL_INFO)) {
942 col_set_str(pinfo->cinfo, COL_INFO, "Host Request: Get Firmware Version");
944 ptvcursor_add(cursor, hf_homeplug_hreq_gfv, 1, FALSE);
946 case HOMEPLUG_MID_GNEK:
947 if (check_col(pinfo->cinfo, COL_INFO)) {
948 col_set_str(pinfo->cinfo, COL_INFO, "Host Request: Get Network Encryption Key Request");
950 ptvcursor_add(cursor, hf_homeplug_hreq_gnek, 1, FALSE);
952 case HOMEPLUG_MID_GCLBPL:
953 if (check_col(pinfo->cinfo, COL_INFO)) {
954 col_set_str(pinfo->cinfo, COL_INFO, "Host Request: Get/ Clear Local Bridge Proxy List");
956 ptvcursor_add(cursor, hf_homeplug_hreq_gclbpl, 1, FALSE);
958 case HOMEPLUG_MID_NVDS:
959 if (check_col(pinfo->cinfo, COL_INFO)) {
960 col_set_str(pinfo->cinfo, COL_INFO, "Host Request: Non-volatile Database Status");
962 ptvcursor_add(cursor, hf_homeplug_hreq_nvds, 1, FALSE);
964 case HOMEPLUG_MID_GRBT:
965 if (check_col(pinfo->cinfo, COL_INFO)) {
966 col_set_str(pinfo->cinfo, COL_INFO, "Host Request: Get Remote Bridge Table");
968 ptvcursor_add(cursor, hf_homeplug_hreq_grbt, 1, FALSE);
970 case HOMEPLUG_MID_GSLNM:
971 if (check_col(pinfo->cinfo, COL_INFO)) {
972 col_set_str(pinfo->cinfo, COL_INFO, "Host Request: Get/Set Logical Network Mappings");
974 ptvcursor_add(cursor, hf_homeplug_hreq_gslnm, 1, FALSE);
976 case HOMEPLUG_MID_GSSS:
977 if (check_col(pinfo->cinfo, COL_INFO)) {
978 col_set_str(pinfo->cinfo, COL_INFO, "Host Request: Get/Set Spectral Scaling");
980 ptvcursor_add(cursor, hf_homeplug_hreq_gsss, 1, FALSE);
982 case HOMEPLUG_MID_RSL:
983 if (check_col(pinfo->cinfo, COL_INFO)) {
984 col_set_str(pinfo->cinfo, COL_INFO, "Host Request: MAC Reset to Secondary Loader");
986 ptvcursor_add(cursor, hf_homeplug_hreq_rsl, 1, FALSE);
988 case HOMEPLUG_MID_RESET:
989 if (check_col(pinfo->cinfo, COL_INFO)) {
990 col_set_str(pinfo->cinfo, COL_INFO, "Host Request: MAC Reset");
992 ptvcursor_add(cursor, hf_homeplug_hreq_reset, 1, FALSE);
993 ptvcursor_add(cursor, hf_homeplug_hreq_reset_type, 1, FALSE);
995 ptvcursor_add(cursor, hf_homeplug_hreq_reset_delay, 2, FALSE);
998 ptvcursor_add(cursor, hf_homeplug_hreq_mid, 1, FALSE);
1001 ptvcursor_pop_subtree(cursor);
1004 /* Dissection of Host Response MME */
1005 static void dissect_homeplug_hrsp(ptvcursor_t * cursor, packet_info * pinfo)
1008 proto_item * it = NULL;
1010 if (!ptvcursor_tree(cursor))
1013 it = ptvcursor_add_no_advance(cursor, hf_homeplug_hrsp, homeplug_melen, FALSE);
1015 ptvcursor_push_subtree(cursor, it, ett_homeplug_hrsp);
1017 mid = tvb_get_guint8(ptvcursor_tvbuff(cursor),
1018 ptvcursor_current_offset(cursor));
1020 case HOMEPLUG_MID_GDVR:
1021 if (check_col(pinfo->cinfo, COL_INFO)) {
1022 col_set_str(pinfo->cinfo, COL_INFO, "Host Response: Get Device Version");
1024 ptvcursor_add(cursor, hf_homeplug_hrsp_gdvr, 1, FALSE);
1025 ptvcursor_add(cursor, hf_homeplug_hrsp_version, -1, FALSE);
1027 case HOMEPLUG_MID_GFVR:
1028 if (check_col(pinfo->cinfo, COL_INFO)) {
1029 col_set_str(pinfo->cinfo, COL_INFO, "Host Response: Get Firmware Version");
1031 ptvcursor_add(cursor, hf_homeplug_hrsp_gfvr, 1, FALSE);
1032 ptvcursor_add(cursor, hf_homeplug_hrsp_version, -1, FALSE);
1034 case HOMEPLUG_MID_GNEKR:
1035 if (check_col(pinfo->cinfo, COL_INFO)) {
1036 col_set_str(pinfo->cinfo, COL_INFO, "Get Network Encryption Key");
1038 ptvcursor_add(cursor, hf_homeplug_hrsp_gnekr, 1, FALSE);
1039 ptvcursor_add(cursor, hf_homeplug_hrsp_gnekr_select, 1, FALSE);
1040 ptvcursor_add(cursor, hf_homeplug_hrsp_gnekr_key, 8, FALSE);
1042 case HOMEPLUG_MID_INVALID:
1043 if (check_col(pinfo->cinfo, COL_INFO)) {
1044 col_set_str(pinfo->cinfo, COL_INFO, "Host Response: Invalid MME");
1046 ptvcursor_add(cursor, hf_homeplug_hrsp_invalid, 1, FALSE);
1049 ptvcursor_add(cursor, hf_homeplug_hrsp_mid, 1, FALSE);
1052 ptvcursor_pop_subtree(cursor);
1055 /* Dissection of Host Tag MME */
1056 static void dissect_homeplug_htag(ptvcursor_t * cursor)
1058 proto_item * it = NULL;
1060 if (!ptvcursor_tree(cursor))
1063 it = ptvcursor_add_no_advance(cursor, hf_homeplug_htag, homeplug_melen, FALSE);
1066 /* Dissection of the Network Statistics MME */
1067 static void dissect_homeplug_ns(ptvcursor_t * cursor, packet_info * pinfo)
1070 guint8 i_buffer = 0;
1072 guint16 ns_bytes40 = 0;
1073 guint64 newt_da = 0;
1074 gboolean extended = (homeplug_melen >= HOMEPLUG_NS_EXT_LEN);
1077 /* Append Basic/Extender specifier to info column */
1078 if (check_col(pinfo->cinfo, COL_INFO))
1079 col_append_str(pinfo->cinfo, COL_INFO, extended ? " Extended" : " Basic");
1081 if (!ptvcursor_tree(cursor))
1084 ptvcursor_add_with_subtree(cursor, hf_homeplug_ns, homeplug_melen, FALSE,
1087 ti = proto_tree_add_boolean(ptvcursor_tree(cursor), hf_homeplug_ns_extended,
1088 ptvcursor_tvbuff(cursor), 0, 0, extended);
1089 PROTO_ITEM_SET_GENERATED(ti);
1091 ptvcursor_add_no_advance(cursor, hf_homeplug_ns_netw_ctrl_ac, 1, FALSE);
1092 ptvcursor_add(cursor, hf_homeplug_ns_netw_ctrl_icid, 1, FALSE);
1094 ptvcursor_add_no_advance(cursor, hf_homeplug_ns_bytes40_robo, 2, TRUE);
1095 ns_bytes40 = tvb_get_letohs(ptvcursor_tvbuff(cursor),
1096 ptvcursor_current_offset(cursor));
1097 proto_tree_add_text(ptvcursor_tree(cursor), ptvcursor_tvbuff(cursor),
1098 ptvcursor_current_offset(cursor), 2, "MHz : %.3f", (float)(ns_bytes40)/42);
1099 ptvcursor_advance(cursor, 2);
1101 ptvcursor_add(cursor, hf_homeplug_ns_fails_robo, 2, TRUE);
1102 ptvcursor_add(cursor, hf_homeplug_ns_drops_robo, 2, TRUE);
1104 while (iTone < 15) {
1105 newt_da = ((gint64)tvb_get_ntoh24(ptvcursor_tvbuff(cursor),
1106 ptvcursor_current_offset(cursor))) << 24;
1107 newt_da |= tvb_get_ntoh24(ptvcursor_tvbuff(cursor),
1108 ptvcursor_current_offset(cursor)+3);
1110 if (newt_da != HOMEPLUG_ADDR_INEXISTANT) {
1111 ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH,
1112 ett_homeplug_tone, "Tone Map #%d", iTone+1);
1114 ptvcursor_add(cursor, hf_homeplug_ns_netw_da, 6, FALSE);
1116 ptvcursor_add_no_advance(cursor, hf_homeplug_ns_bytes40, 2, TRUE);
1117 ns_bytes40 = tvb_get_letohs(ptvcursor_tvbuff(cursor),
1118 ptvcursor_current_offset(cursor));
1119 proto_tree_add_text(ptvcursor_tree(cursor), ptvcursor_tvbuff(cursor),
1120 ptvcursor_current_offset(cursor), 2, "MHz : %.3f", (float)(ns_bytes40)/42);
1121 ptvcursor_advance(cursor, 2);
1123 ptvcursor_add(cursor, hf_homeplug_ns_fails, 2, TRUE);
1124 ptvcursor_add(cursor, hf_homeplug_ns_drops, 2, TRUE);
1126 ptvcursor_pop_subtree(cursor);
1128 proto_tree_add_text(ptvcursor_tree(cursor), ptvcursor_tvbuff(cursor),
1129 ptvcursor_current_offset(cursor), 12, "Tone Map #%d does not exist", iTone+1);
1135 while (i_buffer < 6) {
1136 ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH,
1137 ett_homeplug_tx_bfr_state, "TX_BFR_%d_STATE", i_buffer);
1138 ptvcursor_add_no_advance(cursor, hf_homeplug_ns_buf_in_use, 1, FALSE);
1139 ptvcursor_add_no_advance(cursor, hf_homeplug_ns_prio, 1, FALSE);
1140 ptvcursor_add(cursor, hf_homeplug_ns_msdu_len, 1, FALSE);
1141 ptvcursor_add_no_advance(cursor, hf_homeplug_ns_seqn, 1, FALSE);
1142 ptvcursor_add(cursor, hf_homeplug_ns_toneidx, 1, FALSE);
1143 ptvcursor_pop_subtree(cursor);
1147 ptvcursor_pop_subtree(cursor);
1150 /* Dissection of the Bridging Characteristics Network MME */
1151 static void dissect_homeplug_bcn(ptvcursor_t * cursor)
1153 proto_item * it = NULL;
1154 guint8 i_bridge = 0;
1159 it = ptvcursor_add_no_advance(cursor, hf_homeplug_bcn, homeplug_melen, FALSE);
1161 ptvcursor_push_subtree(cursor, it, ett_homeplug_bcn);
1162 ptvcursor_add_no_advance(cursor, hf_homeplug_bcn_network, 1, FALSE);
1163 ptvcursor_add_no_advance(cursor, hf_homeplug_bcn_return, 1, FALSE);
1164 ptvcursor_add_no_advance(cursor, hf_homeplug_bcn_rsvd, 1, FALSE);
1165 fbn = tvb_get_guint8(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor))
1167 ptvcursor_add(cursor, hf_homeplug_bcn_fbn, 1, FALSE);
1168 while (i_bridge < 2) {
1169 ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH,
1170 ett_homeplug_bridge, "Bridge #%d", fbn + i_bridge);
1171 ptvcursor_add(cursor, hf_homeplug_bcn_brda, 6, FALSE);
1172 num_das = tvb_get_guint8(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
1173 ptvcursor_add(cursor, hf_homeplug_bcn_bp_das, 1, FALSE);
1174 for (i_da = 0; i_da < num_das; i_da++) {
1175 ptvcursor_add(cursor, hf_homeplug_bcn_bp_da, 6, FALSE);
1177 ptvcursor_pop_subtree(cursor);
1180 ptvcursor_pop_subtree(cursor);
1183 /* Dissection of the Bridging Characteristics Local MME */
1184 static void dissect_homeplug_bcl(ptvcursor_t * cursor)
1186 proto_item * it = NULL;
1190 it = ptvcursor_add_no_advance(cursor, hf_homeplug_bcl, homeplug_melen, FALSE);
1192 ptvcursor_push_subtree(cursor, it, ett_homeplug_bcl);
1193 ptvcursor_add_no_advance(cursor, hf_homeplug_bcl_network, 1, FALSE);
1194 ptvcursor_add_no_advance(cursor, hf_homeplug_bcl_return, 1, FALSE);
1195 ptvcursor_add(cursor, hf_homeplug_bcl_rsvd, 1, FALSE);
1197 num_das = tvb_get_guint8(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
1198 ptvcursor_add(cursor, hf_homeplug_bcl_hprox_das, 1, FALSE);
1200 while (i_da < num_das) {
1201 it = ptvcursor_add(cursor, hf_homeplug_bcl_hpbda, 6, FALSE);
1204 ptvcursor_pop_subtree(cursor);
1207 /* Dissection of the Bridging Characteristics MME */
1208 static void dissect_homeplug_bc(ptvcursor_t * cursor, packet_info * pinfo)
1212 if (!ptvcursor_tree(cursor))
1215 network = tvb_get_guint8(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor))
1216 & HOMEPLUG_BC_NETWORK;
1218 /* Append Network/Local specifier to info column */
1219 if (check_col(pinfo->cinfo, COL_INFO))
1220 col_append_str(pinfo->cinfo, COL_INFO, network ? " Network" : " Local");
1222 /* Call specific dissector */
1224 dissect_homeplug_bcn(cursor);
1226 dissect_homeplug_bcl(cursor);
1229 /* Dissection of the Set Transmit Characteristics MME */
1230 static void dissect_homeplug_stc(ptvcursor_t * cursor)
1232 proto_item * it = NULL;
1234 if (!ptvcursor_tree(cursor))
1237 it = ptvcursor_add_no_advance(cursor, hf_homeplug_stc, homeplug_melen, FALSE);
1239 ptvcursor_push_subtree(cursor, it, ett_homeplug_stc);
1240 ptvcursor_add_no_advance(cursor, hf_homeplug_stc_lco, 1, FALSE);
1241 ptvcursor_add_no_advance(cursor, hf_homeplug_stc_encf, 1, FALSE);
1242 ptvcursor_add_no_advance(cursor, hf_homeplug_stc_txprio, 1, FALSE);
1243 ptvcursor_add_no_advance(cursor, hf_homeplug_stc_rexp, 1, FALSE);
1244 ptvcursor_add_no_advance(cursor, hf_homeplug_stc_txcf, 1, FALSE);
1245 ptvcursor_add_no_advance(cursor, hf_homeplug_stc_cftop, 1, FALSE);
1246 ptvcursor_add(cursor, hf_homeplug_stc_rsvd1, 1, FALSE);
1247 ptvcursor_add_no_advance(cursor, hf_homeplug_stc_retry, 1, FALSE);
1248 ptvcursor_add_no_advance(cursor, hf_homeplug_stc_rsvd2, 1, FALSE);
1249 ptvcursor_add_no_advance(cursor, hf_homeplug_stc_dder, 1, FALSE);
1250 ptvcursor_add_no_advance(cursor, hf_homeplug_stc_dur, 1, FALSE);
1251 ptvcursor_add_no_advance(cursor, hf_homeplug_stc_ebp, 1, FALSE);
1252 ptvcursor_add(cursor, hf_homeplug_stc_dees, 1, FALSE);
1253 ptvcursor_add(cursor, hf_homeplug_stc_txeks, 1, FALSE);
1255 ptvcursor_pop_subtree(cursor);
1260 /* Dissection of unknown tags */
1261 static void dissect_homeplug_unknown(ptvcursor_t * cursor)
1263 ptvcursor_add(cursor, hf_homeplug_data, homeplug_melen, FALSE);
1266 static void dissect_homeplug_mme(ptvcursor_t * cursor, packet_info * pinfo)
1268 if (check_col(pinfo->cinfo, COL_INFO)) {
1269 col_append_sep_str(pinfo->cinfo, COL_INFO, ", ",
1270 val_to_str(homeplug_metype, homeplug_metype_vals, "Unknown 0x%x"));
1273 switch(homeplug_metype) {
1274 case HOMEPLUG_MME_RCE:
1275 dissect_homeplug_rce(cursor);
1277 case HOMEPLUG_MME_CER:
1278 dissect_homeplug_cer(cursor);
1280 case HOMEPLUG_MME_VS:
1281 if (check_col(pinfo->cinfo, COL_INFO)) {
1282 col_set_str(pinfo->cinfo, COL_INFO, "Vendor Specific");
1284 dissect_homeplug_vs(cursor);
1286 case HOMEPLUG_MME_RBA:
1287 if (check_col(pinfo->cinfo, COL_INFO)) {
1288 col_set_str(pinfo->cinfo, COL_INFO, "Replace Bridge Address");
1290 dissect_homeplug_rba(cursor);
1292 case HOMEPLUG_MME_SNK:
1293 if (check_col(pinfo->cinfo, COL_INFO)) {
1294 col_set_str(pinfo->cinfo, COL_INFO, "Set Network Encryption Key");
1296 dissect_homeplug_snk(cursor);
1298 case HOMEPLUG_MME_MWR:
1299 if (check_col(pinfo->cinfo, COL_INFO)) {
1300 col_set_str(pinfo->cinfo, COL_INFO, "Multicast With Response");
1302 dissect_homeplug_mwr(cursor);
1304 case HOMEPLUG_MME_CNK:
1305 if (check_col(pinfo->cinfo, COL_INFO)) {
1306 col_set_str(pinfo->cinfo, COL_INFO, "Confirm Network Encryption Key");
1308 dissect_homeplug_cnk(cursor);
1310 case HOMEPLUG_MME_RPS:
1311 dissect_homeplug_rps(cursor);
1313 case HOMEPLUG_MME_PSR:
1314 dissect_homeplug_psr(cursor);
1316 case HOMEPLUG_MME_SLP:
1317 dissect_homeplug_slp(cursor);
1319 case HOMEPLUG_MME_LOADER:
1320 if (check_col(pinfo->cinfo, COL_INFO)) {
1321 col_set_str(pinfo->cinfo, COL_INFO, "Load Firmware");
1323 dissect_homeplug_loader(cursor, pinfo);
1325 case HOMEPLUG_MME_HREQ:
1326 if (check_col(pinfo->cinfo, COL_INFO)) {
1327 col_set_str(pinfo->cinfo, COL_INFO, "Host Request");
1329 dissect_homeplug_hreq(cursor, pinfo);
1331 case HOMEPLUG_MME_HRSP:
1332 if (check_col(pinfo->cinfo, COL_INFO)) {
1333 col_set_str(pinfo->cinfo, COL_INFO, "Host Response");
1335 dissect_homeplug_hrsp(cursor, pinfo);
1337 case HOMEPLUG_MME_HTAG:
1338 if (check_col(pinfo->cinfo, COL_INFO)) {
1339 col_set_str(pinfo->cinfo, COL_INFO, "Host Tag");
1341 dissect_homeplug_htag(cursor);
1343 case HOMEPLUG_MME_NS:
1344 dissect_homeplug_ns(cursor, pinfo);
1346 case HOMEPLUG_MME_BC:
1347 dissect_homeplug_bc(cursor, pinfo);
1349 case HOMEPLUG_MME_STC:
1350 dissect_homeplug_stc(cursor);
1353 dissect_homeplug_unknown(cursor);
1358 #define TVB_LEN_GREATEST 1
1359 #define TVB_LEN_UNDEF 0
1360 #define TVB_LEN_SHORTEST -1
1361 static int check_tvb_length(ptvcursor_t *cursor, const gint length)
1364 return TVB_LEN_UNDEF;
1366 if (tvb_reported_length_remaining(ptvcursor_tvbuff(cursor),
1367 ptvcursor_current_offset(cursor)) < length)
1368 return TVB_LEN_SHORTEST;
1370 return TVB_LEN_GREATEST;
1374 dissect_homeplug(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
1376 proto_item * it= NULL;
1377 proto_tree * homeplug_tree= NULL;
1378 ptvcursor_t * cursor= NULL;
1380 col_set_str(pinfo->cinfo, COL_PROTOCOL, "HomePlug");
1381 /* Clear out stuff in the info column */
1382 if (check_col(pinfo->cinfo, COL_INFO)) {
1383 col_set_str(pinfo->cinfo, COL_INFO, "MAC Management");
1386 homeplug_offset = 0;
1389 it = proto_tree_add_item(tree, proto_homeplug, tvb, homeplug_offset, -1, FALSE);
1390 homeplug_tree = proto_item_add_subtree(it, ett_homeplug);
1391 cursor = ptvcursor_new(homeplug_tree, tvb, 0);
1394 /* We do not have enough data to read mctrl field stop the dissection */
1395 if (check_tvb_length(cursor, HOMEPLUG_MCTRL_LEN) != TVB_LEN_SHORTEST) {
1397 dissect_homeplug_mctrl(cursor);
1399 /** homeplug_ne indicates the number of MME entries. This field is fetched
1402 if ((homeplug_ne > 0) && check_col(pinfo->cinfo, COL_INFO)) {
1403 col_clear(pinfo->cinfo, COL_INFO);
1405 for (; homeplug_ne > 0; homeplug_ne--) {
1407 /* Check we have enough data in tvb to read MEHDR */
1408 if (check_tvb_length(cursor, HOMEPLUG_MEHDR_LEN) == TVB_LEN_SHORTEST)
1410 dissect_homeplug_mehdr(cursor);
1412 /* Check we have enough data in tvb to read MELEN */
1413 if (check_tvb_length(cursor, HOMEPLUG_MELEN_LEN) == TVB_LEN_SHORTEST)
1415 dissect_homeplug_melen(cursor);
1417 dissect_homeplug_mme(cursor, pinfo);
1422 ptvcursor_free(cursor);
1427 proto_reg_handoff_homeplug(void)
1429 dissector_handle_t homeplug_handle;
1431 homeplug_handle = create_dissector_handle(dissect_homeplug, proto_homeplug);
1432 dissector_add("ethertype", ETHERTYPE_HOMEPLUG, homeplug_handle);
1436 proto_register_homeplug(void)
1439 static hf_register_info hf[] = {
1440 /* MAC Control Field */
1441 { &hf_homeplug_mctrl,
1442 { "MAC Control Field", "homeplug.mctrl",
1443 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1446 { &hf_homeplug_mctrl_reserved,
1447 { "Reserved", "homeplug.mctrl.rsvd",
1448 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_MCTRL_RSVD, NULL, HFILL }
1451 { &hf_homeplug_mctrl_ne,
1452 { "Number of MAC Data Entries", "homeplug.mctrl.ne",
1453 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_MCTRL_NE, NULL, HFILL }
1456 /* MAC Entry Header */
1457 { &hf_homeplug_mehdr,
1458 { "MAC Management Entry Header", "homeplug.mehdr",
1459 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1462 { &hf_homeplug_mehdr_mev,
1463 { "MAC Entry Version", "homeplug.mehdr.mev",
1464 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_MEHDR_MEV, NULL, HFILL }
1467 { &hf_homeplug_mehdr_metype,
1468 { "MAC Entry Type", "homeplug.mehdr.metype",
1469 FT_UINT8, BASE_HEX, VALS(homeplug_metype_vals), HOMEPLUG_MEHDR_METYPE, NULL, HFILL }
1473 { &hf_homeplug_melen,
1474 { "MAC Management Entry Length", "homeplug.melen",
1475 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1478 /* MAC Management Entry */
1480 { "MAC Management Entry Data", "homeplug.mmentry",
1481 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1484 /* Request Channel Estimation */
1486 { "Request Channel Estimation", "homeplug.rce",
1487 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1490 { &hf_homeplug_rce_cev,
1491 { "Channel Estimation Version", "homeplug.rce.cev",
1492 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_RCE_CEV, NULL, HFILL }
1495 { &hf_homeplug_rce_rsvd,
1496 { "Reserved", "homeplug.rce.rsvd",
1497 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_RCE_RSVD, NULL, HFILL }
1500 /* Channel Estimation Response */
1502 { "Channel Estimation Response", "homeplug.cer",
1503 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1506 { &hf_homeplug_cer_cerv,
1507 { "Channel Estimation Response Version", "homeplug.cer.cerv",
1508 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_CER_CERV, NULL, HFILL }
1511 { &hf_homeplug_cer_rsvd1,
1512 { "Reserved", "homeplug.cer.rsvd1",
1513 FT_UINT16, BASE_DEC, NULL, HOMEPLUG_CER_RSVD, NULL, HFILL }
1516 { &hf_homeplug_cer_rxtmi,
1517 { "Receive Tone Map Index", "homeplug.cer.rxtmi",
1518 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_CER_RXTMI, NULL, HFILL }
1521 /* TODO must append vt[79-0] */
1523 { &hf_homeplug_cer_vt,
1524 {"Valid Tone Flags", "homeplug.cer.vt",
1525 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }
1528 { &hf_homeplug_cer_rate,
1529 { "FEC Rate", "homeplug.cer.rate",
1530 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_CER_RATE, NULL, HFILL }
1533 { &hf_homeplug_cer_bp,
1534 { "Bridge Proxy", "homeplug.cer.bp",
1535 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_CER_BP, NULL, HFILL }
1538 { &hf_homeplug_cer_mod,
1539 { "Modulation Method", "homeplug.cer.mod",
1540 FT_UINT8, BASE_DEC, VALS(homeplug_cer_mod_vals), HOMEPLUG_CER_MOD_MASK,
1544 { &hf_homeplug_cer_vt11,
1545 { "Valid Tone Flags [83-80]", "homeplug.cer.vt11",
1546 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_CER_VT11, NULL, HFILL }
1549 { &hf_homeplug_cer_rsvd2,
1550 { "Reserved", "homeplug.cer.rsvd2",
1551 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_CER_RSVD2, NULL, HFILL }
1554 { &hf_homeplug_cer_nbdas,
1555 { "Number Bridged Destination Addresses", "homeplug.cer.nbdas",
1556 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_CER_NBDAS, NULL, HFILL }
1559 { &hf_homeplug_cer_bda,
1560 { "Bridged Destination Address", "homeplug.cer.bda",
1561 FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }
1564 /* Replace Bridge Address */
1566 { "Replace Bridge Address", "homeplug.rba",
1567 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1570 /* Vendor Specific */
1572 { "Vendor Specific", "homeplug.vs",
1573 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1576 { &hf_homeplug_vs_dir,
1577 { "Direction", "homeplug.vs.dir",
1578 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_VS_DIR, NULL, HFILL }
1581 { &hf_homeplug_vs_mid,
1582 { "Message ID", "homeplug.vs.mid",
1583 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_VS_MID, NULL, HFILL }
1586 { &hf_homeplug_vs_oui,
1587 { "OUI", "homeplug.vs.oui",
1588 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL }
1591 /* Set Network Encryption Key */
1593 { "Set Network Encryption Key", "homeplug.snk",
1594 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1597 { &hf_homeplug_snk_eks,
1598 { "Encryption Key Select", "homeplug.snk.eks",
1599 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1602 { &hf_homeplug_snk_nek,
1603 { "Network Encryption Key", "homeplug.snk.nek",
1604 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
1607 /* Multicast With Response */
1609 { "Multicast With Response", "homeplug.mwr",
1610 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1613 /* Confirm Network Encryption Key */
1615 { "Confirm Network Encryption Key", "homeplug.cnk",
1616 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1620 { &hf_homeplug_htag,
1621 { "Host Tag", "homeplug.htag",
1622 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1625 /* Request Parameters and Statistics */
1627 { "Request Parameters and Statistics", "homeplug.rps",
1628 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1631 /* Parameters and Statistics Response */
1633 { "Parameters and Statistics Response", "homeplug.psr",
1634 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1637 { &hf_homeplug_psr_txack,
1638 { "Transmit ACK Counter", "homeplug.psr.txack",
1639 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1642 { &hf_homeplug_psr_txnack,
1643 { "Transmit NACK Counter", "homeplug.psr.txnack",
1644 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1647 { &hf_homeplug_psr_txfail,
1648 { "Transmit FAIL Counter", "homeplug.psr.txfail",
1649 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1652 { &hf_homeplug_psr_txcloss,
1653 { "Transmit Contention Loss Counter", "homeplug.psr.txcloss",
1654 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1657 { &hf_homeplug_psr_txcoll,
1658 { "Transmit Collision Counter", "homeplug.psr.txcoll",
1659 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1662 { &hf_homeplug_psr_txca3lat,
1663 { "Transmit CA3 Latency Counter", "homeplug.psr.txca3lat",
1664 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1667 { &hf_homeplug_psr_txca2lat,
1668 { "Transmit CA2 Latency Counter", "homeplug.psr.txca2lat",
1669 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1671 { &hf_homeplug_psr_txca1lat,
1672 { "Transmit CA1 Latency Counter", "homeplug.psr.txca1lat",
1673 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1675 { &hf_homeplug_psr_txca0lat,
1676 { "Transmit CA0 Latency Counter", "homeplug.psr.txca0lat",
1677 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1680 { &hf_homeplug_psr_rxbp40,
1681 { "Receive Cumulative Bytes per 40-symbol", "homeplug.psr.rxbp40",
1682 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }
1685 /* Set Local Parameters */
1687 { "Set Local Parameters", "homeplug.slp",
1688 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1691 { &hf_homeplug_slp_ma,
1692 { "MAC Address", "homeplug.slp.ma",
1693 FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }
1697 { &hf_homeplug_loader,
1698 { "Loader", "homeplug.leader",
1699 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1702 { &hf_homeplug_loader_mid,
1703 { "Message ID", "homeplug.loader.mid",
1704 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1707 { &hf_homeplug_loader_length,
1708 { "Length", "homeplug.loader.length",
1709 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1712 { &hf_homeplug_loader_status,
1713 { "Status", "homeplug.loader.status",
1714 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1717 { &hf_homeplug_loader_version,
1718 { "Version", "homeplug.loader.version",
1719 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
1722 { &hf_homeplug_loader_gdfv,
1723 { "Get Device/Firmware Version", "homeplug.loader.gdfv",
1724 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1727 { &hf_homeplug_loader_lsf,
1728 { "Start Firmware", "homeplug.loader.lsf",
1729 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1732 { &hf_homeplug_loader_lwm,
1733 { "Write Memory", "homeplug.loader.lwm",
1734 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1737 { &hf_homeplug_loader_lrm,
1738 { "Read Memory", "homeplug.loader.lrm",
1739 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1742 { &hf_homeplug_loader_lrnvm,
1743 { "Read NVM Data", "homeplug.loader.lrnvm",
1744 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1747 { &hf_homeplug_loader_lwnvm,
1748 { "Write NVM Data", "homeplug.loader.lrnvm",
1749 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1752 { &hf_homeplug_loader_lreset,
1753 { "Reset", "homeplug.loader.mid",
1754 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1757 { &hf_homeplug_loader_gmd,
1758 { "Get Module Data", "homeplug.loader.gmd",
1759 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1762 { &hf_homeplug_loader_smd,
1763 { "Set Module Data", "homeplug.loader.smd",
1764 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1767 { &hf_homeplug_loader_module_id,
1768 { "Module ID", "homeplug.loader.module.id",
1769 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }
1772 { &hf_homeplug_loader_module_offset,
1773 { "Offset", "homeplug.loader.module.offset",
1774 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }
1777 { &hf_homeplug_loader_module_size,
1778 { "Module size", "homeplug.loader.module.size",
1779 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }
1782 { &hf_homeplug_loader_data_length,
1783 { "Data length", "homeplug.loader.data.length",
1784 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1787 { &hf_homeplug_loader_data_address,
1788 { "Address", "homeplug.loader.data.address",
1789 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }
1792 { &hf_homeplug_loader_data,
1793 { "Data", "homeplug.loader.data",
1794 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
1797 { &hf_homeplug_loader_cm,
1798 { "Commit Modules", "homeplug.loader.cm",
1799 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1802 { &hf_homeplug_loader_lemd,
1803 { "Erase Module Data", "homeplug.loader.emd",
1804 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1807 { &hf_homeplug_loader_lenvms,
1808 { "Erase NVM Sectors", "homeplug.loader.lenvms",
1809 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1812 { &hf_homeplug_loader_gnvmp,
1813 { "Get NVM Parameters", "homeplug.loader.nvmp",
1814 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1817 { &hf_homeplug_loader_nvmp_type,
1818 { "Type", "homeplug.loader.nvmp.type",
1819 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }
1822 { &hf_homeplug_loader_nvmp_pagesize,
1823 { "Page Size", "homeplug.loader.nvmp.pagesize",
1824 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }
1827 { &hf_homeplug_loader_nvmp_blocksize,
1828 { "Block Size", "homeplug.loader.nvmp.blocksize",
1829 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }
1832 { &hf_homeplug_loader_nvmp_memorysize,
1833 { "Memory Size", "homeplug.loader.nvmp.memorysize",
1834 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }
1837 { &hf_homeplug_loader_snvmp,
1838 { "Set NVM Parameters", "homeplug.loader.nvmp",
1839 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1843 { &hf_homeplug_hreq,
1844 { "Host Request", "homeplug.hreq",
1845 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1848 { &hf_homeplug_hreq_mid,
1849 { "Message ID", "homeplug.hreq.mid",
1850 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1853 { &hf_homeplug_hreq_gdv,
1854 { "Get Device Version", "homeplug.hreq.gdv",
1855 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1858 { &hf_homeplug_hreq_gfv,
1859 { "Get Firmware Version", "homeplug.hreq.gfv",
1860 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1863 { &hf_homeplug_hreq_gnek,
1864 { "Get Network Encryption Key", "homeplug.hreq.gnek",
1865 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1868 { &hf_homeplug_hreq_gclbpl,
1869 { "Get/Clear Local Bridge Proxy List", "homeplug.hreq.gclbpl",
1870 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1873 { &hf_homeplug_hreq_nvds,
1874 { "Non-volatile Database Status", "homeplug.hreq.nvds",
1875 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1878 { &hf_homeplug_hreq_grbt,
1879 { "Get Remote Bridge Table", "homeplug.hreq.grbt",
1880 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1883 { &hf_homeplug_hreq_gslnm,
1884 { "Get/Set Logical Network Mapping", "homeplug.hreq.gslnm",
1885 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1888 { &hf_homeplug_hreq_gsss,
1889 { "Get/Set Spectral Scaling", "homeplug.hreq.gsss",
1890 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1893 { &hf_homeplug_hreq_rsl,
1894 { "Reset Secondary Loader", "homeplug.hreq.rsl",
1895 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1898 { &hf_homeplug_hreq_reset,
1899 { "Reset", "homeplug.hreq.reset",
1900 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1903 { &hf_homeplug_hreq_reset_type,
1904 { "Type", "homeplug.hreq.reset.type",
1905 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1908 { &hf_homeplug_hreq_reset_delay,
1909 { "Delay", "homeplug.hreq.reset.delay",
1910 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1914 { &hf_homeplug_hrsp,
1915 { "Host Response", "homeplug.hrsp",
1916 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1919 { &hf_homeplug_hrsp_mid,
1920 { "Message ID", "homeplug.hrsp.mid",
1921 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1924 { &hf_homeplug_hrsp_gdvr,
1925 { "Get Device Version", "homeplug.hrsp.gdvr",
1926 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1929 { &hf_homeplug_hrsp_gfvr,
1930 { "Get Firmware Version", "homeplug.hrsp.gfvr",
1931 FT_UINT8, BASE_DEC, NULL, 0x0, "Get Firmwave Version", HFILL }
1934 { &hf_homeplug_hrsp_gnekr,
1935 { "Get Network Encryption Key", "homeplug.hrsp.gnekr",
1936 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1939 { &hf_homeplug_hrsp_gnekr_select,
1940 { "Key Select", "homeplug.hrsp.gnekr.select",
1941 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1944 { &hf_homeplug_hrsp_gnekr_key,
1945 { "Key", "homeplug.hrsp.gnekr.key",
1946 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL }
1949 { &hf_homeplug_hrsp_invalid,
1950 { "Invalid", "homeplug.hrsp.invalid",
1951 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
1954 { &hf_homeplug_hrsp_version,
1955 { "Version", "homeplug.hrsp.version",
1956 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
1959 /* Network Statistics */
1961 { "Network Statistics", "homeplug.ns",
1962 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
1965 { &hf_homeplug_ns_extended,
1966 { "Network Statistics is Extended", "homeplug.ns.extended",
1967 FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Network Statistics is Extended (MELEN >= 199)", HFILL }
1970 { &hf_homeplug_ns_netw_ctrl_ac,
1971 { "Action Control", "homeplug.ns.ac",
1972 FT_BOOLEAN, 8, TFS(&homeplug_ns_ac_vals), HOMEPLUG_NS_AC, NULL, HFILL }
1975 { &hf_homeplug_ns_netw_ctrl_icid,
1976 { "IC_ID", "homeplug.ns.icid",
1977 FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(homeplug_ns_icid_vals), HOMEPLUG_NS_ICID, NULL, HFILL }
1980 { &hf_homeplug_ns_bytes40_robo,
1981 { "Bytes in 40 symbols in ROBO", "homeplug.ns.bytes40_robo",
1982 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1985 { &hf_homeplug_ns_fails_robo,
1986 { "Fails Received in ROBO", "homeplug.ns.fails_robo",
1987 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1990 { &hf_homeplug_ns_drops_robo,
1991 { "Frame Drops in ROBO", "homeplug.ns.drops_robo",
1992 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
1995 { &hf_homeplug_ns_netw_da,
1996 { "Address of Network DA", "homeplug.ns.netw_da",
1997 FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }
2000 { &hf_homeplug_ns_bytes40,
2001 { "Bytes in 40 symbols", "homeplug.ns.bytes40",
2002 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
2005 { &hf_homeplug_ns_fails,
2006 { "Fails Received", "homeplug.ns.fails",
2007 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
2010 { &hf_homeplug_ns_drops,
2011 { "Frame Drops", "homeplug.ns.drops",
2012 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
2016 { &hf_homeplug_ns_tx_bfr_state,
2017 { "Transmit Buffer State", "homeplug.ns.tx_bfr_state",
2018 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
2021 { &hf_homeplug_ns_buf_in_use,
2022 { "Buffer in use", "homeplug.ns.buf_in_use",
2023 FT_BOOLEAN, 8, TFS(&homeplug_ns_buf_in_use_vals), HOMEPLUG_NS_BUF_IN_USE,
2024 "Buffer in use (1) or Available (0)", HFILL }
2027 { &hf_homeplug_ns_prio,
2028 { "Priority", "homeplug.ns.prio",
2029 FT_UINT8, BASE_DEC, VALS(homeplug_txprio_vals), HOMEPLUG_NS_PRIO,
2033 { &hf_homeplug_ns_msdu_len,
2034 { "MSDU Length", "homeplug.ns.msdu_len",
2035 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_NS_MSDU_LEN, NULL, HFILL }
2038 { &hf_homeplug_ns_seqn,
2039 { "Sequence Number", "homeplug.ns.seqn",
2040 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_NS_SEQN, NULL, HFILL }
2043 { &hf_homeplug_ns_toneidx,
2044 { "Transmit tone map index", "homeplug.ns.toneidx",
2045 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_NS_TONEIDX,
2046 "Maps to the 16 statistics occurring earlier in this MME", HFILL }
2049 /* Bridging Characteristics Network */
2051 { "Bridging Characteristics Network", "homeplug.bcn",
2052 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
2055 { &hf_homeplug_bcn_network,
2056 { "Network", "homeplug.bcn.network",
2057 FT_BOOLEAN, 8, TFS(&homeplug_bc_network_vals), HOMEPLUG_BC_NETWORK,
2058 "Local (0) or Network Bridge (1) Information", HFILL }
2061 { &hf_homeplug_bcn_return,
2062 { "Return/Set", "homeplug.bcn.return",
2063 FT_BOOLEAN, 8, TFS(&homeplug_bc_return_vals), HOMEPLUG_BC_RETURN,
2064 "From host: Return (1) or set bridging characteristics (0)", HFILL }
2067 { &hf_homeplug_bcn_rsvd,
2068 { "Reserved", "homeplug.bcn.rsvd",
2069 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_BCN_RSVD, NULL, HFILL }
2072 { &hf_homeplug_bcn_fbn,
2073 { "First Bridge Number", "homeplug.bcn.fbn",
2074 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_BCN_FBN, NULL, HFILL }
2077 { &hf_homeplug_bcn_brda,
2078 { "Address of Bridge", "homeplug.bcn.brda",
2079 FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }
2082 { &hf_homeplug_bcn_bp_das,
2083 { "Number of bridge proxied DAs", "homeplug.bcn.bp_das",
2084 FT_UINT8, BASE_DEC, NULL, 0x0,
2085 "Number of bridge proxied DAs supported", HFILL }
2088 { &hf_homeplug_bcn_bp_da,
2089 { "Bridged DA", "homeplug.bcn.bp_da",
2090 FT_ETHER, BASE_NONE, NULL, 0x0, "Bridged Destination Address", HFILL }
2093 /* Bridging Characteristics Local */
2095 { "Bridging Characteristics Local", "homeplug.bcl",
2096 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
2099 { &hf_homeplug_bcl_network,
2100 { "Network/Local", "homeplug.bcl.network",
2101 FT_BOOLEAN, 8, TFS(&homeplug_bc_network_vals), HOMEPLUG_BC_NETWORK,
2102 "Local (0) or Network Bridge (1) Information", HFILL }
2105 { &hf_homeplug_bcl_return,
2106 { "Return/Set", "homeplug.bcl.return",
2107 FT_BOOLEAN, 8, TFS(&homeplug_bc_return_vals), HOMEPLUG_BC_RETURN,
2108 "From host: Return (1) or set bridging characteristics (0)", HFILL }
2111 { &hf_homeplug_bcl_rsvd,
2112 { "Reserved", "homeplug.bcl.rsvd",
2113 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_BCL_RSVD, NULL, HFILL }
2116 { &hf_homeplug_bcl_hprox_das,
2117 { "Number of host proxied DAs", "homeplug.bcl.hprox_das",
2118 FT_UINT8, BASE_DEC, NULL, 0x0,
2119 "Number of host proxied DAs supported by the bridge application", HFILL }
2122 { &hf_homeplug_bcl_hpbda,
2123 { "Host Proxied DA", "homeplug.bcl.hpbda",
2124 FT_ETHER, BASE_NONE, NULL, 0x0, "Host Proxied Bridged Destination Address", HFILL }
2127 /* Set Transmit Characteristics */
2129 { "Set Transmit Characteristics", "homeplug.stc",
2130 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
2133 { &hf_homeplug_stc_lco,
2134 { "Local Consumption Only", "homeplug.stc.lco",
2135 FT_BOOLEAN, 8, NULL, HOMEPLUG_STC_LCO,
2136 "Do not transmit subsequent frames to medium", HFILL }
2139 { &hf_homeplug_stc_encf,
2140 { "Encryption Flag", "homeplug.stc.encf",
2141 FT_BOOLEAN, 8, NULL, HOMEPLUG_STC_ENCF, "Encrypt subsequent frames", HFILL }
2144 { &hf_homeplug_stc_txprio,
2145 { "Transmit Priority", "homeplug.stc.txprio",
2146 FT_UINT8, BASE_DEC, VALS(homeplug_txprio_vals), HOMEPLUG_STC_TXPRIO,
2150 { &hf_homeplug_stc_rexp,
2151 { "Response Expected", "homeplug.stc.rexp",
2152 FT_BOOLEAN, 8, NULL, HOMEPLUG_STC_REXP,
2153 "Mark subsequent frames to receive response", HFILL }
2156 { &hf_homeplug_stc_txcf,
2157 { "Transmit Contention Free", "homeplug.stc.txcf",
2158 FT_BOOLEAN, 8, NULL, HOMEPLUG_STC_TXCF,
2159 "Mark subsequently transmitted frames as contention free", HFILL }
2162 { &hf_homeplug_stc_cftop,
2163 { "Contention Free Transmit Override Priority", "homeplug.stc.cftop",
2164 FT_BOOLEAN, 8, TFS(&homeplug_stc_cftop_vals), HOMEPLUG_STC_CFTOP,
2165 "Transmit subsequent contention free frames with CA2/CA3 priority", HFILL }
2168 { &hf_homeplug_stc_rsvd1,
2169 { "Reserved", "homeplug.stc.rsvd1",
2170 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_STC_RSVD1, NULL, HFILL }
2173 { &hf_homeplug_stc_retry,
2174 { "Retry Control", "homeplug.stc.retry",
2175 FT_UINT8, BASE_DEC, VALS(homeplug_stc_retry_vals), HOMEPLUG_STC_RETRY,
2179 { &hf_homeplug_stc_rsvd2,
2180 { "Reserved", "homeplug.stc.rsvd2",
2181 FT_UINT8, BASE_DEC, NULL, HOMEPLUG_STC_RSVD2, NULL, HFILL }
2184 { &hf_homeplug_stc_dder,
2185 { "Disable Default Encryption Receive", "homeplug.stc.dder",
2186 FT_BOOLEAN, 8, NULL, HOMEPLUG_STC_DDER, NULL, HFILL }
2189 { &hf_homeplug_stc_dur,
2190 { "Disable Unencrypted Receive", "homeplug.stc.dur",
2191 FT_BOOLEAN, 8, NULL, HOMEPLUG_STC_DUR, NULL, HFILL }
2194 { &hf_homeplug_stc_ebp,
2195 { "INT51X1 (Host/DTE Option) Enable Backpressure", "homeplug.stc.ebp",
2196 FT_BOOLEAN, 8, NULL, HOMEPLUG_STC_EBP,
2200 { &hf_homeplug_stc_dees,
2201 { "Disable EEPROM Save", "homeplug.stc.dees",
2202 FT_BOOLEAN, 8, NULL, HOMEPLUG_STC_DEES, NULL, HFILL }
2205 { &hf_homeplug_stc_txeks,
2206 { "EKS to be used for encryption", "homeplug.stc.txeks",
2207 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
2210 /* Undecoded data */
2211 { &hf_homeplug_data,
2212 { "Data", "homeplug.data",
2213 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
2217 /* Setup protocol subtree array */
2218 static gint *ett[] = {
2220 &ett_homeplug_mctrl,
2221 &ett_homeplug_mehdr,
2225 &ett_homeplug_vs_mid,
2230 &ett_homeplug_loader,
2234 &ett_homeplug_tx_bfr_state,
2237 &ett_homeplug_bridge,
2242 proto_homeplug = proto_register_protocol("HomePlug protocol", "HomePlug", "homeplug");
2244 proto_register_field_array(proto_homeplug, hf, array_length(hf));
2246 proto_register_subtree_array(ett, array_length(ett));