NS2 Notebook:Display RTS/CTS Pkt Type in NS2 Trace File
来源:互联网 发布:金山数据恢复大师vip 编辑:程序博客网 时间:2024/06/07 17:07
This is actually useless for ns 2.33 as I know, but it is useful if we modify the trace formats as we wish : )
There are several posts on NS2 user mailing list explaining how to display RTS/CTS packet type in NS2 trace file. Hereis an example. However, I failed to adopt them in NS 2.26 with new trace format. Here is my solution which just uses code written for old trace format. You only need to modify ns-2.26/trace/cmu-trace.cc in the following way and I
void
CMUTrace::format_mac(Packet *p, const char *why, int offset)
{
……
sprintf(pt_->buffer() + offset,
“-Ma %x -Md %x -Ms %x -Mt %s “,
mh->dh_duration,
ETHER_ADDR(mh->dh_da),
ETHER_ADDR(mh->dh_sa),
((ch->ptype() == PT_MAC) ? (
(mh->dh_fc.fc_subtype == MAC_Subtype_RTS) ? “RTS” :
(mh->dh_fc.fc_subtype == MAC_Subtype_CTS) ? “CTS” :
(mh->dh_fc.fc_subtype == MAC_Subtype_ACK) ? “ACK” :
“UNKN”
) : packet_info.name(ch->ptype())));
return;
}
Here is an exmaple NS2 trace file which displays the RTS/CTS/ACK information of MAC layer frame.
r -t 0.003583515 -Hs 0 -Hd -2 … -Nl MAC -Nw — -Ma 0 -Md 0 -Ms 0
s -t 0.003853348 -Hs 8 -Hd -2 …-Nl MAC -Nw — -Ma 2ff -Md 0 -Ms 8
r -t 0.004125515 -Hs 0 -Hd -2 … -Nl MAC -Nw — -Ma 2ff -Md 0 -Ms 8
s -t 0.004135515 -Hs 0 -Hd -2 … -Nl MAC -Nw — -Ma 1fd -Md 8 -Ms 0
r -t 0.004383682 -Hs 8 -Hd -2 … -Nl MAC -Nw — -Ma 1fd -Md 8 -Ms 0
- NS2 Notebook:Display RTS/CTS Pkt Type in NS2 Trace File
- NS2 trace
- NS2 trace
- NS2
- NS2
- display file type in Win7
- NS2:RTS阈值(RTSThreshold)的意义
- NS2学习:看懂trace文件
- NS2中trace分析工具
- NS2无线trace格式(旧trace)
- multiface implementation in ns2
- NS2学习:看懂trace文件(2)
- NS2无线仿真的trace格式
- NS2无线仿真中的Trace文件分析
- NS2无线仿真中的Trace文件分析
- ns2中限制Trace文件的输出
- ns2中限制Trace文件的输出
- ns2中限制Trace文件的输出
- solr学习笔记-linux下配置solr
- poj 1032 Parliament(正整数拆分不同数使乘积最大)
- 地图中的图块编号 与 精灵坐标的计算
- 有关Lucene的问题(4):影响Lucene对文档打分的四种方式
- hdu2032 杨辉三角
- NS2 Notebook:Display RTS/CTS Pkt Type in NS2 Trace File
- 传智播客PHP培训到底实力有多强!!?
- 从零开始学习OpenGL ES之一 – 基本概念
- fedora 20(64位)虚拟机磁盘容量扩展
- dedecms安装,dedecms教程,dedecms安装教程,80端口屏蔽动态IP无公网IP发布外网
- 地图的加载
- 1407281127-hd-Rock, Paper, or Scissors.cpp
- hdu 2164 石头剪刀布
- iOS_12_tableViewCell的删除更新_红楼梦