項目需要使用到了 dummynet,一般是用來控制流量,帶寬,延遲,丟包率什么的,廢話不說,直接進入安裝流程
1.下載dummynet 的源代碼(source code)
http://info.iet.unipi.it/~luigi/dummynet/#3d2a
點選左邊Availability,點選source code 下載
2.下載完解壓縮,在readme里其實有完整的安裝指南,在這里我復制過來並翻譯一下
注意,這是直接使用已經build好的exe文件,如果要自己build代碼,可以參看readme下面的build
Windows:
A pre-built version is in binary/ and binary64/ directories. 32位和64位都是適用的
INSTALL THE NDIS DRIVER
- open the configuration panel for the network card in use 控制面板,打開網絡和共享中心
(right click on the icon on the SYSTRAY, or go to
Control Panel -> Network and select one card) 在你正在使用的網卡上點右鍵-》屬性-》安裝-》服務-》添加
- click on Properties->Install->Service->Add
- click on 'Driver Disk' and select 'netipfw.inf' in this folder 打開你下載的source code的目錄解壓,打開binary文件夾,添加netipfw.inf,然后會要你選ipfw
- select 'ipfw+dummynet' which is the only service you should see .sys,也在這個binary目錄下,然后確定就OK
- click accept on the warnings for the installation of an unsigned
driver (roughly twice per existing network card)
Now you are ready to use the emulator. To configure it, open a 'cmd' 最后你可以在cmd下測試ipfw.exe或者用test.bat測試
window (REMEMBER to run it as Administrator)
and you can use the ipfw command from the command line.
Otherwise click on the 'TESTME.bat' which is a batch program that
runs various tests.