Wireshark 解析PDCP-LTE
来源:互联网 发布:网络策略 编辑:程序博客网 时间:2024/06/05 00:55
最近定位问题,把PDCP-LTE吐到wireshark上进行解析,但是UE-ID一直没法图出去,仔细研究了下wireshark PDCP-LTE相关的解析代码,发现除了DCT2000可以使用UE-ID,其他的解析程序是没有办法使用的,确实是比较遗憾的。
wireshark中PDCP-LTE结构体定义中有UE-ID,如下:
/* Info attached to each LTE PDCP/RoHC packet */
typedef struct pdcp_lte_info
{
/* Channel info is needed for RRC parsing */
guint8 direction;
guint16 ueid;
LogicalChannelType channelType;
guint16 channelId;
BCCHTransportType BCCHTransport;
/* Details of PDCP header */
gboolean no_header_pdu;
enum pdcp_plane plane;
guint8 seqnum_length;
/* RoHC settings */
gboolean rohc_compression;
unsigned short rohc_ip_version;
gboolean cid_inclusion_info;
gboolean large_cid_present;
enum rohc_mode mode;
gboolean rnd;
gboolean udp_checksum_present;
unsigned short profile;
guint8 is_retx;
} pdcp_lte_info;
但是支持的解析类型中没有UE-ID
/* Conditional field. This field is mandatory in case of User Plane PDCP PDU.
The format is to have the tag, followed by the value (there is no length field,
it's implicit from the tag). The allowed values are defined above. */
#define PDCP_LTE_SEQNUM_LENGTH_TAG 0x02
/* 1 byte */
/* Optional fields. Attaching this info to frames will allow you
to show you display/filter/plot/add-custom-columns on these fields, so should
be added if available.
The format is to have the tag, followed by the value (there is no length field,
it's implicit from the tag) */
#define PDCP_LTE_DIRECTION_TAG 0x03
/* 1 byte */
#define PDCP_LTE_LOG_CHAN_TYPE_TAG 0x04
/* 1 byte */
#define PDCP_LTE_BCCH_TRANSPORT_TYPE_TAG 0x05
/* 1 byte */
#define PDCP_LTE_ROHC_IP_VERSION_TAG 0x06
/* 2 bytes, network order */
#define PDCP_LTE_ROHC_CID_INC_INFO_TAG 0x07
/* 1 byte */
#define PDCP_LTE_ROHC_LARGE_CID_PRES_TAG 0x08
/* 1 byte */
#define PDCP_LTE_ROHC_MODE_TAG 0x09
/* 1 byte */
#define PDCP_LTE_ROHC_RND_TAG 0x0A
/* 1 byte */
#define PDCP_LTE_ROHC_UDP_CHECKSUM_PRES_TAG 0x0B
/* 1 byte */
#define PDCP_LTE_ROHC_PROFILE_TAG 0x0C
/* 2 bytes, network order */
/* PDCP PDU. Following this tag comes the actual PDCP PDU (there is no length, the PDU
continues until the end of the frame) */
#define PDCP_LTE_PAYLOAD_TAG 0x01
如上是解析的Tag标记,在自己的程序中需要按照上述的TV格式来进行编码,wireshark是这样进行解析的:
/* Read optional fields */
while (tag != PDCP_LTE_PAYLOAD_TAG) {
/* Process next tag */
tag = tvb_get_guint8(tvb, offset++);
switch (tag) {
case PDCP_LTE_SEQNUM_LENGTH_TAG:
p_pdcp_lte_info->seqnum_length = tvb_get_guint8(tvb, offset);
offset++;
seqnumLengthTagPresent = TRUE;
break;
case PDCP_LTE_DIRECTION_TAG:
p_pdcp_lte_info->direction = tvb_get_guint8(tvb, offset);
offset++;
break;
case PDCP_LTE_LOG_CHAN_TYPE_TAG:
p_pdcp_lte_info->channelType = (LogicalChannelType)tvb_get_guint8(tvb, offset);
offset++;
break;
case PDCP_LTE_BCCH_TRANSPORT_TYPE_TAG:
p_pdcp_lte_info->BCCHTransport = (BCCHTransportType)tvb_get_guint8(tvb, offset);
offset++;
break;
case PDCP_LTE_ROHC_IP_VERSION_TAG:
p_pdcp_lte_info->rohc_ip_version = tvb_get_ntohs(tvb, offset);
offset += 2;
break;
case PDCP_LTE_ROHC_CID_INC_INFO_TAG:
p_pdcp_lte_info->cid_inclusion_info = tvb_get_guint8(tvb, offset);
offset++;
break;
case PDCP_LTE_ROHC_LARGE_CID_PRES_TAG:
p_pdcp_lte_info->large_cid_present = tvb_get_guint8(tvb, offset);
offset++;
break;
case PDCP_LTE_ROHC_MODE_TAG:
p_pdcp_lte_info->mode = (enum rohc_mode)tvb_get_guint8(tvb, offset);
offset++;
break;
case PDCP_LTE_ROHC_RND_TAG:
p_pdcp_lte_info->rnd = tvb_get_guint8(tvb, offset);
offset++;
break;
case PDCP_LTE_ROHC_UDP_CHECKSUM_PRES_TAG:
p_pdcp_lte_info->udp_checksum_present = tvb_get_guint8(tvb, offset);
offset++;
break;
case PDCP_LTE_ROHC_PROFILE_TAG:
p_pdcp_lte_info->profile = tvb_get_ntohs(tvb, offset);
offset += 2;
break;
case PDCP_LTE_PAYLOAD_TAG:
/* Have reached data, so get out of loop */
continue;
default:
/* It must be a recognised tag */
return FALSE;
}
}
- Wireshark 解析PDCP-LTE
- 如何用wireshark来解析出PDCP-LTE格式,即把PDCP报文突出到wireshark
- LTE PDCP 协议理解 备忘录
- 用python将LTE-NB NAS消息转换成wireshark文件格式解析
- LTE PDCP EEA 和 EIA 算法 实现应注意的问题
- pdsh+pdcp
- WireShark帧格式解析
- WireShark帧格式解析
- wireshark 解析AMR-WB
- wireshark 二 报文解析
- WireShark帧格式解析
- wireshark 解析器开发
- WireShark帧格式解析
- wireshark解析三次握手
- WireShark帧格式解析
- wireshark常见提示解析
- PDCP序号的作用
- pdcp序号的作用
- WEP的四次握手过程
- 树状数组小结
- Multiple Class / ID and Class Selectors
- Online Meeting - CodeForces 420B 水题
- java jdbc 与mysql连接的基本步骤
- Wireshark 解析PDCP-LTE
- 【Visual C++】游戏开发五十四 浅墨DirectX教程二十一 视觉的诡计:公告板(Billboard)技术
- event.srcElement获得引发事件的控件(表单)
- 【Visual C++】游戏开发五十五 浅墨DirectX教程二十二 水乳交融的美学:alpha混合技术
- 【Visual C++】游戏开发五十六 浅墨DirectX教程二十三 打造游戏GUI界面(一)
- 【转载】 Searching过程粗略梳理
- 时尚风好大好大哥几个附加费好看韩国
- 【Visual C++】游戏开发五十七 浅墨DirectX教程二十四 打造游戏GUI界面(二)
- hdu3549 Flow Problem 最大流模板 isap