⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plugins-wimax-msg_dlmap.c

📁 Intel的WIMAX代码,主要是mac层code
💻 C
📖 第 1 页 / 共 5 页
字号:
		    "Boosting", "wimax.dlmap.ie.boosting",
		    FT_UINT32, BASE_DEC, VALS(boost_msgs), 0x00038000, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_boosting2,
	    {
		    "Boosting", "wimax.dlmap.ie.boosting",
		    FT_UINT32, BASE_DEC, VALS(boost_msgs), 0x0000E000, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_cid,
	    {
		    "CID", "wimax.dlmap.ie.cid",
		    FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_diuc,
	    {
		    "DIUC", "wimax.dlmap.ie.diuc",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_ncid,
	    {
		    "N_CID", "wimax.dlmap.ie.ncid",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_numsub,
	    {
		    "Number of Subchannels", "wimax.dlmap.ie.numsub",
		    FT_UINT32, BASE_DEC, NULL, 0x000000FC, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_numsym,
	    {
		    "Number of OFDMA Symbols", "wimax.dlmap.ie.numsym",
		    FT_UINT32, BASE_DEC, NULL, 0x00007F00, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_numsub2,
	    {
		    "Number of Subchannels", "wimax.dlmap.ie.numsub",
		    FT_UINT32, BASE_DEC, NULL, 0x000000FC, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_numsym2,
	    {
		    "Number of OFDMA Symbols", "wimax.dlmap.ie.numsym",
		    FT_UINT32, BASE_DEC, NULL, 0x00001F00, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_offsub,
	    {
		    "Subchannel Offset", "wimax.dlmap.ie.offsub",
		    FT_UINT32, BASE_DEC, NULL, 0x00FC0000, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_offsym,
	    {
		    "OFDMA Symbol Offset", "wimax.dlmap.ie.offsym",
		    FT_UINT32, BASE_DEC, NULL, 0xFF000000, "", HFILL
	    }
    },
    /* alt ie format */
    {
	    &hf_dlmap_ie_offsub2,
	    {
		    "Subchannel Offset", "wimax.dlmap.ie.offsub",
		    FT_UINT32, BASE_DEC, NULL, 0x00FF0000, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_offsym2,
	    {
		    "OFDMA Symbol Offset", "wimax.dlmap.ie.offsym",
		    FT_UINT32, BASE_DEC, NULL, 0xFF000000, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_rep,
	    {
		    "Repetition Coding Indication", "wimax.dlmap.ie.rep",
		    FT_UINT32, BASE_DEC, VALS(rep_msgs), 0x00000003, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ie_rep2,
	    {
		    "Repetition Coding Indication", "wimax.dlmap.ie.rep",
		    FT_UINT32, BASE_DEC, VALS(rep_msgs), 0x00000003, "", HFILL
	    }
    },
    {
	    &hf_dlmap_ofdma_sym,
	    {
		    "Num OFDMA Symbols", "wimax.dlmap.ofdma_sym",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_dlmap_phy_fdur,
	    {
		    "Frame Duration Code", "wimax.dlmap.phy_fdur",
		    FT_UINT8, BASE_HEX, NULL, 0x00, "", HFILL
	    }
    },
    {
	    &hf_dlmap_phy_fnum,
	    {
		    "Frame Number", "wimax.dlmap.phy_fnum",
		    FT_UINT24, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_dlmapc_compr,
	    {
		    "Compressed map indicator", "wimax.dlmapc.compr",
		    FT_UINT16, BASE_DEC, NULL, 0xe000, "", HFILL
	    }
    },
    {
	    &hf_dlmapc_count,
	    {
		    "DL IE Count", "wimax.dlmapc.count",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_dlmapc_len,
	    {
		    "Map message length", "wimax.dlmapc.len",
		    FT_UINT16, BASE_DEC, NULL, 0x07FF, "", HFILL
	    }
    },
    {
	    &hf_dlmapc_opid,
	    {
		    "Operator ID", "wimax.dlmapc.opid",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_dlmapc_rsv,
	    {
		    "Reserved", "wimax.dlmapc.rsv",
		    FT_UINT16, BASE_DEC, NULL, 0x0800, "", HFILL
	    }
    },
    {
	    &hf_dlmapc_secid,
	    {
		    "Sector ID", "wimax.dlmapc.secid",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_dlmapc_sync,
	    {
		    "PHY Synchronization Field", "wimax.dlmapc.sync",
		    FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_dlmapc_ulmap,
	    {
		    "UL-MAP appended", "wimax.dlmapc.ulmap",
		    FT_UINT16, BASE_DEC, NULL, 0x1000, "", HFILL
	    }
    },
    {
	    &hf_dlmap_xie_diuc,
	    {
		    "Extended DIUC", "wimax.dlmapc.xie_diuc",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_dlmap_xie_len,
	    {
		    "Length", "wimax.dlmapc.xie_len",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_109x_cmi,
	    {
		    "SUB-DL-UL-MAP map indicator", "wimax.dlul.cmi",
		    FT_UINT16, BASE_DEC, NULL, 0xE000, "", HFILL
	    }
    },
    {
	    &hf_109x_dl,
	    {
		    "DL HARQ ACK offset", "wimax.dlul.dl",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_109x_dlie,
	    {
		    "DL IE Count", "wimax.dlul.dlie",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_109x_haoi,
	    {
		    "HARQ ACK offset indicator", "wimax.dlul.haoi",
		    FT_UINT16, BASE_DEC, NULL, 0x0001, "", HFILL
	    }
    },
    {
	    &hf_109x_len,
	    {
		    "Map message length - The length is limited to 735 bytes at most", "wimax.dlul.len",
		    FT_UINT16, BASE_DEC, NULL, 0x1FF8, "", HFILL
	    }
    },
    {
	    &hf_109x_rcid,
	    {
		    "RCID_Type", "wimax.dlul.rcid",
		    FT_UINT16, BASE_DEC, NULL, 0x0006, "", HFILL
	    }
    },
    {
	    &hf_109x_subofs,
	    {
		    "Subchannel offset", "wimax.dlul.subofs",
		    FT_UINT8, BASE_DEC, NULL, 0xFE, "", HFILL
	    }
    },
    {
	    &hf_109x_symofs,
	    {
		    "OFDMA Symbol offset of subsequent sub-bursts "
		    "in this Sub-DL-UL-MAP message with reference to "
		    "the start of UL sub-frame.", "wimax.dlul.symofs",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_109x_rsv,
	    {
		    "Reserved", "wimax.dlul.rsv",
		    FT_UINT8, BASE_DEC, NULL, 0x01, "", HFILL
	    }
    },
    {
	    &hf_109x_ul,
	    {
		    "UL HARQ ACK offset", "wimax.dlul.ul",
		    FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
	    }
    },
    {
	    &hf_308a_cmi,
	    {
		    "Compressed map indicator", "wimax.dlmap.reduced_aas_private.cmi",
		    FT_UINT8, BASE_DEC, NULL, 0xe0, "", HFILL
	    }
    },
    {
	    &hf_308a_mult,
	    {
		    "Multiple IE", "wimax.dlmap.reduced_aas_private.mult",
		    FT_UINT8, BASE_DEC, NULL, 0x02, "", HFILL
	    }
    },
    {
	    &hf_308a_rsv,
	    {
		    "Reserved", "wimax.dlmap.reduced_aas_private.rsv",
		    FT_UINT8, BASE_DEC, NULL, 0x01, "", HFILL
	    }
    },
    {
	    &hf_308a_type,
	    {
		    "Compressed Map Type", "wimax.dlmap.reduced_aas_private.type",
		    FT_UINT8, BASE_DEC, NULL, 0x0d, "", HFILL
	    }
    },
    {
	    &hf_308a_ulmap,
	    {
		    "UL-MAP appended", "wimax.dlmap.reduced_aas_private.ulmap",
		    FT_UINT8, BASE_DEC, NULL, 0x10, "", HFILL
	    }
    },
    {
	    &hf_mac_header_compress_dlmap_crc,
	    {
		    "CRC", "wimax.compress_dlmap_crc",
		    FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL
	    }
    }
};

/********************************************************************
 * DL-MAP Miscellaneous IEs and TLVs
 *******************************************************************/

gint RCID_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb, gint RCID_Type)
{
    /* RCID_IE 8.4.5.3 and 8.4.5.3.20.1 */
    /* offset of IE in bits, length is variable  */
    gint bit = offset;
    proto_item *ti = NULL;
    proto_tree *tree = NULL;
    gint Prefix = 0;
    gint cid = 0;

    if (RCID_Type == 0)
        length = 16;
    else {
        Prefix = BIT_BIT(bit, bufptr);
        if (Prefix == 1) length = 12;
        else if (RCID_Type == 1) length = 12;
        else if (RCID_Type == 2) length = 8;
        else if (RCID_Type == 3) length = 4;
    }

    ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, length), "RCID_IE");
    tree = proto_item_add_subtree(ti, ett_286j);

    if (RCID_Type == 0) {
	XBIT(cid, 16, "CID");
    } else {
        proto_tree_add_text(tree, tvb, BITHI(bit,1), "Prefix: %d", Prefix);
        bit++;

        if (Prefix == 1) {
            /* RCID 11 */
	    XBIT(cid, 11, "CID11");
        } else {
            if (RCID_Type == 1) {
                /* RCID 11 */
		XBIT(cid, 11, "CID11");
            } else if (RCID_Type == 2) {
                /* RCID 7 */
		XBIT(cid, 7, "CID7");
            } else if (RCID_Type == 3) {
                /* RCID 3 */
		XBIT(cid, 3, "CID3");
            }
        }
    }

    proto_item_append_text(ti, " (CID = %d)", cid);

    return length; /* return length in bits */
}

/********************************************************************
 * DL-MAP Extended-2 HARQ sub-burst IEs (8.4.5.3.21)
 *******************************************************************/

gint Dedicated_DL_Control_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
    /* 8.4.5.3.20 */
    /* offset of IE in nibbles, length is variable */
    gint nib;
    gint nibble;
    proto_item *ti = NULL;
    proto_tree *tree = NULL;
    gint len;

    nib = offset;

    length = NIB_NIBBLE(nib, bufptr); /* length in nibbles */

    ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(nib, length+1), "Dedicated_DL_Control_IE");
    tree = proto_item_add_subtree(ti, ett_286i);

    proto_tree_add_text(tree, tvb, NIBHI(nib,1), "Length: %d", length);
    nib++;
    nibble = NIB_NIBBLE(nib, bufptr);
    proto_tree_add_text(tree, tvb, NIBHI(nib,1), "Control Header: %d", nibble);
    nib++;
    if ((nibble & 1) == 1) {
        nibble = NIB_NIBBLE(nib, bufptr);
        proto_tree_add_text(tree, tvb, NIBHI(nib,1), "Num SDMA Layers: %d", (nibble >> 2) & 0x3);
	/* Bit padding */
	if ((nib*4)+2 < (offset+length)*4) {
	    len = ((offset + length - nib) * 4) - 2;
	    proto_tree_add_text(tree, tvb, BITHI(nib*4, len), "Reserved bits");
	}
    } else {
	    /* Nibble padding */
	    if (nib < offset+length) {
		len = (offset + length) - nib;
		proto_tree_add_text(tree, tvb, NIBHI(nib,len), "Reserved bits");
	    }
    }
    return (length + 1);
}

gint Dedicated_MIMO_DL_Control_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
{
    /* offset of IE in bits, length is variable */
    gint bit;
    gint data;
    proto_item *ti = NULL;
    proto_tree *tree = NULL;
    gint mci, cqi, cmi, matrix = 0, pad, CQICH_num, mimo_mode;
    gint j;

    bit = offset;

    /* 8.4.5.3.21 table 286t */
    ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, 1), "Dedicated MIMO DL Control IE");
    tree = proto_item_add_subtree(ti, ett_286t);

    XBIT(length, 5, "Length (nibbles)");
    XBIT(mci, 1, "Control Header (MIMO Control Info)");
    XBIT(cqi, 1, "Control Header (CQI Control Info)");
    XBIT(cmi, 1, "Control Header (Closed MIMO Control Info)");
    XBIT(N_layer, 2, "N_layer");

    /* MIMO Control Info */
    if (mci == 1) {
	XBIT(matrix, 2, "Matrix");
        if (STC_Zone_Dedicated_Pilots == 1) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -