aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/wimax/msg_dreg.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-06-22 04:58:08 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-06-22 04:58:08 +0000
commitf8c959dc8c4e46f733dbd4dcc954e6fa3304b248 (patch)
tree1ac2ca9d8478f5fd796c6bf17654b0899faa99f2 /plugins/wimax/msg_dreg.c
parent135ca5136ff5a9d79341228ca9e325ccba733214 (diff)
From Kovarththanan Rajaratnam:
Move header field info declarations into function scope. This is the first step. Another patch will be submitted which actually scrubs the header field info declarations (remove empty blurbs, etc.) svn path=/trunk/; revision=28797
Diffstat (limited to 'plugins/wimax/msg_dreg.c')
-rw-r--r--plugins/wimax/msg_dreg.c361
1 files changed, 180 insertions, 181 deletions
diff --git a/plugins/wimax/msg_dreg.c b/plugins/wimax/msg_dreg.c
index 72c0518e9f..7ef549946b 100644
--- a/plugins/wimax/msg_dreg.c
+++ b/plugins/wimax/msg_dreg.c
@@ -145,187 +145,6 @@ Action Code 03 cancels this restriction"},
{0, NULL}
};
-/* DREG fields display */
-static hf_register_info hf[] =
-{
- {
- &hf_dreg_consider_paging_pref,
- {
- "Consider Paging Preference of each Service Flow in resource retention", "wmx.dreg.consider_paging_preference",
- FT_UINT8, BASE_DEC, NULL, 0x80, "", HFILL
- }
- },
- {
- &hf_dreg_invalid_tlv,
- {
- "Invalid TLV", "wmx.dreg.invalid_tlv",
- FT_BYTES, BASE_HEX, NULL, 0, "", HFILL
- }
- },
- {
- &hf_mac_hash_skip_threshold,
- {
- "MAC Hash Skip Threshold", "wmx.dreg.mac_hash_skip_threshold",
- FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL
- }
- },
- {
- &hf_paging_controller_id,
- {
- "Paging Controller ID", "wmx.dreg.paging_controller_id",
- FT_ETHER, BASE_DEC, NULL, 0x0, "", HFILL
- }
- },
- {
- &hf_dreg_paging_cycle,
- {
- "PAGING CYCLE", "wmx.dreg.paging_cycle",
- FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL
- }
- },
- {
- &hf_dreg_paging_cycle_request,
- {
- "Paging Cycle Request", "wmx.dreg.paging_cycle_request",
- FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL
- }
- },
- {
- &hf_dreg_paging_group_id,
- {
- "Paging-group-ID", "wmx.dreg.paging_group_id",
- FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL
- }
- },
- {
- &hf_dreg_paging_offset,
- {
- "PAGING OFFSET", "wmx.dreg.paging_offset",
- FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
- }
- },
- {
- &hf_dreg_req_duration,
- {
- "REQ-duration (Waiting value for the DREG-REQ message re-transmission in frames)", "wmx.dreg.req_duration",
- FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
- }
- },
- {
- &hf_dreg_retain_ms_service_full_service,
- {
- "Retain MS service and operation information associated with Full service", "wmx.dreg.retain_ms_full_service",
- FT_UINT8, BASE_DEC, NULL, 0x40, "", HFILL
- }
- },
- {
- &hf_dreg_retain_ms_service_network_address,
- {
- "Retain MS service and operational information associated with Network Address", "wmx.dreg.retain_ms_service_network_address",
- FT_UINT8, BASE_DEC, NULL, 0x08, "", HFILL
- }
- },
- {
- &hf_dreg_retain_ms_service_pkm,
- {
- "Retain MS service and operational information associated with PKM-REQ/RSP", "wmx.dreg.retain_ms_service_pkm",
- FT_UINT8, BASE_DEC, NULL, 0x02, "", HFILL
- }
- },
- {
- &hf_dreg_retain_ms_service_reg,
- {
- "Retain MS service and operational information associated with REG-REQ/RSP", "wmx.dreg.retain_ms_service_reg",
- FT_UINT8, BASE_DEC, NULL, 0x04, "", HFILL
- }
- },
- {
- &hf_dreg_retain_ms_service_sbc,
- {
- "Retain MS service and operational information associated with SBC-REQ/RSP", "wmx.dreg.retain_ms_service_sbc",
- FT_UINT8, BASE_DEC, NULL, 0x01, "", HFILL
- }
- },
- {
- &hf_dreg_retain_ms_service_tftp,
- {
- "Retain MS service and operational information associated with TFTP messages", "wmx.dreg.retain_ms_service_tftp",
- FT_UINT8, BASE_DEC, NULL, 0x20, "", HFILL
- }
- },
- {
- &hf_dreg_retain_ms_service_tod,
- {
- "Retain MS service and operational information associated with Time of Day", "wmx.dreg.retain_ms_service_tod",
- FT_UINT8, BASE_DEC, NULL, 0x10, "", HFILL
- }
- },
- {
- &hf_dreg_cmd_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dreg_cmd",
- FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
- }
- },
- {
- &hf_dreg_cmd_action,
- {
- "DREG-CMD Action code", "wmx.dreg_cmd.action",
- FT_UINT8, BASE_DEC, VALS(vals_dreg_cmd_action), 0x07, "", HFILL
- }
- },
- {
- &hf_dreg_cmd_action_cor2,
- {
- "DREG-CMD Action code", "wmx.dreg_cmd.action",
- FT_UINT8, BASE_DEC, VALS(vals_dreg_cmd_action_cor2), 0x07, "", HFILL
- }
- },
- {
- &hf_dreg_cmd_reserved,
- {
- "Reserved", "wmx.dreg_cmd.action_reserved",
- FT_UINT8, BASE_DEC, NULL, 0xF8, "", HFILL
- }
- },
- {
- &hf_dreg_req_message_type,
- {
- "MAC Management Message Type", "wmx.macmgtmsgtype.dreg_req",
- FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
- }
- },
- {
- &hf_dreg_req_action,
- {
- "DREG-REQ Action code", "wmx.dreg_req.action",
- FT_UINT8, BASE_DEC, VALS(vals_dreg_req_code), 0x03, "", HFILL
- }
- },
- {
- &hf_dreg_req_reserved,
- {
- "Reserved", "wmx.dreg_req.action_reserved",
- FT_UINT8, BASE_DEC, NULL, 0xFC, "", HFILL
- }
- },
- {
- &hf_tlv_value,
- {
- "Value", "wmx.dreg.unknown_tlv_value",
- FT_BYTES, BASE_NONE, NULL, 0x00, "", HFILL
- }
- },
- {
- &hf_ack_type_reserved,
- {
- "Reserved", "wmx.ack_type_reserved",
- FT_UINT8, BASE_DEC, NULL, 0x03, "", HFILL
- }
- }
-};
-
-
/* Decode sub-TLV's of either DREG-REQ or DREG-CMD. */
static void dissect_dreg_tlv(proto_tree *dreg_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len)
{
@@ -372,6 +191,186 @@ static void dissect_dreg_tlv(proto_tree *dreg_tree, gint tlv_type, tvbuff_t *tvb
/* Register Wimax Mac Payload Protocol and Dissector */
void proto_register_mac_mgmt_msg_dreg_req(void)
{
+ /* DREG fields display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_dreg_consider_paging_pref,
+ {
+ "Consider Paging Preference of each Service Flow in resource retention", "wmx.dreg.consider_paging_preference",
+ FT_UINT8, BASE_DEC, NULL, 0x80, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.dreg.invalid_tlv",
+ FT_BYTES, BASE_HEX, NULL, 0, "", HFILL
+ }
+ },
+ {
+ &hf_mac_hash_skip_threshold,
+ {
+ "MAC Hash Skip Threshold", "wmx.dreg.mac_hash_skip_threshold",
+ FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL
+ }
+ },
+ {
+ &hf_paging_controller_id,
+ {
+ "Paging Controller ID", "wmx.dreg.paging_controller_id",
+ FT_ETHER, BASE_DEC, NULL, 0x0, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_paging_cycle,
+ {
+ "PAGING CYCLE", "wmx.dreg.paging_cycle",
+ FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_paging_cycle_request,
+ {
+ "Paging Cycle Request", "wmx.dreg.paging_cycle_request",
+ FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_paging_group_id,
+ {
+ "Paging-group-ID", "wmx.dreg.paging_group_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_paging_offset,
+ {
+ "PAGING OFFSET", "wmx.dreg.paging_offset",
+ FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_req_duration,
+ {
+ "REQ-duration (Waiting value for the DREG-REQ message re-transmission in frames)", "wmx.dreg.req_duration",
+ FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_full_service,
+ {
+ "Retain MS service and operation information associated with Full service", "wmx.dreg.retain_ms_full_service",
+ FT_UINT8, BASE_DEC, NULL, 0x40, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_network_address,
+ {
+ "Retain MS service and operational information associated with Network Address", "wmx.dreg.retain_ms_service_network_address",
+ FT_UINT8, BASE_DEC, NULL, 0x08, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_pkm,
+ {
+ "Retain MS service and operational information associated with PKM-REQ/RSP", "wmx.dreg.retain_ms_service_pkm",
+ FT_UINT8, BASE_DEC, NULL, 0x02, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_reg,
+ {
+ "Retain MS service and operational information associated with REG-REQ/RSP", "wmx.dreg.retain_ms_service_reg",
+ FT_UINT8, BASE_DEC, NULL, 0x04, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_sbc,
+ {
+ "Retain MS service and operational information associated with SBC-REQ/RSP", "wmx.dreg.retain_ms_service_sbc",
+ FT_UINT8, BASE_DEC, NULL, 0x01, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_tftp,
+ {
+ "Retain MS service and operational information associated with TFTP messages", "wmx.dreg.retain_ms_service_tftp",
+ FT_UINT8, BASE_DEC, NULL, 0x20, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_tod,
+ {
+ "Retain MS service and operational information associated with Time of Day", "wmx.dreg.retain_ms_service_tod",
+ FT_UINT8, BASE_DEC, NULL, 0x10, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_cmd_message_type,
+ {
+ "MAC Management Message Type", "wmx.macmgtmsgtype.dreg_cmd",
+ FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_cmd_action,
+ {
+ "DREG-CMD Action code", "wmx.dreg_cmd.action",
+ FT_UINT8, BASE_DEC, VALS(vals_dreg_cmd_action), 0x07, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_cmd_action_cor2,
+ {
+ "DREG-CMD Action code", "wmx.dreg_cmd.action",
+ FT_UINT8, BASE_DEC, VALS(vals_dreg_cmd_action_cor2), 0x07, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_cmd_reserved,
+ {
+ "Reserved", "wmx.dreg_cmd.action_reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xF8, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_req_message_type,
+ {
+ "MAC Management Message Type", "wmx.macmgtmsgtype.dreg_req",
+ FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_req_action,
+ {
+ "DREG-REQ Action code", "wmx.dreg_req.action",
+ FT_UINT8, BASE_DEC, VALS(vals_dreg_req_code), 0x03, "", HFILL
+ }
+ },
+ {
+ &hf_dreg_req_reserved,
+ {
+ "Reserved", "wmx.dreg_req.action_reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xFC, "", HFILL
+ }
+ },
+ {
+ &hf_tlv_value,
+ {
+ "Value", "wmx.dreg.unknown_tlv_value",
+ FT_BYTES, BASE_NONE, NULL, 0x00, "", HFILL
+ }
+ },
+ {
+ &hf_ack_type_reserved,
+ {
+ "Reserved", "wmx.ack_type_reserved",
+ FT_UINT8, BASE_DEC, NULL, 0x03, "", HFILL
+ }
+ }
+ };
+
if (proto_mac_mgmt_msg_dreg_req_decoder == -1) {
proto_mac_mgmt_msg_dreg_req_decoder = proto_register_protocol (
"WiMax DREG-REQ/CMD Messages", /* name */