diff options
author | martinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-06-20 15:55:32 +0000 |
---|---|---|
committer | martinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-06-20 15:55:32 +0000 |
commit | 0951028f022f1760641b52ea8070166e41e3c607 (patch) | |
tree | 1a6b1452ff4be6014db51f6b9c942fe704979c91 /plugins | |
parent | e86ced86081e9b261d2d89b15b6e2f308ec4813d (diff) |
Wimax: support TLV type 48 in REG-REQ/REG-RSP.
From cfreeer, fixes bug 2571.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25495 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/wimax/msg_reg_req.c | 62 | ||||
-rw-r--r-- | plugins/wimax/msg_reg_rsp.c | 3 | ||||
-rw-r--r-- | plugins/wimax/wimax_mac.h | 1 |
3 files changed, 64 insertions, 2 deletions
diff --git a/plugins/wimax/msg_reg_req.c b/plugins/wimax/msg_reg_req.c index 6938e549ff..627c0af535 100644 --- a/plugins/wimax/msg_reg_req.c +++ b/plugins/wimax/msg_reg_req.c @@ -158,6 +158,12 @@ static gint hf_reg_encap_packet_ip_ecrtp_header_compression_2 = -1; static gint hf_reg_encap_rsvd_2 = -1; static gint hf_tlv_type = -1; static gint hf_reg_invalid_tlv = -1; +static gint hf_reg_power_saving_class_type_i = -1; +static gint hf_reg_power_saving_class_type_ii = -1; +static gint hf_reg_power_saving_class_type_iii = -1; +static gint hf_reg_multi_active_power_saving_classes = -1; +static gint hf_reg_total_power_saving_class_instances = -1; +static gint hf_reg_power_saving_class_reserved = -1; static gint hf_reg_req_message_type = -1; @@ -909,6 +915,48 @@ static hf_register_info hf[] = "Frames required for the MS to switch from sleep to awake-mode", "wmx.reg_req.sleep_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL } + }, + { + &hf_reg_power_saving_class_type_i, + { + "Power saving class type I supported", "wmx.reg.power_saving_class_type_i", + FT_BOOLEAN, 8, TFS(&tfs_supported), 0x01, "", HFILL + } + }, + { + &hf_reg_power_saving_class_type_ii, + { + "Power saving class type II supported", "wmx.reg.power_saving_class_type_ii", + FT_BOOLEAN, 8, TFS(&tfs_supported), 0x02, "", HFILL + } + }, + { + &hf_reg_power_saving_class_type_iii, + { + "Power saving class type III supported", "wmx.reg.power_saving_class_type_iii", + FT_BOOLEAN, 8, TFS(&tfs_supported), 0x04, "", HFILL + } + }, + { + &hf_reg_multi_active_power_saving_classes, + { + "Multiple active power saving classes supported", "wmx.reg.multi_active_power_saving_classes", + FT_BOOLEAN, 8, TFS(&tfs_supported), 0x08, "", HFILL + } + }, + { + &hf_reg_total_power_saving_class_instances, + { + "Total number of power saving class instances of all", "wmx.reg_req.total_power_saving_class_instances", + FT_UINT16, BASE_DEC, NULL, 0x1F0, "", HFILL + } + }, + { + &hf_reg_power_saving_class_reserved, + { + "Reserved", "wmx.reg.reserved", + FT_UINT16, BASE_DEC, NULL, 0xFE00, "", HFILL + } } }; @@ -955,6 +1003,17 @@ void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb tlv_tree = add_tlv_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, hf_reg_ul_cids, tvb, tlv_offset, tlv_len, FALSE); proto_tree_add_item(tlv_tree, hf_reg_ul_cids, tvb, tlv_offset, tlv_len, FALSE); break; + + case REG_POWER_SAVING_CLASS_CAPABILITY: + /* add TLV subtree */ + tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, proto_registry, tvb, tlv_offset, tlv_len, "Power saving class capability (%d)", tvb_get_ntohs(tvb, tlv_offset)); + proto_tree_add_item(tlv_tree, hf_reg_power_saving_class_type_i, tvb, tlv_offset, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_reg_power_saving_class_type_ii, tvb, tlv_offset, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_reg_power_saving_class_type_iii, tvb, tlv_offset, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_reg_multi_active_power_saving_classes, tvb, tlv_offset, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_reg_total_power_saving_class_instances, tvb, tlv_offset, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_reg_power_saving_class_reserved, tvb, tlv_offset, 2, FALSE); + break; case REG_IP_PHS_SDU_ENCAP: /* add TLV subtree */ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, proto_registry, tvb, tlv_offset, tlv_len, "Classification/PHS options and SDU encapsulation support 0x%04x", tvb_get_ntohs(tvb, tlv_offset)); @@ -1302,10 +1361,11 @@ void dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro case REG_TLV_T_42_MS_HO_TEK_PROCESSING_TIME: case REG_TLV_T_43_MAC_HEADER_AND_EXTENDED_SUBHEADER_SUPPORT: case REG_REQ_BS_SWITCHING_TIMER: + case REG_POWER_SAVING_CLASS_CAPABILITY: +#endif /* Decode REG-REQ sub-TLV's. */ dissect_extended_tlv(reg_req_tree, tlv_type, tvb, tlv_offset, tlv_len, pinfo, offset, proto_mac_mgmt_msg_reg_req_decoder); break; -#endif case REG_REQ_SECONDARY_MGMT_CID: tlv_tree = add_tlv_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, hf_reg_req_secondary_mgmt_cid, tvb, tlv_offset, 2, FALSE); proto_tree_add_item(tlv_tree, hf_reg_req_secondary_mgmt_cid, tvb, tlv_offset, 2, FALSE); diff --git a/plugins/wimax/msg_reg_rsp.c b/plugins/wimax/msg_reg_rsp.c index 6b90024597..fd3053af8d 100644 --- a/plugins/wimax/msg_reg_rsp.c +++ b/plugins/wimax/msg_reg_rsp.c @@ -268,9 +268,10 @@ void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro case REG_TLV_T_41_MS_HO_CONNECTIONS_PARAM_PROCESSING_TIME: case REG_TLV_T_42_MS_HO_TEK_PROCESSING_TIME: case REG_TLV_T_43_MAC_HEADER_AND_EXTENDED_SUBHEADER_SUPPORT: + case REG_POWER_SAVING_CLASS_CAPABILITY: +#endif dissect_extended_tlv(reg_rsp_tree, tlv_type, tvb, tlv_offset, tlv_len, pinfo, offset, proto_mac_mgmt_msg_reg_rsp_decoder); break; -#endif case REG_RSP_SECONDARY_MGMT_CID: tlv_tree = add_tlv_subtree(&tlv_info, ett_reg_rsp_message_tree, reg_rsp_tree, hf_reg_rsp_secondary_mgmt_cid, tvb, tlv_offset, tlv_len, FALSE); proto_tree_add_item(tlv_tree, hf_reg_rsp_secondary_mgmt_cid, tvb, tlv_offset, tlv_len, FALSE); diff --git a/plugins/wimax/wimax_mac.h b/plugins/wimax/wimax_mac.h index 07e8ba88fa..cec794d46e 100644 --- a/plugins/wimax/wimax_mac.h +++ b/plugins/wimax/wimax_mac.h @@ -499,6 +499,7 @@ #define REG_REQ_TLV_T_45_MS_PERIODIC_RANGING_TIMER_INFO 45 #define REG_HANDOVER_INDICATION_READINESS_TIMER 46 #define REG_REQ_BS_SWITCHING_TIMER 47 +#define REG_POWER_SAVING_CLASS_CAPABILITY 48 |