2 * Routines for homeplug dissection
4 * Copyright 2006, Sebastien Tandel <sebastien[AT]tandel.be>
5 * Copyright 2009, Luca Ceresoli <luca[AT]lucaceresoli.net>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
16 #include <epan/packet.h>
17 #include <epan/expert.h>
20 #include <epan/etypes.h>
22 #include <epan/ptvcursor.h>
24 void proto_reg_handoff_homeplug(void);
25 void proto_register_homeplug(void);
27 static dissector_handle_t homeplug_handle
;
29 static int proto_homeplug
;
31 static int hf_homeplug_mctrl
;
32 static int hf_homeplug_mctrl_reserved
;
33 static int hf_homeplug_mctrl_ne
;
34 static int hf_homeplug_mehdr
;
35 static int hf_homeplug_mehdr_mev
;
36 static int hf_homeplug_mehdr_metype
;
37 static int hf_homeplug_melen
;
38 /* static int hf_homeplug_mme; */
39 /* Request Channel Estimation */
40 static int hf_homeplug_rce
;
41 static int hf_homeplug_rce_cev
;
42 static int hf_homeplug_rce_rsvd
;
43 /* Channel Estimation Response */
44 static int hf_homeplug_cer
;
45 static int hf_homeplug_cer_cerv
;
46 static int hf_homeplug_cer_rsvd1
;
47 static int hf_homeplug_cer_rxtmi
;
48 static int hf_homeplug_cer_vt
;
49 static int hf_homeplug_cer_rate
;
50 static int hf_homeplug_cer_bp
;
51 static int hf_homeplug_cer_mod
;
52 static int hf_homeplug_cer_vt11
;
53 static int hf_homeplug_cer_rsvd2
;
54 static int hf_homeplug_cer_nbdas
;
55 static int hf_homeplug_cer_bda
;
56 /* Replace Bridge Address */
57 static int hf_homeplug_rba
;
59 static int hf_homeplug_vs
;
60 static int hf_homeplug_vs_oui
;
61 static int hf_homeplug_vs_dir
;
62 static int hf_homeplug_vs_mid
;
63 /* Set Network Encryption Key */
64 static int hf_homeplug_snk
;
65 static int hf_homeplug_snk_eks
;
66 static int hf_homeplug_snk_nek
;
67 /* Multicast With Response */
68 static int hf_homeplug_mwr
;
69 /* Confirm Network Encryption Key */
70 static int hf_homeplug_cnk
;
72 static int hf_homeplug_htag
;
73 /* Request Parameters and Statistics */
74 static int hf_homeplug_rps
;
75 /* Parameters and Statistics Response */
76 static int hf_homeplug_psr
;
77 static int hf_homeplug_psr_txack
;
78 static int hf_homeplug_psr_txnack
;
79 static int hf_homeplug_psr_txfail
;
80 static int hf_homeplug_psr_txcloss
;
81 static int hf_homeplug_psr_txcoll
;
82 static int hf_homeplug_psr_txca3lat
;
83 static int hf_homeplug_psr_txca2lat
;
84 static int hf_homeplug_psr_txca1lat
;
85 static int hf_homeplug_psr_txca0lat
;
86 static int hf_homeplug_psr_rxbp40
;
87 /* Set Local Parameters */
88 static int hf_homeplug_slp
;
89 static int hf_homeplug_slp_ma
;
91 static int hf_homeplug_loader
;
92 static int hf_homeplug_loader_mid
;
93 static int hf_homeplug_loader_length
;
94 static int hf_homeplug_loader_status
;
95 static int hf_homeplug_loader_version
;
96 static int hf_homeplug_loader_gdfv
;
97 static int hf_homeplug_loader_lsf
;
98 static int hf_homeplug_loader_lwm
;
99 static int hf_homeplug_loader_lrm
;
100 static int hf_homeplug_loader_lrnvm
;
101 static int hf_homeplug_loader_lwnvm
;
102 static int hf_homeplug_loader_lreset
;
103 static int hf_homeplug_loader_gmd
;
104 static int hf_homeplug_loader_smd
;
105 static int hf_homeplug_loader_module_id
;
106 static int hf_homeplug_loader_module_offset
;
107 static int hf_homeplug_loader_module_size
;
108 static int hf_homeplug_loader_data_length
;
109 static int hf_homeplug_loader_data_address
;
110 static int hf_homeplug_loader_data
;
111 static int hf_homeplug_loader_cm
;
112 static int hf_homeplug_loader_lemd
;
113 static int hf_homeplug_loader_lenvms
;
114 static int hf_homeplug_loader_gnvmp
;
115 static int hf_homeplug_loader_snvmp
;
116 static int hf_homeplug_loader_nvmp_type
;
117 static int hf_homeplug_loader_nvmp_pagesize
;
118 static int hf_homeplug_loader_nvmp_blocksize
;
119 static int hf_homeplug_loader_nvmp_memorysize
;
121 static int hf_homeplug_hreq
;
122 static int hf_homeplug_hreq_mid
;
123 static int hf_homeplug_hreq_gdv
;
124 static int hf_homeplug_hreq_gfv
;
125 static int hf_homeplug_hreq_gnek
;
126 static int hf_homeplug_hreq_gclbpl
;
127 static int hf_homeplug_hreq_nvds
;
128 static int hf_homeplug_hreq_grbt
;
129 static int hf_homeplug_hreq_gslnm
;
130 static int hf_homeplug_hreq_gsss
;
131 static int hf_homeplug_hreq_rsl
;
132 static int hf_homeplug_hreq_reset
;
133 static int hf_homeplug_hreq_reset_type
;
134 static int hf_homeplug_hreq_reset_delay
;
136 static int hf_homeplug_hrsp
;
137 static int hf_homeplug_hrsp_mid
;
138 static int hf_homeplug_hrsp_gdvr
;
139 static int hf_homeplug_hrsp_gfvr
;
140 static int hf_homeplug_hrsp_gnekr
;
141 static int hf_homeplug_hrsp_gnekr_select
;
142 static int hf_homeplug_hrsp_gnekr_key
;
143 static int hf_homeplug_hrsp_invalid
;
144 static int hf_homeplug_hrsp_version
;
145 /* Network Statistics */
146 static int hf_homeplug_ns
;
147 static int hf_homeplug_ns_extended
;
149 static int hf_homeplug_ns_netw_ctrl_ac
;
150 static int hf_homeplug_ns_netw_ctrl_icid
;
151 static int hf_homeplug_ns_bytes40_robo
;
152 static int hf_homeplug_ns_mhz
;
153 static int hf_homeplug_ns_fails_robo
;
154 static int hf_homeplug_ns_drops_robo
;
155 static int hf_homeplug_ns_netw_da
;
156 static int hf_homeplug_ns_bytes40
;
157 static int hf_homeplug_ns_fails
;
158 static int hf_homeplug_ns_drops
;
160 /* static int hf_homeplug_ns_tx_bfr_state; */
161 static int hf_homeplug_ns_buf_in_use
;
162 static int hf_homeplug_ns_prio
;
163 static int hf_homeplug_ns_msdu_len
;
164 static int hf_homeplug_ns_seqn
;
165 static int hf_homeplug_ns_toneidx
;
166 /* Bridging Characteristics Network */
167 static int hf_homeplug_bcn
;
168 static int hf_homeplug_bcn_network
;
169 static int hf_homeplug_bcn_return
;
170 static int hf_homeplug_bcn_rsvd
;
171 static int hf_homeplug_bcn_fbn
;
172 static int hf_homeplug_bcn_brda
;
173 static int hf_homeplug_bcn_bp_das
;
174 static int hf_homeplug_bcn_bp_da
;
175 /* Bridging Characteristics Local */
176 static int hf_homeplug_bcl
;
177 static int hf_homeplug_bcl_network
;
178 static int hf_homeplug_bcl_return
;
179 static int hf_homeplug_bcl_rsvd
;
180 static int hf_homeplug_bcl_hprox_das
;
181 static int hf_homeplug_bcl_hpbda
;
182 /* Set Transmit Characteristics */
183 static int hf_homeplug_stc
;
184 static int hf_homeplug_stc_lco
;
185 static int hf_homeplug_stc_encf
;
186 static int hf_homeplug_stc_txprio
;
187 static int hf_homeplug_stc_rexp
;
188 static int hf_homeplug_stc_txcf
;
189 static int hf_homeplug_stc_cftop
;
190 static int hf_homeplug_stc_rsvd1
;
191 static int hf_homeplug_stc_retry
;
192 static int hf_homeplug_stc_rsvd2
;
193 static int hf_homeplug_stc_dder
;
194 static int hf_homeplug_stc_dur
;
195 static int hf_homeplug_stc_ebp
;
196 static int hf_homeplug_stc_dees
;
197 static int hf_homeplug_stc_txeks
;
198 static int hf_homeplug_data
;
200 static int ett_homeplug
;
201 static int ett_homeplug_mctrl
;
202 static int ett_homeplug_mehdr
;
203 static int ett_homeplug_vs_mid
;
204 static int ett_homeplug_rce
;
205 static int ett_homeplug_cer
;
206 static int ett_homeplug_vs
;
207 static int ett_homeplug_snk
;
208 static int ett_homeplug_rps
;
209 static int ett_homeplug_psr
;
210 static int ett_homeplug_slp
;
211 static int ett_homeplug_loader
;
212 static int ett_homeplug_hreq
;
213 static int ett_homeplug_hrsp
;
214 static int ett_homeplug_ns
;
215 static int ett_homeplug_tone
;
216 static int ett_homeplug_tx_bfr_state
;
217 static int ett_homeplug_bridge
;
218 static int ett_homeplug_bcn
;
219 static int ett_homeplug_bcl
;
220 static int ett_homeplug_stc
;
222 static expert_field ei_homeplug_tone_map_not_exist
;
224 static uint8_t homeplug_ne
;
225 static uint8_t homeplug_melen
;
226 static uint8_t homeplug_metype
;
228 static uint32_t homeplug_offset
;
232 #define HOMEPLUG_MME_RCE 0x00
233 #define HOMEPLUG_MME_CER 0x01
234 #define HOMEPLUG_MME_VS 0x02
235 #define HOMEPLUG_MME_RBA 0x03
236 #define HOMEPLUG_MME_SNK 0x04
237 #define HOMEPLUG_MME_MWR 0x05
238 #define HOMEPLUG_MME_CNK 0x06
239 #define HOMEPLUG_MME_RPS 0x07
240 #define HOMEPLUG_MME_PSR 0x08
241 #define HOMEPLUG_MME_SLP 0x19
242 #define HOMEPLUG_MME_LOADER 0x10
243 #define HOMEPLUG_MME_HREQ 0x12
244 #define HOMEPLUG_MME_HRSP 0x13
245 #define HOMEPLUG_MME_HTAG 0x14
246 #define HOMEPLUG_MME_NS 0x1A
247 #define HOMEPLUG_MME_RES 0x1B
248 #define HOMEPLUG_MME_PS 0x1C
249 #define HOMEPLUG_MME_SLO 0x1D
250 #define HOMEPLUG_MME_BC 0x1E
251 #define HOMEPLUG_MME_STC 0x1F
252 static const value_string homeplug_metype_vals
[] = {
253 { HOMEPLUG_MME_RCE
, "Request Channel Estimation" },
254 { HOMEPLUG_MME_CER
, "Channel Estimation Response" },
255 { HOMEPLUG_MME_VS
, "Vendor Specific" },
256 { HOMEPLUG_MME_RBA
, "Replace Bridge Address" },
257 { HOMEPLUG_MME_SNK
, "Set Network Encryption Key" },
258 { HOMEPLUG_MME_MWR
, "Multicast With Response" },
259 { HOMEPLUG_MME_CNK
, "Confirm Network Encryption Key" },
260 { HOMEPLUG_MME_RPS
, "Request Parameters and Statistics" },
261 { HOMEPLUG_MME_PSR
, "Parameters and Statistics Response" },
262 { HOMEPLUG_MME_SLP
, "Set Local Parameters" },
263 { HOMEPLUG_MME_NS
, "Network Statistics" },
264 { HOMEPLUG_MME_RES
, "Reserved" },
265 { HOMEPLUG_MME_PS
, "Performance Statistics" },
266 { HOMEPLUG_MME_SLO
, "Set Local Overrides" },
267 { HOMEPLUG_MME_BC
, "Bridging Characteristics" },
268 { HOMEPLUG_MME_STC
, "Set Transmit Characteristics" },
272 /* MID Values, second field is METYPE they occur in */
273 #define HOMEPLUG_MID_GDD 16 /* 0x02 */
274 #define HOMEPLUG_MID_GCC 24 /* 0x02 */
275 #define HOMEPLUG_MID_GEC 25 /* 0x02 */
276 #define HOMEPLUG_MID_PRE 96 /* 0x02 */
277 #define HOMEPLUG_MID_PSI 97 /* 0x02 */
279 #define HOMEPLUG_MID_LGDFV 1 /* 0x10 */
280 #define HOMEPLUG_MID_LSF 2 /* 0x10 */
281 #define HOMEPLUG_MID_LWM 4 /* 0x10 */
282 #define HOMEPLUG_MID_LRM 9 /* 0x10 */
283 #define HOMEPLUG_MID_LRNVM 21 /* 0x10 */
284 #define HOMEPLUG_MID_LWNVM 22 /* 0x10 */
285 #define HOMEPLUG_MID_LRESET 127 /* 0x10 */
286 #define HOMEPLUG_MID_GMD 128 /* 0x10 */
287 #define HOMEPLUG_MID_SMD 129 /* 0x10 */
288 #define HOMEPLUG_MID_CM 130 /* 0x10 */
289 #define HOMEPLUG_MID_LEMD 132 /* 0x10 */
290 #define HOMEPLUG_MID_LENVMS 140 /* 0x10 */
291 #define HOMEPLUG_MID_GNVMP 141 /* 0x10 */
292 #define HOMEPLUG_MID_SNVMP 142 /* 0x10 */
294 #define HOMEPLUG_MID_GDV 1 /* 0x12 */
295 #define HOMEPLUG_MID_GFV 32 /* 0x12 */
296 #define HOMEPLUG_MID_GNEK 33 /* 0x12 */
297 #define HOMEPLUG_MID_GCLBPL 39 /* 0x12 */
298 #define HOMEPLUG_MID_NVDS 64 /* 0x12 */
299 #define HOMEPLUG_MID_GRBT 66 /* 0x12 */
300 #define HOMEPLUG_MID_GSLNM 68 /* 0x12 */
301 #define HOMEPLUG_MID_GSSS 72 /* 0x12 */
302 #define HOMEPLUG_MID_RSL 103 /* 0x12 */
303 #define HOMEPLUG_MID_RESET 127 /* 0x12 */
305 #define HOMEPLUG_MID_GDVR 1 /* 0x13 */
306 #define HOMEPLUG_MID_GFVR 32 /* 0x13 */
307 #define HOMEPLUG_MID_GNEKR 33 /* 0x13 */
308 #define HOMEPLUG_MID_INVALID 128 /* 0x13 */
310 #define HOMEPLUG_MID_EKT 1 /* 0x14 */
314 /* Bit mask Operation */
315 #define HOMEPLUG_MCTRL_RSVD 0x80
316 #define HOMEPLUG_MCTRL_NE 0x7F
318 #define HOMEPLUG_MEHDR_MEV 0xE0
319 #define HOMEPLUG_MEHDR_METYPE 0x1F
321 #define HOMEPLUG_VS_DIR 0x80
322 #define HOMEPLUG_VS_MID 0x3F
324 #define HOMEPLUG_NS_AC 0x80
325 #define HOMEPLUG_NS_ICID 0x7F
326 #define HOMEPLUG_NS_BUF_IN_USE 0x80
327 #define HOMEPLUG_NS_PRIO 0x60
328 #define HOMEPLUG_NS_MSDU_LEN 0x1F
329 #define HOMEPLUG_NS_SEQN 0xF0
330 #define HOMEPLUG_NS_TONEIDX 0x0F
332 /* string values in function of AC */
333 static const true_false_string homeplug_ns_ac_vals
= {
334 "(from host) Return basic network statistics",
335 "(from host) Clear basic network statistics"
338 /* string values in function of BUF_IN_USE */
339 static const true_false_string homeplug_ns_buf_in_use_vals
= {
341 "Buffer is available"
344 #define HOMEPLUG_RCE_CEV 0xF0
345 #define HOMEPLUG_RCE_RSVD 0x0F
347 #define HOMEPLUG_CER_CERV 0xF0
348 #define HOMEPLUG_CER_RSVD 0x0FE0
349 #define HOMEPLUG_CER_RXTMI 0x1F
350 #define HOMEPLUG_CER_RATE 0x80
351 #define HOMEPLUG_CER_BP 0x40
352 #define HOMEPLUG_CER_VT11 0x0F
353 #define HOMEPLUG_CER_RSVD2 0x80
354 #define HOMEPLUG_CER_NBDAS 0x7F
356 #define HOMEPLUG_BC_NETWORK 0x80
357 #define HOMEPLUG_BC_RETURN 0x40
358 #define HOMEPLUG_BCL_RSVD 0x3F
359 #define HOMEPLUG_BCN_RSVD 0x30
360 #define HOMEPLUG_BCN_FBN 0x0F
362 /* string values in function of BC_NETWORK */
363 static const true_false_string homeplug_bc_network_vals
= {
364 "Network bridge information",
365 "Local bridge information"
368 /* string values in function of BC_RETURN */
369 static const true_false_string homeplug_bc_return_vals
= {
370 "Return bridging characteristics",
371 "Set bridging characteristics"
374 #define HOMEPLUG_STC_LCO 0x80
375 #define HOMEPLUG_STC_ENCF 0x40
376 #define HOMEPLUG_STC_TXPRIO 0x30
377 #define HOMEPLUG_STC_REXP 0x08
378 #define HOMEPLUG_STC_TXCF 0x04
379 #define HOMEPLUG_STC_CFTOP 0x02
380 #define HOMEPLUG_STC_RSVD1 0x01
381 #define HOMEPLUG_STC_RETRY 0xC0
382 #define HOMEPLUG_STC_RSVD2 0x30
383 #define HOMEPLUG_STC_DDER 0x08
384 #define HOMEPLUG_STC_DUR 0x04
385 #define HOMEPLUG_STC_EBP 0x02
386 #define HOMEPLUG_STC_DEES 0x01
388 /* string values in function of CFTOP */
389 static const true_false_string homeplug_stc_cftop_vals
= {
394 /* string values in function of RETRY */
395 static const value_string homeplug_stc_retry_vals
[] = {
397 { 1, "One retry only"},
398 { 2, "Normal retries based on specification"},
403 /* Length of Network Statistics Response defines whether it is the Basic or
404 * the Extended Response */
405 #define HOMEPLUG_NS_BASIC_LEN 187
406 #define HOMEPLUG_NS_EXT_LEN 199
409 #define HOMEPLUG_NS_ICID5130A1 0x00
410 #define HOMEPLUG_NS_ICID51X1USB 0x01
411 #define HOMEPLUG_NS_ICID51X1PHY 0x02
412 #define HOMEPLUG_NS_ICID51X1HOST 0x03
413 #define HOMEPLUG_NS_ICID5130A2 0x04
414 #define HOMEPLUG_NS_ICID_RSVD_MIN 0x05
415 #define HOMEPLUG_NS_ICID_RSVD_MAX 0x7F
416 /* string values in function of IC_ID values */
417 static const range_string homeplug_ns_icid_vals
[] = {
418 { HOMEPLUG_NS_ICID5130A1
, HOMEPLUG_NS_ICID5130A1
, "INT5130A1" },
419 { HOMEPLUG_NS_ICID51X1USB
, HOMEPLUG_NS_ICID51X1USB
, "INT51X1 (USB Option)" },
420 { HOMEPLUG_NS_ICID51X1PHY
, HOMEPLUG_NS_ICID51X1PHY
, "INT51X1 (PHY Option)" },
421 { HOMEPLUG_NS_ICID51X1HOST
, HOMEPLUG_NS_ICID51X1HOST
, "INT51X1 (Host/DTE Option)" },
422 { HOMEPLUG_NS_ICID5130A2
, HOMEPLUG_NS_ICID5130A2
, "INT5130A2" },
423 { HOMEPLUG_NS_ICID_RSVD_MIN
, HOMEPLUG_NS_ICID_RSVD_MAX
, "Reserved"},
427 /* Modulation Method Bit Mask */
428 #define HOMEPLUG_CER_MOD_MASK 0x30
429 /* Modulation Method Values */
430 #define HOMEPLUG_CER_MOD_ROBO 0x00
431 #define HOMEPLUG_CER_MOD_DBPSK 0x01
432 #define HOMEPLUG_CER_MOD_DQPSK 0x02
433 #define HOMEPLUG_CER_MOD_RSVD 0x03
434 /* string values in function of Modulation Method Values */
435 static const value_string homeplug_cer_mod_vals
[] = {
436 { HOMEPLUG_CER_MOD_ROBO
, "ROBO Modulation"},
437 { HOMEPLUG_CER_MOD_DBPSK
, "DBPSK Modulation"},
438 { HOMEPLUG_CER_MOD_DQPSK
, "DQPSK Modulation"},
439 { HOMEPLUG_CER_MOD_RSVD
, "Reserved"},
443 /* Constants used by various MMEs */
445 #define HOMEPLUG_ADDR_INEXISTANT UINT64_C(010000000000)
447 /* string values in function of TXPRIO */
448 static const value_string homeplug_txprio_vals
[] = {
456 #define HOMEPLUG_MCTRL_LEN 1
457 #define HOMEPLUG_MEHDR_LEN 1
458 #define HOMEPLUG_MELEN_LEN 1
461 /* Dissection of MCTRL */
462 static void dissect_homeplug_mctrl(ptvcursor_t
* cursor
)
464 proto_item
* it
= NULL
;
466 if (!ptvcursor_tree(cursor
))
469 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_mctrl
, 1, ENC_NA
);
470 /* Extract Number Of MAC Data Entries */
471 homeplug_ne
= tvb_get_uint8(ptvcursor_tvbuff(cursor
),
472 ptvcursor_current_offset(cursor
)) & HOMEPLUG_MCTRL_NE
;
474 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_mctrl
);
476 ptvcursor_add_no_advance(cursor
, hf_homeplug_mctrl_reserved
, 1, ENC_BIG_ENDIAN
);
477 ptvcursor_add(cursor
, hf_homeplug_mctrl_ne
, 1, ENC_BIG_ENDIAN
);
479 ptvcursor_pop_subtree(cursor
);
482 /* Dissection of MEHDR */
483 static void dissect_homeplug_mehdr(ptvcursor_t
* cursor
)
485 proto_item
* it
= NULL
;
487 if (!ptvcursor_tree(cursor
))
490 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_mehdr
, 1, ENC_NA
);
491 homeplug_metype
= tvb_get_uint8(ptvcursor_tvbuff(cursor
),
492 ptvcursor_current_offset(cursor
)) & HOMEPLUG_MEHDR_METYPE
;
494 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_mehdr
);
496 ptvcursor_add_no_advance(cursor
, hf_homeplug_mehdr_mev
, 1, ENC_BIG_ENDIAN
);
497 ptvcursor_add(cursor
, hf_homeplug_mehdr_metype
, 1, ENC_BIG_ENDIAN
);
499 ptvcursor_pop_subtree(cursor
);
502 /* dissection of MELEN */
503 static void dissect_homeplug_melen(ptvcursor_t
* cursor
)
505 if (!ptvcursor_tree(cursor
))
508 homeplug_melen
= tvb_get_uint8(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
509 ptvcursor_add(cursor
, hf_homeplug_melen
, 1, ENC_BIG_ENDIAN
);
513 /* Dissection of Request Channel Estimation MME */
514 static void dissect_homeplug_rce(ptvcursor_t
* cursor
)
516 proto_item
* it
= NULL
;
518 if (!ptvcursor_tree(cursor
))
521 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_rce
, homeplug_melen
, ENC_NA
);
523 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_rce
);
525 ptvcursor_add_no_advance(cursor
, hf_homeplug_rce_cev
, 1, ENC_BIG_ENDIAN
);
526 ptvcursor_add(cursor
, hf_homeplug_rce_rsvd
, 1, ENC_BIG_ENDIAN
);
528 ptvcursor_pop_subtree(cursor
);
531 /* Dissection of Channel Estimation Response MME */
532 static void dissect_homeplug_cer(ptvcursor_t
* cursor
)
534 proto_item
* it
= NULL
;
539 if (!ptvcursor_tree(cursor
))
542 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_cer
, homeplug_melen
, ENC_NA
);
544 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_cer
);
546 ptvcursor_add_no_advance(cursor
, hf_homeplug_cer_cerv
, 1, ENC_BIG_ENDIAN
);
547 ptvcursor_add(cursor
, hf_homeplug_cer_rsvd1
, 2, ENC_BIG_ENDIAN
);
548 ptvcursor_add(cursor
, hf_homeplug_cer_rxtmi
, 1, ENC_BIG_ENDIAN
);
550 for (;iTone
< 10; iTone
++) {
551 ptvcursor_add(cursor
, hf_homeplug_cer_vt
, 1, ENC_BIG_ENDIAN
);
554 ptvcursor_add_no_advance(cursor
, hf_homeplug_cer_rate
, 1, ENC_BIG_ENDIAN
);
555 ptvcursor_add_no_advance(cursor
, hf_homeplug_cer_bp
, 1, ENC_BIG_ENDIAN
);
556 BP
= tvb_get_uint8(ptvcursor_tvbuff(cursor
),
557 ptvcursor_current_offset(cursor
)) & HOMEPLUG_CER_BP
;
558 ptvcursor_add_no_advance(cursor
, hf_homeplug_cer_mod
, 1, ENC_BIG_ENDIAN
);
559 ptvcursor_add(cursor
, hf_homeplug_cer_vt11
, 1, ENC_BIG_ENDIAN
);
560 ptvcursor_add_no_advance(cursor
, hf_homeplug_cer_rsvd2
, 1, ENC_BIG_ENDIAN
);
563 iNBDA
= tvb_get_uint8(ptvcursor_tvbuff(cursor
),
564 ptvcursor_current_offset(cursor
)) & HOMEPLUG_CER_NBDAS
;
565 ptvcursor_add(cursor
, hf_homeplug_cer_nbdas
, 1, ENC_BIG_ENDIAN
);
566 /* TODO : Check on iNBDA! INT51X1 up to 16 dba. But up to 32 for INT51X1 (Host/DTE) */
567 for (;iNBDA
> 0; iNBDA
--) {
568 ptvcursor_add(cursor
, hf_homeplug_cer_bda
, 6, ENC_NA
);
572 ptvcursor_pop_subtree(cursor
);
575 /* Dissection of Vendor Specific MME */
576 static void dissect_homeplug_vs(ptvcursor_t
* cursor
)
578 proto_item
* it
= NULL
;
580 if (!ptvcursor_tree(cursor
))
583 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_vs
, homeplug_melen
, ENC_NA
);
585 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_vs
);
587 ptvcursor_add(cursor
, hf_homeplug_vs_oui
, 3, ENC_BIG_ENDIAN
);
589 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_vs_mid
, 1, ENC_BIG_ENDIAN
);
591 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_vs_mid
);
593 ptvcursor_add_no_advance(cursor
, hf_homeplug_vs_dir
, 1, ENC_BIG_ENDIAN
);
594 ptvcursor_add(cursor
, hf_homeplug_vs_mid
, 1, ENC_BIG_ENDIAN
);
596 ptvcursor_pop_subtree(cursor
);
598 #if 0 /* XXX: ToDo ?? */
603 ptvcursor_pop_subtree(cursor
);
606 /* Dissection of Replace Bridge Address MME */
607 static void dissect_homeplug_rba(ptvcursor_t
* cursor
)
609 if (!ptvcursor_tree(cursor
))
612 ptvcursor_add_no_advance(cursor
, hf_homeplug_rba
, homeplug_melen
, ENC_NA
);
615 /* Dissection of Request Parameters and Statistics MME */
616 static void dissect_homeplug_rps(ptvcursor_t
* cursor
)
618 if (!ptvcursor_tree(cursor
))
621 ptvcursor_add(cursor
, hf_homeplug_rps
, homeplug_melen
, ENC_NA
);
624 /* Dissection of Set Network Encryption Key MME */
625 static void dissect_homeplug_snk(ptvcursor_t
* cursor
)
627 proto_item
* it
= NULL
;
629 if (!ptvcursor_tree(cursor
))
632 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_snk
, homeplug_melen
, ENC_NA
);
634 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_snk
);
636 ptvcursor_add(cursor
, hf_homeplug_snk_eks
, 1, ENC_BIG_ENDIAN
);
637 ptvcursor_add(cursor
, hf_homeplug_snk_nek
, 8, ENC_NA
);
639 ptvcursor_pop_subtree(cursor
);
642 /* Dissection of Multicast with Response MME */
643 static void dissect_homeplug_mwr(ptvcursor_t
* cursor
)
645 if (!ptvcursor_tree(cursor
))
648 ptvcursor_add_no_advance(cursor
, hf_homeplug_mwr
, homeplug_melen
, ENC_NA
);
651 /* Dissection of Confirm Network Encryption Key MME */
652 static void dissect_homeplug_cnk(ptvcursor_t
* cursor
)
654 if (!ptvcursor_tree(cursor
))
657 ptvcursor_add_no_advance(cursor
, hf_homeplug_cnk
, homeplug_melen
, ENC_NA
);
660 /* Dissection of Parameters and Statistics Response MME */
661 static void dissect_homeplug_psr(ptvcursor_t
* cursor
)
663 proto_item
* it
= NULL
;
665 if (!ptvcursor_tree(cursor
))
668 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_psr
, homeplug_melen
, ENC_NA
);
670 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_psr
);
672 ptvcursor_add(cursor
, hf_homeplug_psr_txack
, 2, ENC_BIG_ENDIAN
);
673 ptvcursor_add(cursor
, hf_homeplug_psr_txnack
, 2, ENC_BIG_ENDIAN
);
674 ptvcursor_add(cursor
, hf_homeplug_psr_txfail
, 2, ENC_BIG_ENDIAN
);
675 ptvcursor_add(cursor
, hf_homeplug_psr_txcloss
, 2, ENC_BIG_ENDIAN
);
676 ptvcursor_add(cursor
, hf_homeplug_psr_txcoll
, 2, ENC_BIG_ENDIAN
);
677 ptvcursor_add(cursor
, hf_homeplug_psr_txca3lat
, 2, ENC_BIG_ENDIAN
);
678 ptvcursor_add(cursor
, hf_homeplug_psr_txca2lat
, 2, ENC_BIG_ENDIAN
);
679 ptvcursor_add(cursor
, hf_homeplug_psr_txca1lat
, 2, ENC_BIG_ENDIAN
);
680 ptvcursor_add(cursor
, hf_homeplug_psr_txca0lat
, 2, ENC_BIG_ENDIAN
);
681 ptvcursor_add(cursor
, hf_homeplug_psr_rxbp40
, 4, ENC_BIG_ENDIAN
);
683 ptvcursor_pop_subtree(cursor
);
686 /* Dissection of the Set Local Parameters MME */
687 static void dissect_homeplug_slp(ptvcursor_t
* cursor
)
689 proto_item
* it
= NULL
;
691 if (!ptvcursor_tree(cursor
))
694 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_slp
, homeplug_melen
, ENC_NA
);
696 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_slp
);
698 ptvcursor_add(cursor
, hf_homeplug_slp_ma
, 6, ENC_NA
);
700 ptvcursor_pop_subtree(cursor
);
703 /* Dissection of Load MME */
704 static void dissect_homeplug_loader(ptvcursor_t
* cursor
, packet_info
* pinfo
)
706 int mid
, length
, dlen
;
707 proto_item
* it
= NULL
;
709 if (!ptvcursor_tree(cursor
))
712 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_loader
, -1, ENC_NA
);
714 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_loader
);
716 mid
= tvb_get_uint8(ptvcursor_tvbuff(cursor
),
717 ptvcursor_current_offset(cursor
));
719 length
= tvb_get_ntohs(ptvcursor_tvbuff(cursor
),
720 ptvcursor_current_offset(cursor
) + 1);
723 case HOMEPLUG_MID_LGDFV
:
724 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Get Firmware Version");
725 ptvcursor_add(cursor
, hf_homeplug_loader_gdfv
, 1, ENC_BIG_ENDIAN
);
726 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
728 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
729 ptvcursor_add(cursor
, hf_homeplug_loader_version
, -1, ENC_ASCII
);
732 case HOMEPLUG_MID_LSF
:
733 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Start Firmware");
734 ptvcursor_add(cursor
, hf_homeplug_loader_lsf
, 1, ENC_BIG_ENDIAN
);
735 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
737 case HOMEPLUG_MID_LWM
:
738 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Write Memory");
739 ptvcursor_add(cursor
, hf_homeplug_loader_lwm
, 1, ENC_BIG_ENDIAN
);
740 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
742 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
743 ptvcursor_add(cursor
, hf_homeplug_loader_data_address
, 4, ENC_BIG_ENDIAN
);
745 dlen
= tvb_get_ntohs(ptvcursor_tvbuff(cursor
),
746 ptvcursor_current_offset(cursor
));
747 ptvcursor_add(cursor
, hf_homeplug_loader_data_length
, 2, ENC_BIG_ENDIAN
);
749 ptvcursor_add(cursor
, hf_homeplug_loader_data
, dlen
, ENC_NA
);
751 case HOMEPLUG_MID_LRM
:
752 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Read Memory");
753 ptvcursor_add(cursor
, hf_homeplug_loader_lrm
, 1, ENC_BIG_ENDIAN
);
754 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
756 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
757 ptvcursor_add(cursor
, hf_homeplug_loader_data_address
, 4, ENC_BIG_ENDIAN
);
758 dlen
= tvb_get_ntohs(ptvcursor_tvbuff(cursor
),
759 ptvcursor_current_offset(cursor
));
760 ptvcursor_add(cursor
, hf_homeplug_loader_data_length
, 2, ENC_BIG_ENDIAN
);
762 ptvcursor_add(cursor
, hf_homeplug_loader_data
, dlen
, ENC_NA
);
764 case HOMEPLUG_MID_LRNVM
:
765 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Read NVM");
766 ptvcursor_add(cursor
, hf_homeplug_loader_lrnvm
, 1, ENC_BIG_ENDIAN
);
767 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
769 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
770 ptvcursor_add(cursor
, hf_homeplug_loader_data_address
, 4, ENC_BIG_ENDIAN
);
771 dlen
= tvb_get_ntohs(ptvcursor_tvbuff(cursor
),
772 ptvcursor_current_offset(cursor
));
773 ptvcursor_add(cursor
, hf_homeplug_loader_data_length
, 2, ENC_BIG_ENDIAN
);
775 ptvcursor_add(cursor
, hf_homeplug_loader_data
, dlen
, ENC_NA
);
777 case HOMEPLUG_MID_LWNVM
:
778 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Write NVM");
779 ptvcursor_add(cursor
, hf_homeplug_loader_lwnvm
, 1, ENC_BIG_ENDIAN
);
780 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
782 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
783 ptvcursor_add(cursor
, hf_homeplug_loader_data_address
, 4, ENC_BIG_ENDIAN
);
784 dlen
= tvb_get_ntohs(ptvcursor_tvbuff(cursor
),
785 ptvcursor_current_offset(cursor
));
786 ptvcursor_add(cursor
, hf_homeplug_loader_data_length
, 2, ENC_BIG_ENDIAN
);
788 ptvcursor_add(cursor
, hf_homeplug_loader_data
, dlen
, ENC_NA
);
790 case HOMEPLUG_MID_LRESET
:
791 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Reset");
792 ptvcursor_add(cursor
, hf_homeplug_loader_lreset
, 1, ENC_BIG_ENDIAN
);
793 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
795 case HOMEPLUG_MID_GMD
:
796 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Get Module Data");
797 ptvcursor_add(cursor
, hf_homeplug_loader_gmd
, 1, ENC_BIG_ENDIAN
);
798 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
800 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
801 ptvcursor_add(cursor
, hf_homeplug_loader_module_id
, 4, ENC_BIG_ENDIAN
);
802 ptvcursor_add(cursor
, hf_homeplug_loader_module_offset
, 4, ENC_BIG_ENDIAN
);
804 ptvcursor_add(cursor
, hf_homeplug_loader_data_length
, 2, ENC_BIG_ENDIAN
);
806 ptvcursor_add(cursor
, hf_homeplug_loader_module_size
, 4, ENC_BIG_ENDIAN
);
807 ptvcursor_add(cursor
, hf_homeplug_loader_data
, length
- 13, ENC_NA
);
810 case HOMEPLUG_MID_SMD
:
811 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Set Module Data");
812 ptvcursor_add(cursor
, hf_homeplug_loader_smd
, 1, ENC_BIG_ENDIAN
);
813 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
815 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
816 ptvcursor_add(cursor
, hf_homeplug_loader_module_id
, 4, ENC_BIG_ENDIAN
);
817 ptvcursor_add(cursor
, hf_homeplug_loader_module_offset
, 4, ENC_BIG_ENDIAN
);
818 dlen
= tvb_get_ntohs(ptvcursor_tvbuff(cursor
),
819 ptvcursor_current_offset(cursor
));
821 ptvcursor_add(cursor
, hf_homeplug_loader_data_length
, 2, ENC_BIG_ENDIAN
);
822 ptvcursor_add(cursor
, hf_homeplug_loader_data
, dlen
, ENC_NA
);
824 ptvcursor_add(cursor
, hf_homeplug_loader_module_size
, 4, ENC_BIG_ENDIAN
);
826 case HOMEPLUG_MID_CM
:
827 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Commit Module");
828 ptvcursor_add(cursor
, hf_homeplug_loader_cm
, 1, ENC_BIG_ENDIAN
);
829 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
831 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
832 ptvcursor_add(cursor
, hf_homeplug_loader_module_id
, 4, ENC_BIG_ENDIAN
);
834 case HOMEPLUG_MID_LEMD
:
835 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Erase Module Data");
836 ptvcursor_add(cursor
, hf_homeplug_loader_lemd
, 1, ENC_BIG_ENDIAN
);
837 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
839 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
840 ptvcursor_add(cursor
, hf_homeplug_loader_module_id
, 4, ENC_BIG_ENDIAN
);
842 case HOMEPLUG_MID_LENVMS
:
843 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Erase NVM Sectors");
844 ptvcursor_add(cursor
, hf_homeplug_loader_lenvms
, 1, ENC_BIG_ENDIAN
);
845 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
847 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
848 ptvcursor_add(cursor
, hf_homeplug_loader_data_address
, 4, ENC_BIG_ENDIAN
);
849 ptvcursor_add(cursor
, hf_homeplug_loader_module_size
, 4, ENC_BIG_ENDIAN
);
851 case HOMEPLUG_MID_GNVMP
:
852 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Get NVM Parameters");
853 ptvcursor_add(cursor
, hf_homeplug_loader_gnvmp
, 1, ENC_BIG_ENDIAN
);
854 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
856 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
857 ptvcursor_add(cursor
, hf_homeplug_loader_nvmp_type
, 4, ENC_BIG_ENDIAN
);
858 ptvcursor_add(cursor
, hf_homeplug_loader_nvmp_pagesize
, 4, ENC_BIG_ENDIAN
);
859 ptvcursor_add(cursor
, hf_homeplug_loader_nvmp_blocksize
, 4, ENC_BIG_ENDIAN
);
860 ptvcursor_add(cursor
, hf_homeplug_loader_nvmp_memorysize
, 4, ENC_BIG_ENDIAN
);
863 case HOMEPLUG_MID_SNVMP
:
864 col_set_str(pinfo
->cinfo
, COL_INFO
, "Loader Set NVM Parameters");
865 ptvcursor_add(cursor
, hf_homeplug_loader_snvmp
, 1, ENC_BIG_ENDIAN
);
866 ptvcursor_add(cursor
, hf_homeplug_loader_length
, 2, ENC_BIG_ENDIAN
);
868 ptvcursor_add(cursor
, hf_homeplug_loader_status
, 1, ENC_BIG_ENDIAN
);
869 ptvcursor_add(cursor
, hf_homeplug_loader_nvmp_type
, 4, ENC_BIG_ENDIAN
);
870 ptvcursor_add(cursor
, hf_homeplug_loader_nvmp_pagesize
, 4, ENC_BIG_ENDIAN
);
871 ptvcursor_add(cursor
, hf_homeplug_loader_nvmp_blocksize
, 4, ENC_BIG_ENDIAN
);
872 ptvcursor_add(cursor
, hf_homeplug_loader_nvmp_memorysize
, 4, ENC_BIG_ENDIAN
);
875 ptvcursor_add(cursor
, hf_homeplug_loader_mid
, 1, ENC_BIG_ENDIAN
);
879 ptvcursor_pop_subtree(cursor
);
882 /* Dissection of Host Request MME */
883 static void dissect_homeplug_hreq(ptvcursor_t
* cursor
, packet_info
* pinfo
)
886 proto_item
* it
= NULL
;
888 if (!ptvcursor_tree(cursor
))
891 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_hreq
, homeplug_melen
, ENC_NA
);
893 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_hreq
);
895 mid
= tvb_get_uint8(ptvcursor_tvbuff(cursor
),
896 ptvcursor_current_offset(cursor
));
897 length
= tvb_get_ntohs(ptvcursor_tvbuff(cursor
),
898 ptvcursor_current_offset(cursor
) + 1);
901 case HOMEPLUG_MID_GDV
:
902 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Request: Get Device Version");
903 ptvcursor_add(cursor
, hf_homeplug_hreq_gdv
, 1, ENC_BIG_ENDIAN
);
905 case HOMEPLUG_MID_GFV
:
906 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Request: Get Firmware Version");
907 ptvcursor_add(cursor
, hf_homeplug_hreq_gfv
, 1, ENC_BIG_ENDIAN
);
909 case HOMEPLUG_MID_GNEK
:
910 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Request: Get Network Encryption Key Request");
911 ptvcursor_add(cursor
, hf_homeplug_hreq_gnek
, 1, ENC_BIG_ENDIAN
);
913 case HOMEPLUG_MID_GCLBPL
:
914 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Request: Get/ Clear Local Bridge Proxy List");
915 ptvcursor_add(cursor
, hf_homeplug_hreq_gclbpl
, 1, ENC_BIG_ENDIAN
);
917 case HOMEPLUG_MID_NVDS
:
918 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Request: Non-volatile Database Status");
919 ptvcursor_add(cursor
, hf_homeplug_hreq_nvds
, 1, ENC_BIG_ENDIAN
);
921 case HOMEPLUG_MID_GRBT
:
922 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Request: Get Remote Bridge Table");
923 ptvcursor_add(cursor
, hf_homeplug_hreq_grbt
, 1, ENC_BIG_ENDIAN
);
925 case HOMEPLUG_MID_GSLNM
:
926 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Request: Get/Set Logical Network Mappings");
927 ptvcursor_add(cursor
, hf_homeplug_hreq_gslnm
, 1, ENC_BIG_ENDIAN
);
929 case HOMEPLUG_MID_GSSS
:
930 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Request: Get/Set Spectral Scaling");
931 ptvcursor_add(cursor
, hf_homeplug_hreq_gsss
, 1, ENC_BIG_ENDIAN
);
933 case HOMEPLUG_MID_RSL
:
934 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Request: MAC Reset to Secondary Loader");
935 ptvcursor_add(cursor
, hf_homeplug_hreq_rsl
, 1, ENC_BIG_ENDIAN
);
937 case HOMEPLUG_MID_RESET
:
938 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Request: MAC Reset");
939 ptvcursor_add(cursor
, hf_homeplug_hreq_reset
, 1, ENC_BIG_ENDIAN
);
940 ptvcursor_add(cursor
, hf_homeplug_hreq_reset_type
, 1, ENC_BIG_ENDIAN
);
942 ptvcursor_add(cursor
, hf_homeplug_hreq_reset_delay
, 2, ENC_BIG_ENDIAN
);
945 ptvcursor_add(cursor
, hf_homeplug_hreq_mid
, 1, ENC_BIG_ENDIAN
);
949 ptvcursor_pop_subtree(cursor
);
952 /* Dissection of Host Response MME */
953 static void dissect_homeplug_hrsp(ptvcursor_t
* cursor
, packet_info
* pinfo
)
956 proto_item
* it
= NULL
;
958 if (!ptvcursor_tree(cursor
))
961 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_hrsp
, homeplug_melen
, ENC_NA
);
963 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_hrsp
);
965 mid
= tvb_get_uint8(ptvcursor_tvbuff(cursor
),
966 ptvcursor_current_offset(cursor
));
968 case HOMEPLUG_MID_GDVR
:
969 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Response: Get Device Version");
970 ptvcursor_add(cursor
, hf_homeplug_hrsp_gdvr
, 1, ENC_BIG_ENDIAN
);
971 ptvcursor_add(cursor
, hf_homeplug_hrsp_version
, -1, ENC_ASCII
);
973 case HOMEPLUG_MID_GFVR
:
974 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Response: Get Firmware Version");
975 ptvcursor_add(cursor
, hf_homeplug_hrsp_gfvr
, 1, ENC_BIG_ENDIAN
);
976 ptvcursor_add(cursor
, hf_homeplug_hrsp_version
, -1, ENC_ASCII
);
978 case HOMEPLUG_MID_GNEKR
:
979 col_set_str(pinfo
->cinfo
, COL_INFO
, "Get Network Encryption Key");
980 ptvcursor_add(cursor
, hf_homeplug_hrsp_gnekr
, 1, ENC_BIG_ENDIAN
);
981 ptvcursor_add(cursor
, hf_homeplug_hrsp_gnekr_select
, 1, ENC_BIG_ENDIAN
);
982 ptvcursor_add(cursor
, hf_homeplug_hrsp_gnekr_key
, 8, ENC_BIG_ENDIAN
);
984 case HOMEPLUG_MID_INVALID
:
985 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Response: Invalid MME");
986 ptvcursor_add(cursor
, hf_homeplug_hrsp_invalid
, 1, ENC_BIG_ENDIAN
);
989 ptvcursor_add(cursor
, hf_homeplug_hrsp_mid
, 1, ENC_BIG_ENDIAN
);
993 ptvcursor_pop_subtree(cursor
);
996 /* Dissection of Host Tag MME */
997 static void dissect_homeplug_htag(ptvcursor_t
* cursor
)
999 if (!ptvcursor_tree(cursor
))
1002 ptvcursor_add_no_advance(cursor
, hf_homeplug_htag
, homeplug_melen
, ENC_NA
);
1005 /* Dissection of the Network Statistics MME */
1006 static void dissect_homeplug_ns(ptvcursor_t
* cursor
, packet_info
* pinfo
)
1009 uint8_t i_buffer
= 0;
1011 uint64_t newt_da
= 0;
1012 bool extended
= (homeplug_melen
>= HOMEPLUG_NS_EXT_LEN
);
1015 /* Append Basic/Extender specifier to info column */
1016 col_append_str(pinfo
->cinfo
, COL_INFO
, extended
? " Extended" : " Basic");
1018 if (!ptvcursor_tree(cursor
))
1021 ptvcursor_add_with_subtree(cursor
, hf_homeplug_ns
, homeplug_melen
, ENC_BIG_ENDIAN
,
1024 ti
= proto_tree_add_boolean(ptvcursor_tree(cursor
), hf_homeplug_ns_extended
,
1025 ptvcursor_tvbuff(cursor
), 0, 0, extended
);
1026 proto_item_set_generated(ti
);
1028 ptvcursor_add_no_advance(cursor
, hf_homeplug_ns_netw_ctrl_ac
, 1, ENC_BIG_ENDIAN
);
1029 ptvcursor_add(cursor
, hf_homeplug_ns_netw_ctrl_icid
, 1, ENC_BIG_ENDIAN
);
1031 ptvcursor_add_no_advance(cursor
, hf_homeplug_ns_bytes40_robo
, 2, ENC_LITTLE_ENDIAN
);
1032 ptvcursor_add(cursor
, hf_homeplug_ns_mhz
, 2, ENC_BIG_ENDIAN
);
1034 ptvcursor_add(cursor
, hf_homeplug_ns_fails_robo
, 2, ENC_LITTLE_ENDIAN
);
1035 ptvcursor_add(cursor
, hf_homeplug_ns_drops_robo
, 2, ENC_LITTLE_ENDIAN
);
1037 while (iTone
< 15) {
1038 newt_da
= ((int64_t)tvb_get_ntoh24(ptvcursor_tvbuff(cursor
),
1039 ptvcursor_current_offset(cursor
))) << 24;
1040 newt_da
|= tvb_get_ntoh24(ptvcursor_tvbuff(cursor
),
1041 ptvcursor_current_offset(cursor
)+3);
1043 if (newt_da
!= HOMEPLUG_ADDR_INEXISTANT
) {
1044 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
,
1045 ett_homeplug_tone
, "Tone Map #%d", iTone
+1);
1047 ptvcursor_add(cursor
, hf_homeplug_ns_netw_da
, 6, ENC_NA
);
1049 ptvcursor_add_no_advance(cursor
, hf_homeplug_ns_bytes40
, 2, ENC_LITTLE_ENDIAN
);
1050 ptvcursor_add(cursor
, hf_homeplug_ns_mhz
, 2, ENC_BIG_ENDIAN
);
1052 ptvcursor_add(cursor
, hf_homeplug_ns_fails
, 2, ENC_LITTLE_ENDIAN
);
1053 ptvcursor_add(cursor
, hf_homeplug_ns_drops
, 2, ENC_LITTLE_ENDIAN
);
1055 ptvcursor_pop_subtree(cursor
);
1057 proto_tree_add_expert_format(ptvcursor_tree(cursor
), pinfo
, &ei_homeplug_tone_map_not_exist
, ptvcursor_tvbuff(cursor
),
1058 ptvcursor_current_offset(cursor
), 12, "Tone Map #%d does not exist", iTone
+1);
1064 while (i_buffer
< 6) {
1065 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
,
1066 ett_homeplug_tx_bfr_state
, "TX_BFR_%d_STATE", i_buffer
);
1068 ptvcursor_add_no_advance(cursor
, hf_homeplug_ns_buf_in_use
, 1, ENC_BIG_ENDIAN
);
1069 ptvcursor_add_no_advance(cursor
, hf_homeplug_ns_prio
, 1, ENC_BIG_ENDIAN
);
1070 ptvcursor_add(cursor
, hf_homeplug_ns_msdu_len
, 1, ENC_BIG_ENDIAN
);
1071 ptvcursor_add_no_advance(cursor
, hf_homeplug_ns_seqn
, 1, ENC_BIG_ENDIAN
);
1072 ptvcursor_add(cursor
, hf_homeplug_ns_toneidx
, 1, ENC_BIG_ENDIAN
);
1074 ptvcursor_pop_subtree(cursor
);
1079 ptvcursor_pop_subtree(cursor
);
1082 /* Dissection of the Bridging Characteristics Network MME */
1083 static void dissect_homeplug_bcn(ptvcursor_t
* cursor
)
1085 proto_item
* it
= NULL
;
1086 uint8_t i_bridge
= 0;
1091 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_bcn
, homeplug_melen
, ENC_NA
);
1093 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_bcn
);
1095 ptvcursor_add_no_advance(cursor
, hf_homeplug_bcn_network
, 1, ENC_BIG_ENDIAN
);
1096 ptvcursor_add_no_advance(cursor
, hf_homeplug_bcn_return
, 1, ENC_BIG_ENDIAN
);
1097 ptvcursor_add_no_advance(cursor
, hf_homeplug_bcn_rsvd
, 1, ENC_BIG_ENDIAN
);
1098 fbn
= tvb_get_uint8(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
))
1100 ptvcursor_add(cursor
, hf_homeplug_bcn_fbn
, 1, ENC_BIG_ENDIAN
);
1101 while (i_bridge
< 2) {
1102 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
,
1103 ett_homeplug_bridge
, "Bridge #%d", fbn
+ i_bridge
);
1105 ptvcursor_add(cursor
, hf_homeplug_bcn_brda
, 6, ENC_NA
);
1106 num_das
= tvb_get_uint8(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
1107 ptvcursor_add(cursor
, hf_homeplug_bcn_bp_das
, 1, ENC_BIG_ENDIAN
);
1108 for (i_da
= 0; i_da
< num_das
; i_da
++) {
1109 ptvcursor_add(cursor
, hf_homeplug_bcn_bp_da
, 6, ENC_NA
);
1112 ptvcursor_pop_subtree(cursor
);
1116 ptvcursor_pop_subtree(cursor
);
1119 /* Dissection of the Bridging Characteristics Local MME */
1120 static void dissect_homeplug_bcl(ptvcursor_t
* cursor
)
1122 proto_item
* it
= NULL
;
1126 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_bcl
, homeplug_melen
, ENC_NA
);
1128 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_bcl
);
1130 ptvcursor_add_no_advance(cursor
, hf_homeplug_bcl_network
, 1, ENC_BIG_ENDIAN
);
1131 ptvcursor_add_no_advance(cursor
, hf_homeplug_bcl_return
, 1, ENC_BIG_ENDIAN
);
1132 ptvcursor_add(cursor
, hf_homeplug_bcl_rsvd
, 1, ENC_BIG_ENDIAN
);
1134 num_das
= tvb_get_uint8(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
1135 ptvcursor_add(cursor
, hf_homeplug_bcl_hprox_das
, 1, ENC_BIG_ENDIAN
);
1137 while (i_da
< num_das
) {
1138 ptvcursor_add(cursor
, hf_homeplug_bcl_hpbda
, 6, ENC_NA
);
1142 ptvcursor_pop_subtree(cursor
);
1145 /* Dissection of the Bridging Characteristics MME */
1146 static void dissect_homeplug_bc(ptvcursor_t
* cursor
, packet_info
* pinfo
)
1150 if (!ptvcursor_tree(cursor
))
1153 network
= tvb_get_uint8(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
))
1154 & HOMEPLUG_BC_NETWORK
;
1156 /* Append Network/Local specifier to info column */
1157 col_append_str(pinfo
->cinfo
, COL_INFO
, network
? " Network" : " Local");
1159 /* Call specific dissector */
1161 dissect_homeplug_bcn(cursor
);
1163 dissect_homeplug_bcl(cursor
);
1166 /* Dissection of the Set Transmit Characteristics MME */
1167 static void dissect_homeplug_stc(ptvcursor_t
* cursor
)
1169 proto_item
* it
= NULL
;
1171 if (!ptvcursor_tree(cursor
))
1174 it
= ptvcursor_add_no_advance(cursor
, hf_homeplug_stc
, homeplug_melen
, ENC_NA
);
1176 ptvcursor_push_subtree(cursor
, it
, ett_homeplug_stc
);
1178 ptvcursor_add_no_advance(cursor
, hf_homeplug_stc_lco
, 1, ENC_BIG_ENDIAN
);
1179 ptvcursor_add_no_advance(cursor
, hf_homeplug_stc_encf
, 1, ENC_BIG_ENDIAN
);
1180 ptvcursor_add_no_advance(cursor
, hf_homeplug_stc_txprio
, 1, ENC_BIG_ENDIAN
);
1181 ptvcursor_add_no_advance(cursor
, hf_homeplug_stc_rexp
, 1, ENC_BIG_ENDIAN
);
1182 ptvcursor_add_no_advance(cursor
, hf_homeplug_stc_txcf
, 1, ENC_BIG_ENDIAN
);
1183 ptvcursor_add_no_advance(cursor
, hf_homeplug_stc_cftop
, 1, ENC_BIG_ENDIAN
);
1184 ptvcursor_add(cursor
, hf_homeplug_stc_rsvd1
, 1, ENC_BIG_ENDIAN
);
1185 ptvcursor_add_no_advance(cursor
, hf_homeplug_stc_retry
, 1, ENC_BIG_ENDIAN
);
1186 ptvcursor_add_no_advance(cursor
, hf_homeplug_stc_rsvd2
, 1, ENC_BIG_ENDIAN
);
1187 ptvcursor_add_no_advance(cursor
, hf_homeplug_stc_dder
, 1, ENC_BIG_ENDIAN
);
1188 ptvcursor_add_no_advance(cursor
, hf_homeplug_stc_dur
, 1, ENC_BIG_ENDIAN
);
1189 ptvcursor_add_no_advance(cursor
, hf_homeplug_stc_ebp
, 1, ENC_BIG_ENDIAN
);
1190 ptvcursor_add(cursor
, hf_homeplug_stc_dees
, 1, ENC_BIG_ENDIAN
);
1191 ptvcursor_add(cursor
, hf_homeplug_stc_txeks
, 1, ENC_BIG_ENDIAN
);
1193 ptvcursor_pop_subtree(cursor
);
1198 /* Dissection of unknown tags */
1199 static void dissect_homeplug_unknown(ptvcursor_t
* cursor
)
1201 ptvcursor_add(cursor
, hf_homeplug_data
, homeplug_melen
, ENC_NA
);
1204 static void dissect_homeplug_mme(ptvcursor_t
* cursor
, packet_info
* pinfo
)
1206 col_append_sep_str(pinfo
->cinfo
, COL_INFO
, ", ",
1207 val_to_str(homeplug_metype
, homeplug_metype_vals
, "Unknown 0x%x"));
1209 switch(homeplug_metype
) {
1210 case HOMEPLUG_MME_RCE
:
1211 dissect_homeplug_rce(cursor
);
1213 case HOMEPLUG_MME_CER
:
1214 dissect_homeplug_cer(cursor
);
1216 case HOMEPLUG_MME_VS
:
1217 col_set_str(pinfo
->cinfo
, COL_INFO
, "Vendor Specific");
1218 dissect_homeplug_vs(cursor
);
1220 case HOMEPLUG_MME_RBA
:
1221 col_set_str(pinfo
->cinfo
, COL_INFO
, "Replace Bridge Address");
1222 dissect_homeplug_rba(cursor
);
1224 case HOMEPLUG_MME_SNK
:
1225 col_set_str(pinfo
->cinfo
, COL_INFO
, "Set Network Encryption Key");
1226 dissect_homeplug_snk(cursor
);
1228 case HOMEPLUG_MME_MWR
:
1229 col_set_str(pinfo
->cinfo
, COL_INFO
, "Multicast With Response");
1230 dissect_homeplug_mwr(cursor
);
1232 case HOMEPLUG_MME_CNK
:
1233 col_set_str(pinfo
->cinfo
, COL_INFO
, "Confirm Network Encryption Key");
1234 dissect_homeplug_cnk(cursor
);
1236 case HOMEPLUG_MME_RPS
:
1237 dissect_homeplug_rps(cursor
);
1239 case HOMEPLUG_MME_PSR
:
1240 dissect_homeplug_psr(cursor
);
1242 case HOMEPLUG_MME_SLP
:
1243 dissect_homeplug_slp(cursor
);
1245 case HOMEPLUG_MME_LOADER
:
1246 col_set_str(pinfo
->cinfo
, COL_INFO
, "Load Firmware");
1247 dissect_homeplug_loader(cursor
, pinfo
);
1249 case HOMEPLUG_MME_HREQ
:
1250 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Request");
1251 dissect_homeplug_hreq(cursor
, pinfo
);
1253 case HOMEPLUG_MME_HRSP
:
1254 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Response");
1255 dissect_homeplug_hrsp(cursor
, pinfo
);
1257 case HOMEPLUG_MME_HTAG
:
1258 col_set_str(pinfo
->cinfo
, COL_INFO
, "Host Tag");
1259 dissect_homeplug_htag(cursor
);
1261 case HOMEPLUG_MME_NS
:
1262 dissect_homeplug_ns(cursor
, pinfo
);
1264 case HOMEPLUG_MME_BC
:
1265 dissect_homeplug_bc(cursor
, pinfo
);
1267 case HOMEPLUG_MME_STC
:
1268 dissect_homeplug_stc(cursor
);
1271 dissect_homeplug_unknown(cursor
);
1276 #define TVB_LEN_GREATEST 1
1277 #define TVB_LEN_UNDEF 0
1278 #define TVB_LEN_SHORTEST -1
1279 static int check_tvb_length(ptvcursor_t
*cursor
, const int length
)
1282 return TVB_LEN_UNDEF
;
1284 if (tvb_reported_length_remaining(ptvcursor_tvbuff(cursor
),
1285 ptvcursor_current_offset(cursor
)) < length
)
1286 return TVB_LEN_SHORTEST
;
1288 return TVB_LEN_GREATEST
;
1292 dissect_homeplug(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, void* data _U_
)
1295 proto_tree
* homeplug_tree
;
1296 ptvcursor_t
* cursor
;
1298 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "HomePlug");
1299 /* Clear out stuff in the info column */
1300 col_set_str(pinfo
->cinfo
, COL_INFO
, "MAC Management");
1302 homeplug_offset
= 0;
1304 it
= proto_tree_add_item(tree
, proto_homeplug
, tvb
, homeplug_offset
, -1, ENC_NA
);
1305 homeplug_tree
= proto_item_add_subtree(it
, ett_homeplug
);
1307 cursor
= ptvcursor_new(pinfo
->pool
, homeplug_tree
, tvb
, 0);
1309 /* We do not have enough data to read mctrl field stop the dissection */
1310 if (check_tvb_length(cursor
, HOMEPLUG_MCTRL_LEN
) != TVB_LEN_SHORTEST
) {
1312 dissect_homeplug_mctrl(cursor
);
1314 /** homeplug_ne indicates the number of MME entries. This field is fetched
1317 if ((homeplug_ne
> 0)) {
1318 col_clear(pinfo
->cinfo
, COL_INFO
);
1320 for (; homeplug_ne
> 0; homeplug_ne
--) {
1322 /* Check we have enough data in tvb to read MEHDR */
1323 if (check_tvb_length(cursor
, HOMEPLUG_MEHDR_LEN
) == TVB_LEN_SHORTEST
)
1325 dissect_homeplug_mehdr(cursor
);
1327 /* Check we have enough data in tvb to read MELEN */
1328 if (check_tvb_length(cursor
, HOMEPLUG_MELEN_LEN
) == TVB_LEN_SHORTEST
)
1330 dissect_homeplug_melen(cursor
);
1332 dissect_homeplug_mme(cursor
, pinfo
);
1336 ptvcursor_free(cursor
);
1337 return tvb_captured_length(tvb
);
1341 homeplug_fmt_mhz( char *result
, uint32_t ns_bytes40
)
1343 snprintf( result
, ITEM_LABEL_LENGTH
, "%.3f", (float)(ns_bytes40
)/42);
1347 proto_reg_handoff_homeplug(void)
1349 dissector_add_uint("ethertype", ETHERTYPE_HOMEPLUG
, homeplug_handle
);
1353 proto_register_homeplug(void)
1356 static hf_register_info hf
[] = {
1357 /* MAC Control Field */
1358 { &hf_homeplug_mctrl
,
1359 { "MAC Control Field", "homeplug.mctrl",
1360 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1363 { &hf_homeplug_mctrl_reserved
,
1364 { "Reserved", "homeplug.mctrl.rsvd",
1365 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_MCTRL_RSVD
, NULL
, HFILL
}
1368 { &hf_homeplug_mctrl_ne
,
1369 { "Number of MAC Data Entries", "homeplug.mctrl.ne",
1370 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_MCTRL_NE
, NULL
, HFILL
}
1373 /* MAC Entry Header */
1374 { &hf_homeplug_mehdr
,
1375 { "MAC Management Entry Header", "homeplug.mehdr",
1376 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1379 { &hf_homeplug_mehdr_mev
,
1380 { "MAC Entry Version", "homeplug.mehdr.mev",
1381 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_MEHDR_MEV
, NULL
, HFILL
}
1384 { &hf_homeplug_mehdr_metype
,
1385 { "MAC Entry Type", "homeplug.mehdr.metype",
1386 FT_UINT8
, BASE_HEX
, VALS(homeplug_metype_vals
), HOMEPLUG_MEHDR_METYPE
, NULL
, HFILL
}
1390 { &hf_homeplug_melen
,
1391 { "MAC Management Entry Length", "homeplug.melen",
1392 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1395 /* MAC Management Entry */
1398 { "MAC Management Entry Data", "homeplug.mmentry",
1399 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1403 /* Request Channel Estimation */
1405 { "Request Channel Estimation", "homeplug.rce",
1406 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1409 { &hf_homeplug_rce_cev
,
1410 { "Channel Estimation Version", "homeplug.rce.cev",
1411 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_RCE_CEV
, NULL
, HFILL
}
1414 { &hf_homeplug_rce_rsvd
,
1415 { "Reserved", "homeplug.rce.rsvd",
1416 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_RCE_RSVD
, NULL
, HFILL
}
1419 /* Channel Estimation Response */
1421 { "Channel Estimation Response", "homeplug.cer",
1422 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1425 { &hf_homeplug_cer_cerv
,
1426 { "Channel Estimation Response Version", "homeplug.cer.cerv",
1427 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_CER_CERV
, NULL
, HFILL
}
1430 { &hf_homeplug_cer_rsvd1
,
1431 { "Reserved", "homeplug.cer.rsvd1",
1432 FT_UINT16
, BASE_DEC
, NULL
, HOMEPLUG_CER_RSVD
, NULL
, HFILL
}
1435 { &hf_homeplug_cer_rxtmi
,
1436 { "Receive Tone Map Index", "homeplug.cer.rxtmi",
1437 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_CER_RXTMI
, NULL
, HFILL
}
1440 /* TODO must append vt[79-0] */
1442 { &hf_homeplug_cer_vt
,
1443 {"Valid Tone Flags", "homeplug.cer.vt",
1444 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
1447 { &hf_homeplug_cer_rate
,
1448 { "FEC Rate", "homeplug.cer.rate",
1449 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_CER_RATE
, NULL
, HFILL
}
1452 { &hf_homeplug_cer_bp
,
1453 { "Bridge Proxy", "homeplug.cer.bp",
1454 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_CER_BP
, NULL
, HFILL
}
1457 { &hf_homeplug_cer_mod
,
1458 { "Modulation Method", "homeplug.cer.mod",
1459 FT_UINT8
, BASE_DEC
, VALS(homeplug_cer_mod_vals
), HOMEPLUG_CER_MOD_MASK
,
1463 { &hf_homeplug_cer_vt11
,
1464 { "Valid Tone Flags [83-80]", "homeplug.cer.vt11",
1465 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_CER_VT11
, NULL
, HFILL
}
1468 { &hf_homeplug_cer_rsvd2
,
1469 { "Reserved", "homeplug.cer.rsvd2",
1470 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_CER_RSVD2
, NULL
, HFILL
}
1473 { &hf_homeplug_cer_nbdas
,
1474 { "Number Bridged Destination Addresses", "homeplug.cer.nbdas",
1475 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_CER_NBDAS
, NULL
, HFILL
}
1478 { &hf_homeplug_cer_bda
,
1479 { "Bridged Destination Address", "homeplug.cer.bda",
1480 FT_ETHER
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1483 /* Replace Bridge Address */
1485 { "Replace Bridge Address", "homeplug.rba",
1486 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1489 /* Vendor Specific */
1491 { "Vendor Specific", "homeplug.vs",
1492 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1495 { &hf_homeplug_vs_dir
,
1496 { "Direction", "homeplug.vs.dir",
1497 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_VS_DIR
, NULL
, HFILL
}
1500 { &hf_homeplug_vs_mid
,
1501 { "Message ID", "homeplug.vs.mid",
1502 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_VS_MID
, NULL
, HFILL
}
1505 { &hf_homeplug_vs_oui
,
1506 { "OUI", "homeplug.vs.oui",
1507 FT_UINT24
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
1510 /* Set Network Encryption Key */
1512 { "Set Network Encryption Key", "homeplug.snk",
1513 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1516 { &hf_homeplug_snk_eks
,
1517 { "Encryption Key Select", "homeplug.snk.eks",
1518 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1521 { &hf_homeplug_snk_nek
,
1522 { "Network Encryption Key", "homeplug.snk.nek",
1523 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1526 /* Multicast With Response */
1528 { "Multicast With Response", "homeplug.mwr",
1529 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1532 /* Confirm Network Encryption Key */
1534 { "Confirm Network Encryption Key", "homeplug.cnk",
1535 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1539 { &hf_homeplug_htag
,
1540 { "Host Tag", "homeplug.htag",
1541 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1544 /* Request Parameters and Statistics */
1546 { "Request Parameters and Statistics", "homeplug.rps",
1547 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1550 /* Parameters and Statistics Response */
1552 { "Parameters and Statistics Response", "homeplug.psr",
1553 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1556 { &hf_homeplug_psr_txack
,
1557 { "Transmit ACK Counter", "homeplug.psr.txack",
1558 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1561 { &hf_homeplug_psr_txnack
,
1562 { "Transmit NACK Counter", "homeplug.psr.txnack",
1563 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1566 { &hf_homeplug_psr_txfail
,
1567 { "Transmit FAIL Counter", "homeplug.psr.txfail",
1568 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1571 { &hf_homeplug_psr_txcloss
,
1572 { "Transmit Contention Loss Counter", "homeplug.psr.txcloss",
1573 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1576 { &hf_homeplug_psr_txcoll
,
1577 { "Transmit Collision Counter", "homeplug.psr.txcoll",
1578 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1581 { &hf_homeplug_psr_txca3lat
,
1582 { "Transmit CA3 Latency Counter", "homeplug.psr.txca3lat",
1583 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1586 { &hf_homeplug_psr_txca2lat
,
1587 { "Transmit CA2 Latency Counter", "homeplug.psr.txca2lat",
1588 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1590 { &hf_homeplug_psr_txca1lat
,
1591 { "Transmit CA1 Latency Counter", "homeplug.psr.txca1lat",
1592 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1594 { &hf_homeplug_psr_txca0lat
,
1595 { "Transmit CA0 Latency Counter", "homeplug.psr.txca0lat",
1596 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1599 { &hf_homeplug_psr_rxbp40
,
1600 { "Receive Cumulative Bytes per 40-symbol", "homeplug.psr.rxbp40",
1601 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1604 /* Set Local Parameters */
1606 { "Set Local Parameters", "homeplug.slp",
1607 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1610 { &hf_homeplug_slp_ma
,
1611 { "MAC Address", "homeplug.slp.ma",
1612 FT_ETHER
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1616 { &hf_homeplug_loader
,
1617 { "Loader", "homeplug.leader",
1618 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1621 { &hf_homeplug_loader_mid
,
1622 { "Message ID", "homeplug.loader.mid",
1623 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1626 { &hf_homeplug_loader_length
,
1627 { "Length", "homeplug.loader.length",
1628 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1631 { &hf_homeplug_loader_status
,
1632 { "Status", "homeplug.loader.status",
1633 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1636 { &hf_homeplug_loader_version
,
1637 { "Version", "homeplug.loader.version",
1638 FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1641 { &hf_homeplug_loader_gdfv
,
1642 { "Get Device/Firmware Version", "homeplug.loader.gdfv",
1643 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1646 { &hf_homeplug_loader_lsf
,
1647 { "Start Firmware", "homeplug.loader.lsf",
1648 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1651 { &hf_homeplug_loader_lwm
,
1652 { "Write Memory", "homeplug.loader.lwm",
1653 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1656 { &hf_homeplug_loader_lrm
,
1657 { "Read Memory", "homeplug.loader.lrm",
1658 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1661 { &hf_homeplug_loader_lrnvm
,
1662 { "Read NVM Data", "homeplug.loader.lrnvm",
1663 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1666 { &hf_homeplug_loader_lwnvm
,
1667 { "Write NVM Data", "homeplug.loader.lwnvm",
1668 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1671 { &hf_homeplug_loader_lreset
,
1672 { "Reset", "homeplug.loader.lreset",
1673 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1676 { &hf_homeplug_loader_gmd
,
1677 { "Get Module Data", "homeplug.loader.gmd",
1678 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1681 { &hf_homeplug_loader_smd
,
1682 { "Set Module Data", "homeplug.loader.smd",
1683 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1686 { &hf_homeplug_loader_module_id
,
1687 { "Module ID", "homeplug.loader.module.id",
1688 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
1691 { &hf_homeplug_loader_module_offset
,
1692 { "Offset", "homeplug.loader.module.offset",
1693 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1696 { &hf_homeplug_loader_module_size
,
1697 { "Module size", "homeplug.loader.module.size",
1698 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1701 { &hf_homeplug_loader_data_length
,
1702 { "Data length", "homeplug.loader.data.length",
1703 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1706 { &hf_homeplug_loader_data_address
,
1707 { "Address", "homeplug.loader.data.address",
1708 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
1711 { &hf_homeplug_loader_data
,
1712 { "Data", "homeplug.loader.data",
1713 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1716 { &hf_homeplug_loader_cm
,
1717 { "Commit Modules", "homeplug.loader.cm",
1718 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1721 { &hf_homeplug_loader_lemd
,
1722 { "Erase Module Data", "homeplug.loader.emd",
1723 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1726 { &hf_homeplug_loader_lenvms
,
1727 { "Erase NVM Sectors", "homeplug.loader.lenvms",
1728 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1731 { &hf_homeplug_loader_gnvmp
,
1732 { "Get NVM Parameters", "homeplug.loader.gnvmp",
1733 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1736 { &hf_homeplug_loader_nvmp_type
,
1737 { "Type", "homeplug.loader.nvmp.type",
1738 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1741 { &hf_homeplug_loader_nvmp_pagesize
,
1742 { "Page Size", "homeplug.loader.nvmp.pagesize",
1743 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1746 { &hf_homeplug_loader_nvmp_blocksize
,
1747 { "Block Size", "homeplug.loader.nvmp.blocksize",
1748 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1751 { &hf_homeplug_loader_nvmp_memorysize
,
1752 { "Memory Size", "homeplug.loader.nvmp.memorysize",
1753 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1756 { &hf_homeplug_loader_snvmp
,
1757 { "Set NVM Parameters", "homeplug.loader.snvmp",
1758 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1762 { &hf_homeplug_hreq
,
1763 { "Host Request", "homeplug.hreq",
1764 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1767 { &hf_homeplug_hreq_mid
,
1768 { "Message ID", "homeplug.hreq.mid",
1769 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1772 { &hf_homeplug_hreq_gdv
,
1773 { "Get Device Version", "homeplug.hreq.gdv",
1774 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1777 { &hf_homeplug_hreq_gfv
,
1778 { "Get Firmware Version", "homeplug.hreq.gfv",
1779 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1782 { &hf_homeplug_hreq_gnek
,
1783 { "Get Network Encryption Key", "homeplug.hreq.gnek",
1784 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1787 { &hf_homeplug_hreq_gclbpl
,
1788 { "Get/Clear Local Bridge Proxy List", "homeplug.hreq.gclbpl",
1789 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1792 { &hf_homeplug_hreq_nvds
,
1793 { "Non-volatile Database Status", "homeplug.hreq.nvds",
1794 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1797 { &hf_homeplug_hreq_grbt
,
1798 { "Get Remote Bridge Table", "homeplug.hreq.grbt",
1799 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1802 { &hf_homeplug_hreq_gslnm
,
1803 { "Get/Set Logical Network Mapping", "homeplug.hreq.gslnm",
1804 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1807 { &hf_homeplug_hreq_gsss
,
1808 { "Get/Set Spectral Scaling", "homeplug.hreq.gsss",
1809 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1812 { &hf_homeplug_hreq_rsl
,
1813 { "Reset Secondary Loader", "homeplug.hreq.rsl",
1814 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1817 { &hf_homeplug_hreq_reset
,
1818 { "Reset", "homeplug.hreq.reset",
1819 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1822 { &hf_homeplug_hreq_reset_type
,
1823 { "Type", "homeplug.hreq.reset.type",
1824 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1827 { &hf_homeplug_hreq_reset_delay
,
1828 { "Delay", "homeplug.hreq.reset.delay",
1829 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1833 { &hf_homeplug_hrsp
,
1834 { "Host Response", "homeplug.hrsp",
1835 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1838 { &hf_homeplug_hrsp_mid
,
1839 { "Message ID", "homeplug.hrsp.mid",
1840 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1843 { &hf_homeplug_hrsp_gdvr
,
1844 { "Get Device Version", "homeplug.hrsp.gdvr",
1845 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1848 { &hf_homeplug_hrsp_gfvr
,
1849 { "Get Firmware Version", "homeplug.hrsp.gfvr",
1850 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1853 { &hf_homeplug_hrsp_gnekr
,
1854 { "Get Network Encryption Key", "homeplug.hrsp.gnekr",
1855 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1858 { &hf_homeplug_hrsp_gnekr_select
,
1859 { "Key Select", "homeplug.hrsp.gnekr.select",
1860 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1863 { &hf_homeplug_hrsp_gnekr_key
,
1864 { "Key", "homeplug.hrsp.gnekr.key",
1865 FT_UINT64
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
1868 { &hf_homeplug_hrsp_invalid
,
1869 { "Invalid", "homeplug.hrsp.invalid",
1870 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1873 { &hf_homeplug_hrsp_version
,
1874 { "Version", "homeplug.hrsp.version",
1875 FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1878 /* Network Statistics */
1880 { "Network Statistics", "homeplug.ns",
1881 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1884 { &hf_homeplug_ns_extended
,
1885 { "Network Statistics is Extended", "homeplug.ns.extended",
1886 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, "Network Statistics is Extended (MELEN >= 199)", HFILL
}
1889 { &hf_homeplug_ns_netw_ctrl_ac
,
1890 { "Action Control", "homeplug.ns.ac",
1891 FT_BOOLEAN
, 8, TFS(&homeplug_ns_ac_vals
), HOMEPLUG_NS_AC
, NULL
, HFILL
}
1894 { &hf_homeplug_ns_netw_ctrl_icid
,
1895 { "IC_ID", "homeplug.ns.icid",
1896 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(homeplug_ns_icid_vals
), HOMEPLUG_NS_ICID
, NULL
, HFILL
}
1899 { &hf_homeplug_ns_bytes40_robo
,
1900 { "Bytes in 40 symbols in ROBO", "homeplug.ns.bytes40_robo",
1901 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1904 { &hf_homeplug_ns_mhz
,
1905 { "Mhz", "homeplug.ns.mhz",
1906 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(homeplug_fmt_mhz
), 0x0, NULL
, HFILL
}
1909 { &hf_homeplug_ns_fails_robo
,
1910 { "Fails Received in ROBO", "homeplug.ns.fails_robo",
1911 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1914 { &hf_homeplug_ns_drops_robo
,
1915 { "Frame Drops in ROBO", "homeplug.ns.drops_robo",
1916 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1919 { &hf_homeplug_ns_netw_da
,
1920 { "Address of Network DA", "homeplug.ns.netw_da",
1921 FT_ETHER
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1924 { &hf_homeplug_ns_bytes40
,
1925 { "Bytes in 40 symbols", "homeplug.ns.bytes40",
1926 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1929 { &hf_homeplug_ns_fails
,
1930 { "Fails Received", "homeplug.ns.fails",
1931 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1934 { &hf_homeplug_ns_drops
,
1935 { "Frame Drops", "homeplug.ns.drops",
1936 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
1941 { &hf_homeplug_ns_tx_bfr_state
,
1942 { "Transmit Buffer State", "homeplug.ns.tx_bfr_state",
1943 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1947 { &hf_homeplug_ns_buf_in_use
,
1948 { "Buffer in use", "homeplug.ns.buf_in_use",
1949 FT_BOOLEAN
, 8, TFS(&homeplug_ns_buf_in_use_vals
), HOMEPLUG_NS_BUF_IN_USE
,
1950 "Buffer in use (1) or Available (0)", HFILL
}
1953 { &hf_homeplug_ns_prio
,
1954 { "Priority", "homeplug.ns.prio",
1955 FT_UINT8
, BASE_DEC
, VALS(homeplug_txprio_vals
), HOMEPLUG_NS_PRIO
,
1959 { &hf_homeplug_ns_msdu_len
,
1960 { "MSDU Length", "homeplug.ns.msdu_len",
1961 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_NS_MSDU_LEN
, NULL
, HFILL
}
1964 { &hf_homeplug_ns_seqn
,
1965 { "Sequence Number", "homeplug.ns.seqn",
1966 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_NS_SEQN
, NULL
, HFILL
}
1969 { &hf_homeplug_ns_toneidx
,
1970 { "Transmit tone map index", "homeplug.ns.toneidx",
1971 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_NS_TONEIDX
,
1972 "Maps to the 16 statistics occurring earlier in this MME", HFILL
}
1975 /* Bridging Characteristics Network */
1977 { "Bridging Characteristics Network", "homeplug.bcn",
1978 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
1981 { &hf_homeplug_bcn_network
,
1982 { "Network", "homeplug.bcn.network",
1983 FT_BOOLEAN
, 8, TFS(&homeplug_bc_network_vals
), HOMEPLUG_BC_NETWORK
,
1984 "Local (0) or Network Bridge (1) Information", HFILL
}
1987 { &hf_homeplug_bcn_return
,
1988 { "Return/Set", "homeplug.bcn.return",
1989 FT_BOOLEAN
, 8, TFS(&homeplug_bc_return_vals
), HOMEPLUG_BC_RETURN
,
1990 "From host: Return (1) or set bridging characteristics (0)", HFILL
}
1993 { &hf_homeplug_bcn_rsvd
,
1994 { "Reserved", "homeplug.bcn.rsvd",
1995 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_BCN_RSVD
, NULL
, HFILL
}
1998 { &hf_homeplug_bcn_fbn
,
1999 { "First Bridge Number", "homeplug.bcn.fbn",
2000 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_BCN_FBN
, NULL
, HFILL
}
2003 { &hf_homeplug_bcn_brda
,
2004 { "Address of Bridge", "homeplug.bcn.brda",
2005 FT_ETHER
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2008 { &hf_homeplug_bcn_bp_das
,
2009 { "Number of bridge proxied DAs", "homeplug.bcn.bp_das",
2010 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2011 "Number of bridge proxied DAs supported", HFILL
}
2014 { &hf_homeplug_bcn_bp_da
,
2015 { "Bridged DA", "homeplug.bcn.bp_da",
2016 FT_ETHER
, BASE_NONE
, NULL
, 0x0, "Bridged Destination Address", HFILL
}
2019 /* Bridging Characteristics Local */
2021 { "Bridging Characteristics Local", "homeplug.bcl",
2022 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2025 { &hf_homeplug_bcl_network
,
2026 { "Network/Local", "homeplug.bcl.network",
2027 FT_BOOLEAN
, 8, TFS(&homeplug_bc_network_vals
), HOMEPLUG_BC_NETWORK
,
2028 "Local (0) or Network Bridge (1) Information", HFILL
}
2031 { &hf_homeplug_bcl_return
,
2032 { "Return/Set", "homeplug.bcl.return",
2033 FT_BOOLEAN
, 8, TFS(&homeplug_bc_return_vals
), HOMEPLUG_BC_RETURN
,
2034 "From host: Return (1) or set bridging characteristics (0)", HFILL
}
2037 { &hf_homeplug_bcl_rsvd
,
2038 { "Reserved", "homeplug.bcl.rsvd",
2039 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_BCL_RSVD
, NULL
, HFILL
}
2042 { &hf_homeplug_bcl_hprox_das
,
2043 { "Number of host proxied DAs", "homeplug.bcl.hprox_das",
2044 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2045 "Number of host proxied DAs supported by the bridge application", HFILL
}
2048 { &hf_homeplug_bcl_hpbda
,
2049 { "Host Proxied DA", "homeplug.bcl.hpbda",
2050 FT_ETHER
, BASE_NONE
, NULL
, 0x0, "Host Proxied Bridged Destination Address", HFILL
}
2053 /* Set Transmit Characteristics */
2055 { "Set Transmit Characteristics", "homeplug.stc",
2056 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2059 { &hf_homeplug_stc_lco
,
2060 { "Local Consumption Only", "homeplug.stc.lco",
2061 FT_BOOLEAN
, 8, NULL
, HOMEPLUG_STC_LCO
,
2062 "Do not transmit subsequent frames to medium", HFILL
}
2065 { &hf_homeplug_stc_encf
,
2066 { "Encryption Flag", "homeplug.stc.encf",
2067 FT_BOOLEAN
, 8, NULL
, HOMEPLUG_STC_ENCF
, "Encrypt subsequent frames", HFILL
}
2070 { &hf_homeplug_stc_txprio
,
2071 { "Transmit Priority", "homeplug.stc.txprio",
2072 FT_UINT8
, BASE_DEC
, VALS(homeplug_txprio_vals
), HOMEPLUG_STC_TXPRIO
,
2076 { &hf_homeplug_stc_rexp
,
2077 { "Response Expected", "homeplug.stc.rexp",
2078 FT_BOOLEAN
, 8, NULL
, HOMEPLUG_STC_REXP
,
2079 "Mark subsequent frames to receive response", HFILL
}
2082 { &hf_homeplug_stc_txcf
,
2083 { "Transmit Contention Free", "homeplug.stc.txcf",
2084 FT_BOOLEAN
, 8, NULL
, HOMEPLUG_STC_TXCF
,
2085 "Mark subsequently transmitted frames as contention free", HFILL
}
2088 { &hf_homeplug_stc_cftop
,
2089 { "Contention Free Transmit Override Priority", "homeplug.stc.cftop",
2090 FT_BOOLEAN
, 8, TFS(&homeplug_stc_cftop_vals
), HOMEPLUG_STC_CFTOP
,
2091 "Transmit subsequent contention free frames with CA2/CA3 priority", HFILL
}
2094 { &hf_homeplug_stc_rsvd1
,
2095 { "Reserved", "homeplug.stc.rsvd1",
2096 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_STC_RSVD1
, NULL
, HFILL
}
2099 { &hf_homeplug_stc_retry
,
2100 { "Retry Control", "homeplug.stc.retry",
2101 FT_UINT8
, BASE_DEC
, VALS(homeplug_stc_retry_vals
), HOMEPLUG_STC_RETRY
,
2105 { &hf_homeplug_stc_rsvd2
,
2106 { "Reserved", "homeplug.stc.rsvd2",
2107 FT_UINT8
, BASE_DEC
, NULL
, HOMEPLUG_STC_RSVD2
, NULL
, HFILL
}
2110 { &hf_homeplug_stc_dder
,
2111 { "Disable Default Encryption Receive", "homeplug.stc.dder",
2112 FT_BOOLEAN
, 8, NULL
, HOMEPLUG_STC_DDER
, NULL
, HFILL
}
2115 { &hf_homeplug_stc_dur
,
2116 { "Disable Unencrypted Receive", "homeplug.stc.dur",
2117 FT_BOOLEAN
, 8, NULL
, HOMEPLUG_STC_DUR
, NULL
, HFILL
}
2120 { &hf_homeplug_stc_ebp
,
2121 { "INT51X1 (Host/DTE Option) Enable Backpressure", "homeplug.stc.ebp",
2122 FT_BOOLEAN
, 8, NULL
, HOMEPLUG_STC_EBP
,
2126 { &hf_homeplug_stc_dees
,
2127 { "Disable EEPROM Save", "homeplug.stc.dees",
2128 FT_BOOLEAN
, 8, NULL
, HOMEPLUG_STC_DEES
, NULL
, HFILL
}
2131 { &hf_homeplug_stc_txeks
,
2132 { "EKS to be used for encryption", "homeplug.stc.txeks",
2133 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
2136 /* Undecoded data */
2137 { &hf_homeplug_data
,
2138 { "Data", "homeplug.data",
2139 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
2143 /* Setup protocol subtree array */
2144 static int *ett
[] = {
2146 &ett_homeplug_mctrl
,
2147 &ett_homeplug_mehdr
,
2151 &ett_homeplug_vs_mid
,
2156 &ett_homeplug_loader
,
2160 &ett_homeplug_tx_bfr_state
,
2163 &ett_homeplug_bridge
,
2168 static ei_register_info ei
[] = {
2169 { &ei_homeplug_tone_map_not_exist
, { "homeplug.tone_map_not_exist", PI_PROTOCOL
, PI_WARN
, "Tone Map does not exist", EXPFILL
}},
2172 expert_module_t
* expert_homeplug
;
2174 proto_homeplug
= proto_register_protocol("HomePlug protocol", "HomePlug", "homeplug");
2176 proto_register_field_array(proto_homeplug
, hf
, array_length(hf
));
2177 proto_register_subtree_array(ett
, array_length(ett
));
2178 expert_homeplug
= expert_register_protocol(proto_homeplug
);
2179 expert_register_field_array(expert_homeplug
, ei
, array_length(ei
));
2181 homeplug_handle
= register_dissector("homeplug", dissect_homeplug
, proto_homeplug
);
2185 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2190 * indent-tabs-mode: nil
2193 * ex: set shiftwidth=2 tabstop=8 expandtab:
2194 * :indentSize=2:tabSize=8:noTabs=true: