基于策略的弹性仿真器与OMNeT++/构建Distack
外观
Distack在64位系统上可以成功编译(或者说是这样),但在尝试访问库时会报错(与libdistack.so
相关)。这就是为什么我一开始建议使用32位操作系统的缘故。
libxerces-c-dev libboost-all-dev autotools-dev automake autoconf libpthread-workqueue-dev libpthread-stubs0-dev libltdl-dev libpcap-dev gnuplot
从这里(ID #7)下载Distack源代码tar包。将其解压到omnetpp文件夹。
现在将distack-1.2.3-dev/etc/patches/rease/distack_rease.patch复制到主目录中的omnetpp文件夹(“ReaSE”文件夹的父目录),并在终端中导航到该目录,然后执行以下操作来应用补丁
patch -p0 < ./distack_rease.patch
您应该会看到如下输出
patching file ReaSE/src/applications/util/DistackRAOData.msg
patching file ReaSE/src/applications/util/DistackRemoteTCPPayload.msg
patching file ReaSE/src/networklayer/ipv4/IP_hack.cc
patching file ReaSE/src/networklayer/ipv4/IP_hack.h
patching file ReaSE/src/networklayer/ipv4/IP_hack.ned
patching file ReaSE/src/nodes/inet/DDoSZombie.ned
patching file ReaSE/src/nodes/inet/DistackOmnetIDS.ned
patching file ReaSE/src/nodes/inet/DistackOmnetModule.ned
patching file ReaSE/src/nodes/inet/NetworkLayer_hack.ned
patching file ReaSE/src/nodes/inet/TraceRouter.ned
patching file ReaSE/src/nodes/inet/WormHost.ned
patching file ReaSE/src/transport/contract/DistackTCPSocketMap.cc
patching file ReaSE/src/transport/contract/DistackTCPSocketMap.h
如果碰巧文件创建在临时目录中,例如ReaSE_patched,请确保将这些文件复制到ReaSE/src目录中。
现在进入OMNeT++ IDE,在项目资源管理器中右键单击ReaSE,点击“清理项目”,然后按Ctrl +B
或项目 > 构建全部
进行构建。
在终端中,导航到distack文件夹并运行
./bootstrap
在以下命令中,将<your_username>替换为您的用户名
./configure CPPFLAGS='-I/home/<your_user_name>/omnetpp-4.1/include -I/home/<your_username>/inet/src/networklayer/ipv4 -I/home/<your_username>/inet/src/base -I/home/<your_username>/inet/src/networklayer/contract -I/home/<your_username>/inet/src/networklayer/common -I/home/<your_username>/inet/src/linklayer/contract -I/home/<your_username>/inet/src/transport/tcp -I/home/<your_username>/inet/src/transport/udp -I/home/<your_username>/inet/src/transport/contract -I/home/<your_username>/inet/src/networklayer/arp -I/home/<your_username>/ReaSE/src/transport/contract -I/home/<your_username>/ReaSE/src/base -I/home/<your_username>/ReaSE/src/applications/util' --enable-simulation=yes
然后运行
make
Distack库将位于以下目录:/distack/src/.libs/
现在您需要修补INET和ReaSE。