ns3 DCE(Direct Code Execution)

参考:
https://www.nsnam.org/docs/dce/manual/html/dce-user-newapps.html

ns3 DCE Introduction

//https://www.nsnam.org/docs/dce/manual/html/intro.html
下面这个更全面:
https://www.nsnam.org/docs/dce/release/1.0/manual/singlehtml/index.html
这里写图片描述

这里写图片描述

这里写图片描述

Tested environment

这里并没有ubuntu-14.04以及以上的。我在ubuntu-14.04ubuntu-16.04上都尝试了多遍安装都没有成功,最后在ubuntu-12.04中安装成功了。其中ccnx的下载非常慢。可以直接找到ccnx下载的url用wget下载,校验一下hash值确保正确即可。
这里写图片描述

User’s Guide

https://www.nsnam.org/docs/dce/manual/html/dce-user-doc.html

Quick Start

https://www.nsnam.org/docs/dce/manual/html/getting-started.html

需要用到的类

  • DceManagerHelpe #include "ns3/dce-manager-helper.h"
  • DceApplicationHelper #include "ns3/dce-application-helper.h"
  • LinuxStackHelper #include "ns3/linux-stack-helper.h"
  • CcnClientHelper #inlcude "ns3/ccn-client-helper.h"
  • QuaggaHelper #inlcude "ns3/quagga-helper.h"

但是实际上如果要在ns3中使用DCE,只需要 #include "ns3/dce-module.h" 即可。

写一个ns3脚本

在DCE的主目录ns-3-dce下有一个myscripts目录。这个目录是用来放你要运行的scripts的。要创建一个新的script,你得在myscripts目录下创建一个新的目录, 然后把你script的源文件和一个配置文件供waf编译系统使用,并且这个配置文件要已wscript为名。可以参考myscripts/ping目录。

编译这个脚本

只需要执行waf命令即可编译脚本。结果会在build/bin/myscripts/foo/bar目录下。其中foo是你刚才为了那个脚本创建的目录,bar是根据你写的wscript的内容,你的用来执行的脚本。

运行这个脚本

就像运行其他程序一样。

$ ./waf --run bar

结果

The execution of the apps using DCE generates special files which reflect the execution thereof. On each node DCE creates a directory /var/log, this directory will contain subdirectory whose name is a number. This number is the pid of a process. Each of these directories contains the following files cmdline, status, stdout, stderr. The file cmdline recalls the name of the executable run followed arguments. The file status contains an account of the execution and dating of the start; optionally if the execution is completed there is the date of the stop and the return code. The files stdout and stderr correspond to the standard output of the process in question.

Realistic ICN experimentation using Direct Code Execution and ns-3(Hands-on DCE)

http://www.comelec.telecom-paristech.fr/uploads/tx_dbcomelec/20140206.pdf

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值