ptmap

摘要

显示属于指定数据包树的所有数据包的列表。每个列表条目包含数据包的数值 ID、数据包树 ID 和所属者名称。

语法

ptmap <pk_tree_id>

参数 类型 说明
<pk_tree_id> integer 目标数据包树的数值 ID
可通过以下几种方法获取数据包树 ID:(1) 估计数据包树创建的序号(例如“第 50 个数据包树”);(2) 对指定数据包或使用 all 参数执行 ODB 命令 pkmap;(3) 对指定数据包执行 ODB 命令 pkprint;(4) 在先前运行同一仿真时观察到的数据包树 ID。

详细说明

数据包树是一组与共同祖先相关联的数据包。当通过内核过程 op_pk_create() 或 op_pk_create_fmt() 创建新数据包时,也会同时创建一个新的数据包树。但是,当通过复制现有数据包创建新数据包时——无论是通过内核过程 op_pk_copy(),还是由于在总线或无线链路上的广播传输——这个新的复制数据包与原始数据包属于同一个数据包树。每个数据包树都有一个对应的数据包树 ID,ODB 命令 ptmap 和 pttrace 用它来标识该树。

执行 ptmap 命令有助于确定已知原始数据包的后代数量及其在网络中的位置。ptmap 的输出格式与 pkmap 命令的输出格式完全相同。在输出列表中,数据包被描述为由包含(或“拥有”)它的对象“持有”。数据包要么由特定模块拥有,要么由数据包流拥有,要么由仿真内核拥有(当数据包处于传输途中时)。

示例

本例来自 models/std/eth_net 中的以太网仿真,由于总线链路的广播,其数据包树内包含多个数据包。

ODB> ptmap 1

packet (ID 1, tree ID 1) held by module (top.lan0.e5.mac)
packet (ID 2, tree ID 1) held by module (top.lan0.e5.bus_tx)
packet (ID 4, tree ID 1) held by (top.lan0.e6.strm_1)
packet (ID 6, tree ID 1) held by (top.lan0.e7.strm_1)
packet (ID 8, tree ID 1) held by (top.lan0.e5.strm_1)
packet (ID 10, tree ID 1) held by (top.lan0.e4.strm_1)
packet (ID 12, tree ID 1) held by (top.lan0.e3.strm_1)
packet (ID 14, tree ID 1) held by (top.lan0.e2.strm_1)
packet (ID 16, tree ID 1) held by module (top.lan0.e5.bus_tx)

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com