Add more PHY attributes to MAC frames.

svn path=/trunk/; revision=35125
This commit is contained in:
Martin Mathieson 2010-12-05 23:34:11 +00:00
parent b6da2c3ed9
commit 7cd3ff263b
3 changed files with 54 additions and 6 deletions

View File

@ -1443,6 +1443,9 @@ static void attach_mac_lte_info(packet_info *pinfo)
p_mac_lte_info->detailed_phy_info.dl_info.harq_id = outhdr_values[i++]; p_mac_lte_info->detailed_phy_info.dl_info.harq_id = outhdr_values[i++];
p_mac_lte_info->detailed_phy_info.dl_info.ndi = outhdr_values[i++]; p_mac_lte_info->detailed_phy_info.dl_info.ndi = outhdr_values[i++];
} }
if (outhdr_values_found > 20) {
p_mac_lte_info->detailed_phy_info.dl_info.transport_block = outhdr_values[i++];
}
} }
else { else {
p_mac_lte_info->detailed_phy_info.ul_info.present = outhdr_values[i++]; p_mac_lte_info->detailed_phy_info.ul_info.present = outhdr_values[i++];
@ -1450,6 +1453,10 @@ static void attach_mac_lte_info(packet_info *pinfo)
p_mac_lte_info->detailed_phy_info.ul_info.tbs_index = outhdr_values[i++]; p_mac_lte_info->detailed_phy_info.ul_info.tbs_index = outhdr_values[i++];
p_mac_lte_info->detailed_phy_info.ul_info.resource_block_length = outhdr_values[i++]; p_mac_lte_info->detailed_phy_info.ul_info.resource_block_length = outhdr_values[i++];
p_mac_lte_info->detailed_phy_info.ul_info.resource_block_start = outhdr_values[i++]; p_mac_lte_info->detailed_phy_info.ul_info.resource_block_start = outhdr_values[i++];
if (outhdr_values_found > 15) {
p_mac_lte_info->detailed_phy_info.ul_info.harq_id = outhdr_values[i++];
p_mac_lte_info->detailed_phy_info.ul_info.ndi = outhdr_values[i++];
}
} }
} }

View File

@ -74,6 +74,8 @@ static int hf_mac_lte_context_phy_ul_modulation_type = -1;
static int hf_mac_lte_context_phy_ul_tbs_index = -1; static int hf_mac_lte_context_phy_ul_tbs_index = -1;
static int hf_mac_lte_context_phy_ul_resource_block_length = -1; static int hf_mac_lte_context_phy_ul_resource_block_length = -1;
static int hf_mac_lte_context_phy_ul_resource_block_start = -1; static int hf_mac_lte_context_phy_ul_resource_block_start = -1;
static int hf_mac_lte_context_phy_ul_harq_id = -1;
static int hf_mac_lte_context_phy_ul_ndi = -1;
static int hf_mac_lte_context_phy_dl = -1; static int hf_mac_lte_context_phy_dl = -1;
static int hf_mac_lte_context_phy_dl_dci_format = -1; static int hf_mac_lte_context_phy_dl_dci_format = -1;
@ -86,6 +88,7 @@ static int hf_mac_lte_context_phy_dl_resource_block_length = -1;
static int hf_mac_lte_context_phy_dl_crc_status = -1; static int hf_mac_lte_context_phy_dl_crc_status = -1;
static int hf_mac_lte_context_phy_dl_harq_id = -1; static int hf_mac_lte_context_phy_dl_harq_id = -1;
static int hf_mac_lte_context_phy_dl_ndi = -1; static int hf_mac_lte_context_phy_dl_ndi = -1;
static int hf_mac_lte_context_phy_dl_tb = -1;
/* Out-of-band events */ /* Out-of-band events */
@ -231,10 +234,11 @@ static const value_string bch_transport_channel_vals[] =
static const value_string crc_status_vals[] = static const value_string crc_status_vals[] =
{ {
{ crc_success, "OK"}, { crc_success, "OK"},
{ crc_fail, "Failed"}, { crc_fail, "Failed"},
{ crc_high_code_rate, "High Code Rate"}, { crc_high_code_rate, "High Code Rate"},
{ crc_pdsch_lost, "PDSCH Lost"}, { crc_pdsch_lost, "PDSCH Lost"},
{ crc_duplicate_nonzero_rv, "Duplicate_nonzero_rv"},
{ 0, NULL } { 0, NULL }
}; };
@ -1028,6 +1032,17 @@ static void show_extra_phy_parameters(packet_info *pinfo, tvbuff_t *tvb, proto_t
p_mac_lte_info->detailed_phy_info.ul_info.resource_block_start); p_mac_lte_info->detailed_phy_info.ul_info.resource_block_start);
PROTO_ITEM_SET_GENERATED(ti); PROTO_ITEM_SET_GENERATED(ti);
ti = proto_tree_add_uint(phy_tree, hf_mac_lte_context_phy_ul_harq_id,
tvb, 0, 0,
p_mac_lte_info->detailed_phy_info.ul_info.harq_id);
PROTO_ITEM_SET_GENERATED(ti);
ti = proto_tree_add_uint(phy_tree, hf_mac_lte_context_phy_ul_ndi,
tvb, 0, 0,
p_mac_lte_info->detailed_phy_info.ul_info.ndi);
PROTO_ITEM_SET_GENERATED(ti);
proto_item_append_text(phy_ti, " ("); proto_item_append_text(phy_ti, " (");
write_pdu_label_and_info(phy_ti, NULL, write_pdu_label_and_info(phy_ti, NULL,
@ -1104,6 +1119,11 @@ static void show_extra_phy_parameters(packet_info *pinfo, tvbuff_t *tvb, proto_t
p_mac_lte_info->detailed_phy_info.dl_info.ndi); p_mac_lte_info->detailed_phy_info.dl_info.ndi);
PROTO_ITEM_SET_GENERATED(ti); PROTO_ITEM_SET_GENERATED(ti);
ti = proto_tree_add_uint(phy_tree, hf_mac_lte_context_phy_dl_tb,
tvb, 0, 0,
p_mac_lte_info->detailed_phy_info.dl_info.transport_block);
PROTO_ITEM_SET_GENERATED(ti);
proto_item_append_text(phy_ti, " ("); proto_item_append_text(phy_ti, " (");
@ -3418,7 +3438,18 @@ void proto_register_mac_lte(void)
NULL, HFILL NULL, HFILL
} }
}, },
{ &hf_mac_lte_context_phy_ul_harq_id,
{ "HARQ Id",
"mac-lte.ul-phy.harq-id", FT_UINT8, BASE_DEC, 0, 0x0,
NULL, HFILL
}
},
{ &hf_mac_lte_context_phy_ul_ndi,
{ "NDI",
"mac-lte.ul-phy.ndi", FT_UINT8, BASE_DEC, 0, 0x0,
"UL New Data Indicator", HFILL
}
},
{ &hf_mac_lte_context_phy_dl, { &hf_mac_lte_context_phy_dl,
{ "DL PHY attributes", { "DL PHY attributes",
@ -3480,6 +3511,12 @@ void proto_register_mac_lte(void)
"New Data Indicator", HFILL "New Data Indicator", HFILL
} }
}, },
{ &hf_mac_lte_context_phy_dl_tb,
{ "TB",
"mac-lte.dl-phy.tb", FT_UINT8, BASE_DEC, 0, 0x0,
"Transport Block (antenna #)", HFILL
}
},
/* Out-of-band events */ /* Out-of-band events */
{ &hf_mac_lte_oob_send_preamble, { &hf_mac_lte_oob_send_preamble,

View File

@ -81,7 +81,8 @@ typedef enum mac_lte_crc_status {
crc_fail = 0, crc_fail = 0,
crc_success = 1, crc_success = 1,
crc_high_code_rate = 2, crc_high_code_rate = 2,
crc_pdsch_lost = 3 crc_pdsch_lost = 3,
crc_duplicate_nonzero_rv = 4
} mac_lte_crc_status; } mac_lte_crc_status;
/* Context info attached to each LTE MAC frame */ /* Context info attached to each LTE MAC frame */
@ -114,6 +115,8 @@ typedef struct mac_lte_info
guint8 tbs_index; guint8 tbs_index;
guint8 resource_block_length; guint8 resource_block_length;
guint8 resource_block_start; guint8 resource_block_start;
guint8 harq_id;
gboolean ndi;
} ul_info; } ul_info;
struct mac_lte_dl_phy_info struct mac_lte_dl_phy_info
{ {
@ -127,6 +130,7 @@ typedef struct mac_lte_info
mac_lte_crc_status crc_status; mac_lte_crc_status crc_status;
guint8 harq_id; guint8 harq_id;
gboolean ndi; gboolean ndi;
guint8 transport_block; /* 1-4 */
} dl_info; } dl_info;
} detailed_phy_info; } detailed_phy_info;