標籤:code http com 使用 檔案 代碼
項目需要使用到了 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.