![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ns-3
文章平均质量分 57
海淼
这个作者很懒,什么都没留下…
展开
-
ns-3 安装
ns-3 安装本例以个人安装过程为例,进行详细讲解:一、安装windows xp 与 ubuntu 双系统.本人笔记本电脑, 500G 硬盘 (实际 460G)分区安排: xp 310 G + ubuntu 150 G先安装 windows xp,再安装 ubuntu分区方法: 一个主分区,剩余都是扩展分区。主分区用于装 xp , c盘 60G原创 2011-10-21 22:08:00 · 5721 阅读 · 3 评论 -
一个wif ad hoc的例子
#include #include #include "ns3/core-module.h"#include "ns3/network-module.h"#include "ns3/internet-module.h"#include "ns3/applications-module.h"#include "ns3/ipv4-global-routing-helper.h"转载 2011-11-30 09:56:59 · 7083 阅读 · 2 评论 -
NS-3中wifi传输中的常见模型
wifi传输中的常见模型1.ErrorRateModel http://www.nsnam.org/doxygen/classns3_1_1_error_rate_model.htmlthe interface for Wifi's error models 1.1 NistErrorRateModel 继承ErrorRateModelhttp://www.nsnam原创 2011-11-10 10:11:05 · 5771 阅读 · 1 评论 -
NS-3中wifi的主要层次结构
wifi一、WifiHelper http://www.nsnam.org/doxygen/classns3_1_1_wifi_helper.html最高层次主要方法: WifiHelper () //实例化void SetRemoteStationManager() //设置远程基站NetDeviceContainer Install原创 2011-11-10 09:29:40 · 6296 阅读 · 1 评论 -
Vehicular ad-hoc network
转自: http://en.wikipedia.org/wiki/Vehicular_ad-hoc_networkA Vehicular Ad-Hoc Network, or VANET is a technology that uses moving cars as nodes in a network to create a mobile network. VANET turns ever转载 2011-11-11 14:51:55 · 2366 阅读 · 0 评论 -
Manhattan mobility model
转自: http://en.wikipedia.org/wiki/Manhattan_mobility_modelThere are various mobility models in vehicular ad-hoc networks (VANET). These mobility models guide the driver of the vehicle in taking转载 2011-11-11 14:47:22 · 1909 阅读 · 0 评论 -
ns-3 中 Utils 模块介绍
Utils模块的主要目的是:检查代码书写格式是否符合NS-3的标准。该模块并不是检查语法是否正确,仅仅检查代码的书写,比如缩进,换行,空格,等。NS-3 代码规范: http://blog.csdn.net/barcodegun/article/details/6895346主要用 check-style.py 程序进行检查。http://www.nsnam.org/dox原创 2011-12-05 09:13:58 · 1180 阅读 · 1 评论 -
ns-3的c++代码规范
ns-3的c++代码规范该文档 txt 版本详见: http://download.csdn.net/detail/barcodegun/3704860ns-3学习交流: barcode4@163.com一、 统一风格的重要性特别注意: 以下风格并不是C++的强制标准,而是为了便宜于他人阅读,便于不同开发者之间的交流以及其他开发人员的进一步开发、维护而原创 2011-10-21 22:21:42 · 1812 阅读 · 0 评论 -
NS-3 中 Callback与MakeCallback的简单说明
Callback 与 MakeCallback是成对出现的。1. Callbackhttp://www.nsnam.org/doxygen/classns3_1_1_callback.html个人理解: Callback其实类似于“指向函数的指针"Callback模板类: Callback其中 R为Callback的返回类型,必选T1...T9是Callback的原创 2011-12-06 16:56:54 · 4440 阅读 · 3 评论 -
NS-3中移动路径追踪
在NS-3中要实现移动路径追踪,首先应该想到MobilityModel移动模型,要实现追踪分析,就要用到trace sources.The list of all trace sources:http://www.nsnam.org/doxygen/group___trace_source_list.html在trace sources中找到MobilityModel,看到原创 2011-12-08 09:25:09 · 3809 阅读 · 2 评论 -
NS-3中Ipv4Header说明
以下面为例来解释:ns3::Ipv4Header (tos 0x0 ttl 64 id 0 protocol 2 offset (bytes) 0 flags [none] length: 1220 192.168.1.1 > 192.168.1.4) Payload (size=1200)英文,全部格式 : http://en.wikipedia.org/wiki/IPv4原创 2011-12-08 10:29:55 · 1870 阅读 · 1 评论 -
NS-3中Config::Connect与Config::ConnectWithoutContext的区别
void ns3::Config::ConnectWithoutContext (std::string path,const CallbackBase &cb )This function will attempt to find all trace sources which match the input path and will then connect the inp原创 2011-12-08 10:02:20 · 2959 阅读 · 0 评论 -
NS-3中Modules not built: click openflow
这不是安装错误。NS-3采用模块化的方式,需要什么组件,引用相关的组件头文件就行了。NS-3一般默认不安装click、openflow组件,因为很多人一般不用这两个组件。原创 2012-02-14 15:05:28 · 2300 阅读 · 2 评论 -
为你的代码增加日志功能
可以通过几个宏调用日志组件给仿真增加新的日志功能。我们可以在scratch目录中的myfirst.cc中做。也许你还记得在脚本中我们已经定义过一个日志组件: NS_LOG_COMPONENT_DEFINE ("FirstScriptExample");我们已经了解了通过设置NS_LOG环境变量来给组件启用日志功能。我们可以给脚本增加一些日志功能。用来增加信息级别的日志消息的宏是N转载 2012-03-09 12:12:16 · 1199 阅读 · 0 评论 -
NS-3 Developers Overview
Many users of ns-3 focus on using existing models to conduct simulations. However, when the existing models lack a specific feature or when a new un-implemented model is needed, some ns-3 users turn t转载 2012-03-10 09:52:33 · 894 阅读 · 0 评论 -
NS-3 Module overview
The ns-3 library is split across many modules organized under the Modules tab.aodvapplicationsbridgeclickconfig-storecorecsmacsma-layoutdsdvemuenergyflow-monitorinternetltemeshmobilitympinetanimne转载 2012-03-10 09:54:46 · 1347 阅读 · 0 评论 -
WHAT IS NS-3
ns-3 is a discrete-event network simulator, targeted primarily for research and educational use. ns-3 is free software, licensed under the GNU GPLv2 license, and is publicly available for research, de转载 2012-04-26 15:19:16 · 1200 阅读 · 0 评论 -
创建5个 Hello消息包及Packet详解
创建5个 Hello消息包:Ptr pkt1 = Create (reinterpret_cast ("hello"), 5);Packet:http://www.nsnam.org/docs/release/3.12/doxygen/classns3_1_1_packet.htmlPacket (uint8_t const *buffer, uint32_t size原创 2011-11-30 09:36:53 · 2330 阅读 · 1 评论 -
ns3::WifiPhyStandard 设置
ns3::WifiPhyStandard 设置enum ns3::WifiPhyStandardEnumerator: WIFI_PHY_STANDARD_80211a: OFDM PHY for the 5 GHz band (Clause 17) OfdmRate6Mbps, OfdmRate9Mbps, OfdmRate12Mb原创 2011-11-28 15:07:48 · 3774 阅读 · 0 评论 -
ns-3 GridPositionAllocator 属性解释
ns3::GridPositionAllocator 属性解释:Allocate positions on a rectangular 2d grid. 即把节点分配在一个矩形网格中。网址:http://www.nsnam.org/doxygen/classns3_1_1_grid_position_allocator.htm矩形的长度 = GridWidth * DeltaX原创 2011-11-17 13:46:48 · 3027 阅读 · 0 评论 -
NS-3 OpenFlow Integration 整合问题解决
问题:NS-3 OpenFlowIntegration : not enabled (Required boost libraries not found)解决方法:$ sudo apt-get install libboost-signals-devlibboost-filesystem-dev===================================原创 2011-10-21 22:13:21 · 3248 阅读 · 2 评论 -
ns3中添加click组件,及出现问题解决方法
Building Click==============The first step is to fetch (http://read.cs.ucla.edu/click/download)and build Click. At the top of your Click source directory:: $: ./configure --enable-userleve原创 2011-10-21 22:13:53 · 1919 阅读 · 2 评论 -
ns3 waf配置遇到的一个问题
在配置的时候,用以下命令 :$ ./waf configure --enable-tests --enable-examples --with-nsclick=/home/gpf/click/ --with-openflow=/home/gpf/openflow --enable-sudo --enable-mpi--enable-static$ ./waf会显示错误:open原创 2011-10-21 22:12:40 · 2783 阅读 · 5 评论 -
添加自己编写的模块到ns-3中出现undefined reference to问题的解决
添加自己编写的模块到ns-3中出现undefined reference to问题的解决向ns-3添加一个vanet模块,其中一个例子,在examples目录下, vanet-highway-test.cc编译的时候,出现问题:[1634/1751] cxx_link: build/debug/src/vanet/examples/vanet-highway-test_1.原创 2011-10-23 13:07:27 · 4201 阅读 · 4 评论 -
Do not include ns3 module aggregator headers from other modules; these are meant only for end user s
在ns-3中添加自己编写的模块中遇到的一个问题编写的几个文件,不作为模块添加的时候,都可以正常运行。但量,作为一个整体组件添加到~/repos/ns-3-allinone/ns-3-dev/src中,创建的一个vanet模块 的时候,出现以下问题:Do not include ns3 module aggregator headers from other modules; t原创 2011-10-23 13:18:29 · 1278 阅读 · 1 评论 -
在ns-3中 允许和禁止例子的执行
在ns-3中 允许和禁止例子的执行首先介绍一种最简单允许 examples 和 tests的方法:$./waf configure --enable-examples --enable-tests$./waf build就OK了。具体查看当前哪些例子可以执行,见:http://blog.csdn.net/barcodegun/article/details/689952原创 2011-10-24 09:22:16 · 1323 阅读 · 1 评论 -
常用waf命令
常用waf命令一、配置及编译:$ ./waf configure [option]$ ./waf帮助: $ ./waf --help配置调试,优化调试: $ ./waf -d configure: debug,optimized 改变flag: $ CXXFLAGS="-O3" ./waf configure或者: $CXX=g++-原创 2011-10-24 09:43:18 · 7040 阅读 · 0 评论 -
在ns-3中运行程序
在ns-3中运行程序一、运行c++代码直接运行:首先编译 ./waf 然后执行./waf --run program-nameprogram-name是要执行的程序名。查看当前有哪些程序可以执行:http://blog.csdn.net/barcodegun/article/details/6899522二、运行 python代码./w原创 2011-10-24 13:57:25 · 2726 阅读 · 1 评论 -
安装 ns-3.12
1.下载从这个页面下载:http://www.nsnam.org/ns-3-12/The source code can be downloaded from here while the extensive documentation is available in a variety of formats from here.下载地址:www.nsnam.org/release原创 2011-10-24 18:05:24 · 1166 阅读 · 0 评论 -
下载ns-3-dev
下载ns-3-devOfficial releases of ns-3 will be numbered as ns-3.release.hotfix官方版本: 如: ns-3.11 ns-3.12ns-3-dev 开发版,里面有一些新的特色,但也可能有新的问题。$ mkdir ns-3-dev$ cd ns-3-dev$ hg clone http:原创 2011-10-24 18:09:50 · 1763 阅读 · 0 评论 -
在ns-3中添加自己编写的模块
本文将以自己的一个实例来进行详解:我的ns-3版本为 ns-3-dev/home/repos/ns-3-allinone/ns-3-dev/本文将把一个高速公路车联自组网的模型添加到ns-3中。一、编写代码这一步,就要是编写相关的代码本文代码见: http://download.csdn.net/detail/barcodegun/3710431二、原创 2011-10-23 15:15:09 · 19179 阅读 · 11 评论 -
一个ns-3的Gnuplot例子
一个ns-3的Gnuplot例子在安装目录下, /examples/tutorial目录下,有一个拥塞窗口的例子 fifth.cc,可以执行:$ ./waf --run examples/tutorial/fifth >fifth.dat 2>&1将会在安装目录下,生成 fifth.dat文件解释:> 表示输出重定向。>fifth.dat 把执行的结果存入到文件原创 2011-10-24 10:09:53 · 5751 阅读 · 3 评论 -
NS-3 简介
NS-3 简介全称为 Network Simulator 3官网: http://www.nsnam.org/ ns-2 的官网: http://isi.edu/nsnam/ns/目前,比较流行的版本有NS-2,以及NS-3。NS-2采用C++和OTcl代码编写,在学习过程中需要学习新的OTcl语言。NS-3全部采用C++语言编写,并且还可以用Python语言编写代码。原创 2011-10-23 22:28:21 · 10483 阅读 · 1 评论 -
在ns-3中查看当前有哪些程序可以执行
一、方法1: 在安装目录下:$ ./waf --run non-program注意 non-program 是随便起的一个名字,即当前不存在的一个程序名。我安装的版本是 ns-3-dev ,gpf@guopengfei:~/repos/ns-3-allinone/ns-3-dev$ ./waf --run non-program执行后,会提示你当前不存在 non-progr原创 2011-10-24 09:15:01 · 3274 阅读 · 6 评论 -
How To Install ns3 on linux ? [转]
转自: http://wirelesscafe.wordpress.com/2011/01/15/how-to-install-ns3-on-linux/Happy New Year to all the readers. Its long, I have not posted any thing on this blog except comments . So, here, tod转载 2011-10-24 15:41:22 · 1022 阅读 · 1 评论 -
ns-3版本升级的问题
ns-3版本升级的问题在网上查了一个下午,一直没有找到找到较好的方法。所以,只有使有最原始的方法,新安装一个 ns-3.12。对于从 ns3.10,或 ns3.11等旧版本升级到 ns-3.12,又或者最新出了 ns-3.13版本,旧版本的升级,我目前没查到比较好的方法。重新装一个,是不得已的办法。或许有好的办法吧,如果谁知道,请留言给我,谢谢您的帮助。原创 2011-10-24 16:09:08 · 1466 阅读 · 1 评论 -
NS-3 Develop Tools
To download, manage the source code history, track the bugs, build, and review patches, we use many tools that were not developed for ns-3. If you are already familiar with them, the following list sh转载 2012-04-26 15:21:05 · 1431 阅读 · 0 评论