📄 plugins-wimax-msg_ulmap.c
字号:
}
XBIT(data, 1, "CINR zone measurement type");
}
if (ftype == 0) {
XBIT(api, 1, "Averaging parameter included");
if (api == 1) {
XBIT(data, 4, "Averaging parameter");
}
}
}
XBIT(data, 2, "MIMO_permutation_feedback_cycle");
pad = BIT_PADDING(bit,8);
if (pad) {
proto_tree_add_text(tree, tvb, BITHI(bit, pad), "Padding: %d bits", pad);
bit += pad;
}
return BIT_TO_NIB(bit); /* Return position in nibbles. */
}
gint UL_Zone_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 4 */
/* 8.4.5.4.7 [2] UL_Zone_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
bit = NIB_TO_BIT(offset);
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "UL_ZONE_IE");
tree = proto_item_add_subtree(ti, ett_294);
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
XBIT(data, 7, "OFDMA symbol offset");
XBIT(data, 2, "Permutation");
XBIT(data, 7, "UL_PermBase");
XBIT(data, 2, "AMC type");
XBIT(data, 1, "Use All SC indicator");
XBIT(data, 1, "Disable subchannel rotation");
XBIT(data, 4, "Reserved");
return BIT_TO_NIB(bit);
}
gint PHYMOD_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 5 */
/* 8.4.5.4.14 [2] PHYMOD_UL_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
gint pmt;
bit = NIB_TO_BIT(offset);
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "PHYMOD_UL_IE");
tree = proto_item_add_subtree(ti, ett_302);
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
XBIT(pmt, 1, "Preamble Modifier Type");
if (pmt == 0) {
XBIT(data, 4, "Preamble frequency shift index");
} else {
XBIT(data, 4, "Preamble Time Shift index");
}
XBIT(data, 1, "Pilot Pattern Modifier");
XBIT(data, 2, "Pilot Pattern Index");
return BIT_TO_NIB(bit);
}
gint MIMO_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 6 */
/* 8.4.5.4.11 MIMO_UL_Basic_IE (not implemented) */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
nib = offset;
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "MIMO_UL_Basic_IE");
tree = proto_item_add_subtree(ti, ett_299);
XNIB(data, 1, "Extended UIUC");
XNIB(data, 1, "Length");
proto_tree_add_text(tree, tvb, NIBHI(nib,length-2), "(not implemented)");
return nib;
}
gint ULMAP_Fast_Tracking_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 7 */
/* 8.4.5.4.22 [2] ULMAP_Fast_Tracking_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
bit = NIB_TO_BIT(offset);
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "Fast_Tracking_IE");
tree = proto_item_add_subtree(ti, ett_302h);
length = NIB_TO_BIT(length);
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
XBIT(data, 2, "Map Index");
XBIT(data, 6, "Reserved");
while (bit < (length-7)) {
XBIT(data, 3, "Power correction");
XBIT(data, 3, "Frequency correction");
XBIT(data, 2, "Time correction");
}
return BIT_TO_NIB(bit);
}
gint UL_PUSC_Burst_Allocation_in_other_segment_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 8 */
/* 8.4.5.4.17 [2] UL_PUSC_Burst_Allocation_in_other_segment_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
bit = NIB_TO_BIT(offset);
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "UL_PUSC_Burst_Allocation_in_Other_Segment_IE");
tree = proto_item_add_subtree(ti, ett_302c);
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
XBIT(data, 4, "UIUC");
XBIT(data, 2, "Segment");
XBIT(data, 7, "UL_PermBase");
XBIT(data, 8, "OFDMA symbol offset");
XBIT(data, 6, "Subchannel offset");
XBIT(data,10, "Duration");
XBIT(data, 2, "Repetition coding indication");
XBIT(data, 1, "Reserved");
return BIT_TO_NIB(bit);
}
gint Fast_Ranging_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 9 */
/* 8.4.5.4.21 [2] Fast_Ranging_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
gint hidi;
bit = NIB_TO_BIT(offset);
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "Fast_Ranging_IE");
tree = proto_item_add_subtree(ti, ett_302g);
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
XBIT(hidi, 1, "HO_ID indicator");
XBIT(data, 7, "Reserved");
if (hidi == 1) {
XBIT(data, 8, "HO_ID");
/* XBIT(data, 40, "Reserved"); TODO */
} else {
/* XBIT(data, 48, "MAC address"); TODO */
proto_tree_add_text(tree, tvb, BITHI(bit, 48), "MAC address");
bit += 48;
}
XBIT(data, 4, "UIUC");
XBIT(data,10, "Duration");
XBIT(data, 2, "Repetition coding indication");
return BIT_TO_NIB(bit);
}
gint UL_Allocation_Start_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 0xA */
/* 8.4.5.4.15 [2] UL_Allocation_Start_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
bit = NIB_TO_BIT(offset);
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "UL_Allocation_start_IE");
tree = proto_item_add_subtree(ti, ett_302a);
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
XBIT(data, 8, "OFDMA symbol offset");
XBIT(data, 7, "Subchannel offset");
XBIT(data, 1, "Reserved");
return BIT_TO_NIB(bit);
}
/********************************************************************
* UL-MAP Extended-2 IEs
* table 290c
*******************************************************************/
gint CQICH_Enhanced_Allocation_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 0 */
/* 8.4.5.4.16 [2] CQICH_Enhanced_Allocation_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
gint i, cnum, bapm;
guint pad;
bit = NIB_TO_BIT(offset);
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "CQICH_Enhanced_Alloc_IE");
tree = proto_item_add_subtree(ti, ett_302b);
XBIT(data, 4, "Extended-2 UIUC");
XBIT(data, 8, "Length");
if (cqich_id_size == 0) {
proto_tree_add_text(tree, tvb, BITHI(bit, 1), "CQICH_ID: n/a (size == 0 bits)");
} else {
/* variable from 0-9 bits */
data = BIT_BITS16(bit, bufptr, cqich_id_size);
proto_tree_add_text(tree, tvb, BITHI(bit, cqich_id_size), "CQICH_ID: %d (%d bits)", data, cqich_id_size);
bit += cqich_id_size;
}
XBIT(data, 3, "Period (p)");
XBIT(data, 3, "Frame offset");
XBIT(data, 3, "Duration (d)");
XBIT(cnum, 4, "CQICH_Num");
cnum += 1;
for (i = 0; i < cnum; i++) {
XBIT(data, 3, "Feedback Type");
XBIT(data, 6, "Allocation Index");
XBIT(data, 3, "CQICH Type");
XBIT(data, 1, "STTD indication");
}
XBIT(bapm, 1, "Band_AMC_Precoding_Mode");
if (bapm == 1) {
XBIT(data, 3, "Nr_Precoders_Feedback (=N)");
}
pad = BIT_PADDING(bit,8);
if (pad) {
proto_tree_add_text(tree, tvb, BITHI(bit, pad), "Padding: %d bits", pad);
bit += pad;
}
return BIT_TO_NIB(bit);
}
gint HO_Anchor_Active_UL_MAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 1 */
/* 8.4.5.4.18 [2] HO_Anchor_Active_UL_MAP_IE (not implemented) */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
nib = offset;
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "HO_Anchor_Active_UL_MAP_IE");
tree = proto_item_add_subtree(ti, ett_302d);
XNIB(data, 1, "Extended-2 UIUC");
XNIB(data, 2, "Length");
proto_tree_add_text(tree, tvb, NIBHI(nib,length-3), "(not implemented)");
return nib;
}
gint HO_Active_Anchor_UL_MAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 2 */
/* 8.4.5.4.19 [2] HO_Active_Anchor_UL_MAP_IE (not implemented) */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
nib = offset;
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "HO_Active_Anchor_UL_MAP_IE");
tree = proto_item_add_subtree(ti, ett_302e);
XNIB(data, 1, "Extended-2 UIUC");
XNIB(data, 2, "Length");
proto_tree_add_text(tree, tvb, NIBHI(nib,length-3), "(not implemented)");
return nib;
}
gint Anchor_BS_switch_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 3 */
/* 8.4.5.4.23 [2] Anchor_BS_switch_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
gint nbss, acod, cqai, pad;
gint i;
bit = NIB_TO_BIT(offset);
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "Anchor_BS_switch_IE");
tree = proto_item_add_subtree(ti, ett_302i);
XBIT(data, 4, "Extended-2 UIUC");
XBIT(data, 8, "Length");
XBIT(nbss, 4, "N_Anchor_BS_switch");
for (i = 0; i < nbss; i++) {
XBIT(data,12, "Reduced CID");
XBIT(acod, 2, "Action Code");
if (acod == 1) {
XBIT(data, 3, "Action Time (A)");
XBIT(data, 3, "TEMP_BS_ID");
XBIT(data, 2, "Reserved");
}
if (acod == 0 || acod == 1) {
XBIT(data, 1, "AK Change Indicator");
XBIT(cqai, 1, "CQICH Allocation Indicator");
if (cqai == 1) {
/* variable bits from 0-9 */
if (cqich_id_size == 0) {
proto_tree_add_text(tree, tvb, BITHI(bit, 1), "CQICH_ID: n/a (size == 0 bits)");
} else {
data = BIT_BITS16(bit, bufptr, cqich_id_size);
proto_tree_add_text(tree, tvb, BITHI(bit, cqich_id_size),
"CQICH_ID: %d (%d bits)", data, cqich_id_size);
bit += cqich_id_size;
}
XBIT(data, 6, "Feedback channel offset");
XBIT(data, 2, "Period (=p)");
XBIT(data, 3, "Frame offset");
XBIT(data, 3, "Duration (=d)");
XBIT(data, 2, "MIMO_permutation_feedback_code");
pad = BIT_PADDING(bit,8);
if (pad) {
proto_tree_add_text(tree, tvb, BITHI(bit,pad), "Reserved: %d bits", pad);
}
}
} else {
XBIT(data, 2, "Reserved");
}
}
XBIT(data, 4, "Reserved");
return BIT_TO_NIB(bit);
}
gint UL_sounding_command_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 4 */
/* 8.4.5.4.26 [2] UL_sounding_command_IE */
/* see 8.4.6.2.7.1 */
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
proto_item *ti = NULL;
proto_item *tree = NULL;
gint stype, ssrf, srlf, iafb, pad, sept, nssym, ncid, amod;
gint i, j;
bit = NIB_TO_BIT(offset);
ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "UL_Sounding_Command_IE");
tree = proto_item_add_subtree(ti, ett_315d);
XBIT(data, 4, "Extended-2 UIUC");
XBIT(data, 8, "Length");
XBIT(stype, 1, "Sounding_Type");
XBIT(ssrf, 1, "Send Sounding Report Flag");
XBIT(srlf, 1, "Sounding Relevance Flag");
if (srlf == 0) {
XBIT(data, 1, "Sounding_Relevance");
XBIT(data, 2, "Reserved");
} else {
XBIT(data, 3, "Reserved");
}
XBIT(iafb, 2, "Include additional feedback");
if (stype == 0) {
XBIT(nssym, 3, "Num_Sounding_Symbols");
XBIT(data, 1, "Reserved");
for (i = 0; i < nssym; i++) {
XBIT(sept, 1, "Separability Type");
if (sept == 0) {
XBIT(data, 3, "Max Cyclic Shift Index P");
XBIT(data, 1, "Reserved");
} else {
XBIT(data, 3, "Decimation Value D");
XBIT(data, 1, "Decimation offset randomization");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -