From Didier Gautheron:
[obnox/wireshark/wip.git] / plugins / wimax / mac_mgmt_msg_decoder.c
1 /* mac_mgmt_msg_decoder.c
2  * WiMax MAC Management Message decoder
3  *
4  * Copyright (c) 2007 by Intel Corporation.
5  *
6  * Author: Lu Pan <lu.pan@intel.com>
7  *
8  * $Id$
9  *
10  * Wireshark - Network traffic analyzer
11  * By Gerald Combs <gerald@wireshark.org>
12  * Copyright 1999 Gerald Combs
13  *
14  * This program is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU General Public License
16  * as published by the Free Software Foundation; either version 2
17  * of the License, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the Free Software
26  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
27  */
28
29 /* Include files */
30
31 #ifdef HAVE_CONFIG_H
32 #include "config.h"
33 #endif
34
35 #include <glib.h>
36 #include <epan/packet.h>
37 #include "wimax_mac.h"
38
39 extern gint proto_wimax;
40
41 extern void proto_register_wimax_utility_decoders(void);
42
43 extern void proto_register_mac_mgmt_msg_dcd(void);
44 extern void proto_register_mac_mgmt_msg_ucd(void);
45 extern void proto_register_mac_mgmt_msg_dlmap(void);
46 extern void proto_register_mac_mgmt_msg_ulmap(void);
47 extern void proto_register_mac_mgmt_msg_rng_req(void);
48 extern void proto_register_mac_mgmt_msg_rng_rsp(void);
49 extern void proto_register_mac_mgmt_msg_reg_req(void);
50 extern void proto_register_mac_mgmt_msg_reg_rsp(void);
51 extern void proto_register_mac_mgmt_msg_dsa(void);
52 extern void proto_register_mac_mgmt_msg_dsc(void);
53 extern void proto_register_mac_mgmt_msg_dsd(void);
54 extern void proto_register_mac_mgmt_msg_arq_feedback(void);
55 extern void proto_register_mac_mgmt_msg_arq_discard(void);
56 extern void proto_register_mac_mgmt_msg_arq_reset(void);
57 extern void proto_register_mac_mgmt_msg_dreg_req(void);
58 extern void proto_register_mac_mgmt_msg_dreg_cmd(void);
59 extern void proto_register_mac_mgmt_msg_fpc(void);
60 extern void proto_register_mac_mgmt_msg_sbc(void);
61 extern void proto_register_mac_mgmt_msg_pkm(void);
62 extern void proto_register_mac_mgmt_msg_pmc_req(void);
63 extern void proto_register_mac_mgmt_msg_pmc_rsp(void);
64 extern void proto_register_mac_mgmt_msg_prc_lt_ctrl(void);
65 extern void proto_register_mac_mgmt_msg_aas_fbck(void);
66 extern void proto_register_mac_mgmt_msg_aas_beam(void);
67 extern void proto_register_mac_mgmt_msg_res_cmd(void);
68 extern void proto_register_mac_mgmt_msg_rep(void);
69 extern void proto_register_mac_mgmt_msg_clk_cmp(void);
70 extern void proto_register_mac_mgmt_msg_dsx_rvd(void);
71
72 extern void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
73 extern void dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
74 extern void dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
75 extern void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
76 extern void dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
77 extern void dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
78 extern void dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
79 extern void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
80 extern void dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
81 extern void dissect_mac_mgmt_msg_pkm_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
82 extern void dissect_mac_mgmt_msg_dsa_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
83 extern void dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
84 extern void dissect_mac_mgmt_msg_dsa_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
85 extern void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
86 extern void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
87 extern void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
88 extern void dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
89 extern void dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
90 extern void dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
91 extern void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
92 extern void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
93 extern void dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
94 extern void dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
95 extern void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
96 extern void dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
97 extern void dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
98 extern void dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
99 extern void dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
100 extern void dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
101 extern void dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
102 extern void dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
103 extern void dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
104 extern void dissect_mac_mgmt_msg_res_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
105 extern void dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
106 extern void dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
107 extern void dissect_mac_mgmt_msg_clk_cmp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
108 extern void dissect_mac_mgmt_msg_dsx_rvd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
109
110 static gint proto_mac_mgmt_msg_decoder = -1;
111 static gint ett_mac_mgmt_msg_decoder = -1;
112
113 /* WIMAX MAC Management message type info */
114 char *mgt_msg_abbrv[MAC_MGMT_MSG_TYPE_MAX] =
115 {
116         "UCD",          /* 0 */
117         "DCD",
118         "DL-MAP",
119         "UL-MAP",
120         "RNG-REQ",
121         "RNG-RSP",
122         "REG-REQ",
123         "REG-RSP",
124         "Reserved8",
125         "PKM-REQ",
126         "PKM-RSP",      /* 10 */
127         "DSA-REQ",
128         "DSA-RSP",
129         "DSA-ACK",
130         "DSC-REQ",
131         "DSC-RSP",
132         "DSC-ACK",
133         "DSD-REQ",
134         "DSD-RSP",
135         "Reserved19",
136         "Reserved20",           /* 20 */
137         "MCA-REQ",
138         "MCA-RSP",
139         "DBPC-REQ",
140         "DBPC-RSP",
141         "RES-CMD",
142         "SBC-REQ",
143         "SBC-RSP",
144         "CLK-CMP",
145         "DREG-CMD",
146         "DSX-RVD",      /* 30 */
147         "TFTP-CPLT",
148         "TFTP-RSP",
149         "ARQ-FEEDBACK",
150         "ARQ-DISCARD",
151         "ARQ-RESET",
152         "REP-REQ",
153         "REP-RSP",
154         "FPC",
155         "MSH-NCFG",
156         "MSH-NENT",     /* 40 */
157         "MSH-DSCH",
158         "MSH-CSCH",
159         "MSH-CSCF",
160         "AAS-FBCK_REQ",
161         "AAS-FBCK_RSP",
162         "AAS-BEAM_SELECT",
163         "AAS-BEAM_REQ",
164         "AAS-BEAM_RSP",
165         "DREG-REQ",
166         "MOB-SLP-REQ",  /* 50 */
167         "MOB-SLP-RSP",
168         "MOB-TRF-IND",
169         "MOB-NBR-ADV",
170         "MOB-SCN-REQ",
171         "MOB-SCN-RSP",
172         "MOB-BSHO-REQ",
173         "MOB-MSHO-REQ",
174         "MOB-BSHO-RSP",
175         "MOB-HO-IND",
176         "MOB-SCN-REP",  /* 60 */
177         "MOB-PAG-ADV",
178         "MBS-MAP",
179         "PMC-REQ",
180         "PMC-RSP",
181         "PRC-LT-CTRL",
182         "MOB-ASC-REP"
183 };
184
185 static gint hf_mac_mgmt_msg_values = -1;
186 static gint hf_mac_mgmt_msg_unknown_type = -1;
187
188
189 void dissect_mac_mgmt_msg_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
190 {
191         guint offset = 0;
192         guint tvb_len, message_type;
193         dissector_handle_t mgt_msg_handle;
194         proto_item *parent_item = NULL;
195         proto_item *message_item = NULL;
196         proto_tree *message_tree = NULL;
197
198         {       /* we are being asked for details */
199                 /* Get the tvb reported length */
200                 tvb_len =  tvb_reported_length(tvb);
201                 if(!tvb_len)
202                 {
203                         /* display the error message */
204                         proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "Error: Mac payload tvb is empty ! (%u bytes)", tvb_len);
205                         return;
206                 }
207                 /* Get the payload type */
208                 message_type = tvb_get_guint8(tvb, offset);
209                 /* add the payload type into the info column */
210                 if(message_type < MAC_MGMT_MSG_TYPE_MAX)
211                 {
212                         /* Display message type in Info column */
213                         if (check_col(pinfo->cinfo, COL_INFO))
214                         {
215                                 col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", mgt_msg_abbrv[message_type]);
216                         }
217                 }
218                 else
219                 {
220                         col_append_str(pinfo->cinfo, COL_INFO, "Unknown message type,");
221                         /* display MAC payload types */
222                         message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "Unknown message type: %u (%u bytes)", message_type, tvb_len);
223                         /* add MAC payload subtree */
224                         message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
225                         /* display the MAC payload in Hex */
226                         proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
227                         return;
228                 }
229                 /* get the parent */
230                 parent_item = proto_tree_get_parent(tree);
231                 /* add the MAC header info */
232                 proto_item_append_text(parent_item, ", %s", mgt_msg_abbrv[message_type]);
233                 /* Decode and display the MAC payload */
234                 switch (message_type)
235                 {
236                 case MAC_MGMT_MSG_UCD:
237                         /* UCD message handler */
238                         dissect_mac_mgmt_msg_ucd_decoder(tvb, pinfo, tree);
239                 break;
240                 case MAC_MGMT_MSG_DCD:
241                         /* DCD message handler */
242                         dissect_mac_mgmt_msg_dcd_decoder(tvb, pinfo, tree);
243                 break;
244                 case MAC_MGMT_MSG_DL_MAP:
245                         /* DL-MAP message handler */
246                         dissect_mac_mgmt_msg_dlmap_decoder(tvb, pinfo, tree);
247                 break;
248                 case MAC_MGMT_MSG_UL_MAP:
249                         /* UL-MAP message handler */
250                         dissect_mac_mgmt_msg_ulmap_decoder(tvb, pinfo, tree);
251                 break;
252                 case MAC_MGMT_MSG_RNG_REQ:
253                         /* Ranging request message handler */
254                         dissect_mac_mgmt_msg_rng_req_decoder(tvb, pinfo, tree);
255                 break;
256                 case MAC_MGMT_MSG_RNG_RSP:
257                         /* Ranging response message handler */
258                         dissect_mac_mgmt_msg_rng_rsp_decoder(tvb, pinfo, tree);
259                 break;
260                 case MAC_MGMT_MSG_REG_REQ:
261                         /* Registration request message handler */
262                         dissect_mac_mgmt_msg_reg_req_decoder(tvb, pinfo, tree);
263                 break;
264                 case MAC_MGMT_MSG_REG_RSP:
265                         /* Registration response message handler */
266                         dissect_mac_mgmt_msg_reg_rsp_decoder(tvb, pinfo, tree);
267                 break;
268                 case MAC_MGMT_MSG_PKM_REQ:
269                         /* Privacy Key Management request message handler */
270                         dissect_mac_mgmt_msg_pkm_req_decoder(tvb, pinfo, tree);
271                 break;
272                 case MAC_MGMT_MSG_PKM_RSP:
273                         /* Privacy Key Management response message handler */
274                         dissect_mac_mgmt_msg_pkm_rsp_decoder(tvb, pinfo, tree);
275                 break;
276                 case MAC_MGMT_MSG_DSA_REQ:
277                         /* Dynamic Service Addition request message handler */
278                         dissect_mac_mgmt_msg_dsa_req_decoder(tvb, pinfo, tree);
279                 break;
280                 case MAC_MGMT_MSG_DSA_RSP:
281                         /* Dynamic Service Addition response message handler */
282                         dissect_mac_mgmt_msg_dsa_rsp_decoder(tvb, pinfo, tree);
283                 break;
284                 case MAC_MGMT_MSG_DSA_ACK:
285                         /* Dynamic Service Addition acknowledge message handler */
286                         dissect_mac_mgmt_msg_dsa_ack_decoder(tvb, pinfo, tree);
287                 break;
288                 case MAC_MGMT_MSG_DSC_REQ:
289                         /* Dynamic Service Change request message handler */
290                         dissect_mac_mgmt_msg_dsc_req_decoder(tvb, pinfo, tree);
291                 break;
292                 case MAC_MGMT_MSG_DSC_RSP:
293                         /* Dynamic Service Change response message handler */
294                         dissect_mac_mgmt_msg_dsc_rsp_decoder(tvb, pinfo, tree);
295                 break;
296                 case MAC_MGMT_MSG_DSC_ACK:
297                         /* Dynamic Service Change acknowledge message handler */
298                         dissect_mac_mgmt_msg_dsc_ack_decoder(tvb, pinfo, tree);
299                 break;
300                 case MAC_MGMT_MSG_DSD_REQ:
301                         /* Dynamic Service Deletion request message handler */
302                         dissect_mac_mgmt_msg_dsd_req_decoder(tvb, pinfo, tree);
303                 break;
304                 case MAC_MGMT_MSG_DSD_RSP:
305                         /* Dynamic Service Deletion response message handler */
306                         dissect_mac_mgmt_msg_dsd_rsp_decoder(tvb, pinfo, tree);
307                 case MAC_MGMT_MSG_MCA_REQ:
308                         /* find the Multicast Assignment request message handler */
309                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mca_req_handler");
310                         if(mgt_msg_handle)
311                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
312                         else
313                         {
314                                 /* display MAC payload types */
315                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
316                                 /* add MAC payload subtree */
317                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
318                                 /* display the MAC payload in Hex */
319                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
320                         }
321                 break;
322                 case MAC_MGMT_MSG_MCA_RSP:
323                         /* find the Multicast Assignment response message handler */
324                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mca_rsp_handler");
325                         if(mgt_msg_handle)
326                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
327                         else
328                         {
329                                 /* display MAC payload types */
330                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
331                                 /* add MAC payload subtree */
332                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
333                                 /* display the MAC payload in Hex */
334                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
335                         }
336                 break;
337                 case MAC_MGMT_MSG_DBPC_REQ:
338                         /* find the DL Burst Profile Change request message handler */
339                         mgt_msg_handle = find_dissector("mac_mgmt_msg_dbpc_req_handler");
340                         if(mgt_msg_handle)
341                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
342                         else
343                         {
344                                 /* display MAC payload types */
345                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
346                                 /* add MAC payload subtree */
347                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
348                                 /* display the MAC payload in Hex */
349                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
350                         }
351                 break;
352                 case MAC_MGMT_MSG_DBPC_RSP:
353                         /* find the DL Burst Profile Change response message handler */
354                         mgt_msg_handle = find_dissector("mac_mgmt_msg_dbpc_rsp_handler");
355                         if(mgt_msg_handle)
356                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
357                         else
358                         {
359                                 /* display MAC payload types */
360                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
361                                 /* add MAC payload subtree */
362                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
363                                 /* display the MAC payload in Hex */
364                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
365                         }
366                 break;
367                 case MAC_MGMT_MSG_RES_CMD:
368                         /* Reset Command message handler */
369                         dissect_mac_mgmt_msg_res_cmd_decoder(tvb, pinfo, tree);
370                 break;
371                 case MAC_MGMT_MSG_SBC_REQ:
372                         /* SS Basic Capability request message handler */
373                         dissect_mac_mgmt_msg_sbc_req_decoder(tvb, pinfo, tree);
374                 break;
375                 case MAC_MGMT_MSG_SBC_RSP:
376                         /* SS Basic Capability response message handler */
377                         dissect_mac_mgmt_msg_sbc_rsp_decoder(tvb, pinfo, tree);
378                 break;
379                 case MAC_MGMT_MSG_CLK_CMP:
380                         /* SS Network Clock Comparison message handler */
381                         dissect_mac_mgmt_msg_clk_cmp_decoder(tvb, pinfo, tree);
382                 break;
383                 case MAC_MGMT_MSG_DREG_CMD:
384                         /* De/Re-register Command message handler */
385                         dissect_mac_mgmt_msg_dreg_cmd_decoder(tvb, pinfo, tree);
386                 break;
387                 case MAC_MGMT_MSG_DSX_RVD:
388                         /* DSx Recieved message handler */
389                         dissect_mac_mgmt_msg_dsx_rvd_decoder(tvb, pinfo, tree);
390                 break;
391                 case MAC_MGMT_MSG_TFTP_CPLT:
392                         /* find the Config File TFTP Complete message handler */
393                         mgt_msg_handle = find_dissector("mac_mgmt_msg_tftp_cplt_handler");
394                         if(mgt_msg_handle)
395                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
396                         else
397                         {
398                                 /* display MAC payload types */
399                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
400                                 /* add MAC payload subtree */
401                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
402                                 /* display the MAC payload in Hex */
403                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
404                         }
405                 break;
406                 case MAC_MGMT_MSG_TFTP_RSP:
407                         /* find the Config File TFTP Complete response message handler */
408                         mgt_msg_handle = find_dissector("mac_mgmt_msg_tftp_rsp_handler");
409                         if(mgt_msg_handle)
410                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
411                         else
412                         {
413                                 /* display MAC payload types */
414                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
415                                 /* add MAC payload subtree */
416                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
417                                 /* display the MAC payload in Hex */
418                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
419                         }
420                 break;
421                 case MAC_MGMT_MSG_ARQ_FEEDBACK:
422                         /* Standalone ARQ feedback message handler */
423                         dissect_mac_mgmt_msg_arq_feedback_decoder(tvb, pinfo, tree);
424                 break;
425                 case MAC_MGMT_MSG_ARQ_DISCARD:
426                         dissect_mac_mgmt_msg_arq_discard_decoder(tvb, pinfo, tree);
427                 break;
428                 case MAC_MGMT_MSG_ARQ_RESET:
429                         /* ARQ Reset message handler */
430                         dissect_mac_mgmt_msg_arq_reset_decoder(tvb, pinfo, tree);
431                 break;
432                 case MAC_MGMT_MSG_REP_REQ:
433                         /* Channel measurement Report request message handler */
434                         dissect_mac_mgmt_msg_rep_req_decoder(tvb, pinfo, tree);
435                 break;
436                 case MAC_MGMT_MSG_REP_RSP:
437                         /* Channel measurement Report response message handler */
438                         dissect_mac_mgmt_msg_rep_rsp_decoder(tvb, pinfo, tree);
439                 break;
440                 case MAC_MGMT_MSG_FPC:
441                         /* Fast Power Control message handler */
442                         dissect_mac_mgmt_msg_fpc_decoder(tvb, pinfo, tree);
443                 break;
444                 case MAC_MGMT_MSG_MSH_NCFG:
445                         /* find the Mesh Network Configuration message handler */
446                         mgt_msg_handle = find_dissector("mac_mgmt_msg_ncfg_handler");
447                         if(mgt_msg_handle)
448                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
449                         else
450                         {
451                                 /* display MAC payload types */
452                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
453                                 /* add MAC payload subtree */
454                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
455                                 /* display the MAC payload in Hex */
456                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
457                         }
458                 break;
459                 case MAC_MGMT_MSG_MSH_NENT:
460                         /* find the Mesh Network Entry message handler */
461                         mgt_msg_handle = find_dissector("mac_mgmt_msg_nent_handler");
462                         if(mgt_msg_handle)
463                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
464                         else
465                         {
466                                 /* display MAC payload types */
467                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
468                                 /* add MAC payload subtree */
469                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
470                                 /* display the MAC payload in Hex */
471                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
472                         }
473                 break;
474                 case MAC_MGMT_MSG_MSH_DSCH:
475                         /* find the Mesh Distributed Schedule message handler */
476                         mgt_msg_handle = find_dissector("mac_mgmt_msg_dsch_handler");
477                         if(mgt_msg_handle)
478                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
479                         else
480                         {
481                                 /* display MAC payload types */
482                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
483                                 /* add MAC payload subtree */
484                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
485                                 /* display the MAC payload in Hex */
486                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
487                         }
488                 break;
489                 case MAC_MGMT_MSG_MSH_CSCH:
490                         /* find the Mesh Centralized Schedule message handler */
491                         mgt_msg_handle = find_dissector("mac_mgmt_msg_csch_handler");
492                         if(mgt_msg_handle)
493                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
494                         else
495                         {
496                                 /* display MAC payload types */
497                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
498                                 /* add MAC payload subtree */
499                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
500                                 /* display the MAC payload in Hex */
501                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
502                         }
503                 break;
504                 case MAC_MGMT_MSG_MSH_CSCF:
505                         /* find the Mesh Centralized Schedule Configuration message handler */
506                         mgt_msg_handle = find_dissector("mac_mgmt_msg_cscf_handler");
507                         if(mgt_msg_handle)
508                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
509                         else
510                         {
511                                 /* display MAC payload types */
512                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
513                                 /* add MAC payload subtree */
514                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
515                                 /* display the MAC payload in Hex */
516                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
517                         }
518                 break;
519                 case MAC_MGMT_MSG_AAS_FBCK_REQ:
520                         /* AAS feedback request message handler */
521                         dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvb, pinfo, tree);
522                 break;
523                 case MAC_MGMT_MSG_AAS_FBCK_RSP:
524                         /* AAS feedback response message handler */
525                         dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvb, pinfo, tree);
526                 break;
527                 case MAC_MGMT_MSG_AAS_BEAM_SELECT:
528                         /* AAS Beam Select message handler */
529                         dissect_mac_mgmt_msg_aas_beam_select_decoder(tvb, pinfo, tree);
530                 break;
531                 case MAC_MGMT_MSG_AAS_BEAM_REQ:
532                         /* find the AAS Beam request message handler */
533                         mgt_msg_handle = find_dissector("mac_mgmt_msg_aas_beam_req_handler");
534                         if(mgt_msg_handle)
535                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
536                         else
537                         {
538                                 /* display MAC payload types */
539                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
540                                 /* add MAC payload subtree */
541                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
542                                 /* display the MAC payload in Hex */
543                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
544                         }
545                 break;
546                 case MAC_MGMT_MSG_AAS_BEAM_RSP:
547                         /* find the AAS Beam response message handler */
548                         mgt_msg_handle = find_dissector("mac_mgmt_msg_aas_beam_rsp_handler");
549                         if(mgt_msg_handle)
550                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
551                         else
552                         {
553                                 /* display MAC payload types */
554                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
555                                 /* add MAC payload subtree */
556                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
557                                 /* display the MAC payload in Hex */
558                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
559                         }
560                 break;
561                 case MAC_MGMT_MSG_DREG_REQ:
562                         /* SS De-registation message handler */
563                         dissect_mac_mgmt_msg_dreg_req_decoder(tvb, pinfo, tree);
564                 break;
565                 case MAC_MGMT_MSG_MOB_SLP_REQ:
566                         /* find the Sleep Request message handler */
567                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_slp_req_handler");
568                         if(mgt_msg_handle)
569                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
570                         else
571                         {
572                                 /* display MAC payload types */
573                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
574                                 /* add MAC payload subtree */
575                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
576                                 /* display the MAC payload in Hex */
577                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
578                         }
579                 break;
580                 case MAC_MGMT_MSG_MOB_SLP_RSP:
581                         /* find the Sleep Response message handler */
582                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_slp_rsp_handler");
583                         if(mgt_msg_handle)
584                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
585                         else
586                         {
587                                 /* display MAC payload types */
588                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
589                                 /* add MAC payload subtree */
590                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
591                                 /* display the MAC payload in Hex */
592                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
593                         }
594                 break;
595                 case MAC_MGMT_MSG_MOB_TRF_IND:
596                         /* find the Traffic Indication message handler */
597                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_trf_ind_handler");
598                         if(mgt_msg_handle)
599                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
600                         else
601                         {
602                                 /* display MAC payload types */
603                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
604                                 /* add MAC payload subtree */
605                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
606                                 /* display the MAC payload in Hex */
607                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
608                         }
609                 break;
610                 case MAC_MGMT_MSG_MOB_NBR_ADV:
611                         /* find the Neighbor Advertisement message handler */
612                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_nbr_adv_handler");
613                         if(mgt_msg_handle)
614                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
615                         else
616                         {
617                                 /* display MAC payload types */
618                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
619                                 /* add MAC payload subtree */
620                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
621                                 /* display the MAC payload in Hex */
622                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
623                         }
624                 break;
625                 case MAC_MGMT_MSG_MOB_SCN_REQ:
626                         /* find the Scanning Interval Allocation Reqest message handler */
627                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_req_handler");
628                         if(mgt_msg_handle)
629                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
630                         else
631                         {
632                                 /* display MAC payload types */
633                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
634                                 /* add MAC payload subtree */
635                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
636                                 /* display the MAC payload in Hex */
637                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
638                         }
639                 break;
640                 case MAC_MGMT_MSG_MOB_SCN_RSP:
641                         /* find the Scanning Interval Allocation Response message handler */
642                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_rsp_handler");
643                         if(mgt_msg_handle)
644                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
645                         else
646                         {
647                                 /* display MAC payload types */
648                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
649                                 /* add MAC payload subtree */
650                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
651                                 /* display the MAC payload in Hex */
652                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
653                         }
654                 break;
655                 case MAC_MGMT_MSG_MOB_BSHO_REQ:
656                         /* find the BS HO Request message handler */
657                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_bsho_req_handler");
658                         if(mgt_msg_handle)
659                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
660                         else
661                         {
662                                 /* display MAC payload types */
663                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
664                                 /* add MAC payload subtree */
665                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
666                                 /* display the MAC payload in Hex */
667                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
668                         }
669                 break;
670                 case MAC_MGMT_MSG_MOB_MSHO_REQ:
671                         /* find the MS HO Request message handler */
672                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_msho_req_handler");
673                         if(mgt_msg_handle)
674                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
675                         else
676                         {
677                                 /* display MAC payload types */
678                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
679                                 /* add MAC payload subtree */
680                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
681                                 /* display the MAC payload in Hex */
682                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
683                         }
684                 break;
685                 case MAC_MGMT_MSG_MOB_BSHO_RSP:
686                         /* find the BS HO Response message handler */
687                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_bsho_rsp_handler");
688                         if(mgt_msg_handle)
689                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
690                         else
691                         {
692                                 /* display MAC payload types */
693                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
694                                 /* add MAC payload subtree */
695                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
696                                 /* display the MAC payload in Hex */
697                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
698                         }
699                 break;
700                 case MAC_MGMT_MSG_MOB_HO_IND:
701                         /* find the HO Indication message handler */
702                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_ho_ind_handler");
703                         if(mgt_msg_handle)
704                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
705                         else
706                         {
707                                 /* display MAC payload types */
708                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
709                                 /* add MAC payload subtree */
710                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
711                                 /* display the MAC payload in Hex */
712                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
713                         }
714                 break;
715                 case MAC_MGMT_MSG_MOB_SCN_REP:
716                         /* find the Scanning Result Report message handler */
717                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_rep_handler");
718                         if(mgt_msg_handle)
719                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
720                         else
721                         {
722                                 /* display MAC payload types */
723                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
724                                 /* add MAC payload subtree */
725                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
726                                 /* display the MAC payload in Hex */
727                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
728                         }
729                 break;
730                 case MAC_MGMT_MSG_MOB_PAG_ADV:
731                         /* find the BS Broadcast Paging message handler */
732                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_pag_adv_handler");
733                         if(mgt_msg_handle)
734                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
735                         else
736                         {
737                                 /* display MAC payload types */
738                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
739                                 /* add MAC payload subtree */
740                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
741                                 /* display the MAC payload in Hex */
742                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
743                         }
744                 break;
745                 case MAC_MGMT_MSG_MBS_MAP:
746                         /* find the MBS MAP message handler */
747                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mbs_map_handler");
748                         if(mgt_msg_handle)
749                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
750                         else
751                         {
752                                 /* display MAC payload types */
753                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
754                                 /* add MAC payload subtree */
755                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
756                                 /* display the MAC payload in Hex */
757                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
758                         }
759                 break;
760                 case MAC_MGMT_MSG_PMC_REQ:
761                         /* Power Control Mode Change Reuest message handler */
762                         dissect_mac_mgmt_msg_pmc_req_decoder(tvb, pinfo, tree);
763                 break;
764                 case MAC_MGMT_MSG_PMC_RSP:
765                         /* Power Control Mode Change Response message handler */
766                         dissect_mac_mgmt_msg_pmc_rsp_decoder(tvb, pinfo, tree);
767                 break;
768                 case MAC_MGMT_MSG_PRC_LT_CTRL:
769                         /* Setup/Tear-down of Long-term MIMO Precoding message handler */
770                         dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvb, pinfo, tree);
771                 break;
772                 case MAC_MGMT_MSG_MOB_ASC_REP:
773                         /* find the Association Result Report message handler */
774                         mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_asc_rep_handler");
775                         if(mgt_msg_handle)
776                                 call_dissector(mgt_msg_handle, tvb, pinfo, tree);
777                         else
778                         {
779                                 /* display MAC payload types */
780                                 message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, tvb_len, "%s (%u bytes)", mgt_msg_abbrv[message_type], tvb_len);
781                                 /* add MAC payload subtree */
782                                 message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
783                                 /* display the MAC payload in Hex */
784                                 proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, tvb_len, FALSE);
785                         }
786                 break;
787                 default:
788                         /* display the unknown message in hex */
789                         proto_tree_add_item(tree, hf_mac_mgmt_msg_unknown_type, tvb, offset, (tvb_len - offset), FALSE);
790                 break;
791                 }
792         }
793 }
794
795 /* Register Wimax Mac Payload Protocol and Dissector */
796 void proto_register_mac_mgmt_msg(void)
797 {
798         /* Payload display */
799         static hf_register_info hf[] =
800         {
801                 {
802                         &hf_mac_mgmt_msg_values,
803                         {
804                                 "Values", "wmx.values",
805                                 FT_BYTES, BASE_NONE, NULL, 0x0,
806                                 NULL, HFILL
807                         }
808                 },
809                 {
810                         &hf_mac_mgmt_msg_unknown_type,
811                         {
812                                 "Unknown MAC Message Type", "wmx.unknown_type",
813                                 FT_BYTES, BASE_NONE, NULL, 0x0,
814                                 NULL, HFILL
815                         }
816                 }
817         };
818
819         /* Setup protocol subtree array */
820         static gint *ett[] =
821                 {
822                         &ett_mac_mgmt_msg_decoder,
823                 };
824
825         proto_mac_mgmt_msg_decoder = proto_wimax;
826 #if 0
827         proto_mac_mgmt_msg_decoder = proto_register_protocol (
828                 "WiMax MAC Management Message", /* name       */
829                 "MGMT MSG",                     /* short name */
830                 "wmx.mgmtmsg"                   /* abbrev     */
831                 );
832 #endif
833
834         proto_register_field_array(proto_mac_mgmt_msg_decoder, hf, array_length(hf));
835         proto_register_subtree_array(ett, array_length(ett));
836
837         /* Register dissector by name */
838         register_dissector("wmx_mac_mgmt_msg_decoder", dissect_mac_mgmt_msg_decoder,
839                            proto_mac_mgmt_msg_decoder);
840
841         proto_register_mac_mgmt_msg_dcd();
842         proto_register_mac_mgmt_msg_ucd();
843         proto_register_mac_mgmt_msg_dlmap();
844         proto_register_mac_mgmt_msg_ulmap();
845         proto_register_mac_mgmt_msg_rng_req();
846         proto_register_mac_mgmt_msg_rng_rsp();
847         proto_register_mac_mgmt_msg_reg_req();
848         proto_register_mac_mgmt_msg_reg_rsp();
849         proto_register_mac_mgmt_msg_dsa();
850         proto_register_mac_mgmt_msg_dsc();
851         proto_register_mac_mgmt_msg_dsd();
852         proto_register_mac_mgmt_msg_arq_feedback();
853         proto_register_mac_mgmt_msg_arq_discard();
854         proto_register_mac_mgmt_msg_arq_reset();
855         proto_register_mac_mgmt_msg_dreg_req();
856         proto_register_mac_mgmt_msg_dreg_cmd();
857         proto_register_mac_mgmt_msg_fpc();
858         proto_register_mac_mgmt_msg_sbc();
859         proto_register_mac_mgmt_msg_pkm();
860         proto_register_mac_mgmt_msg_pmc_req();
861         proto_register_mac_mgmt_msg_pmc_rsp();
862         proto_register_mac_mgmt_msg_prc_lt_ctrl();
863         proto_register_mac_mgmt_msg_aas_fbck();
864         proto_register_mac_mgmt_msg_aas_beam();
865         proto_register_mac_mgmt_msg_res_cmd();
866         proto_register_mac_mgmt_msg_rep();
867         proto_register_mac_mgmt_msg_clk_cmp();
868         proto_register_mac_mgmt_msg_dsx_rvd();
869
870         proto_register_wimax_utility_decoders();
871 }