set_channel.pl

来自「COPE the first practical network coding 」· PL 代码 · 共 26 行

PL
26
字号
#!/usr/bin/perl -wuse strict;my ($channel) = @ARGV;if ($channel eq "12") {    exit -1;}system "write_handler.pl winfo.channel -1";if ($channel > 20) {    system "write_handler.pl set_rate.rate 12";    system "write_handler.pl rates.insert DEFAULT 12 24 48 18 36 72 96 108";    system "write_handler.pl rate.reset 1";} else {    system "write_handler.pl set_rate.rate 2";    system "write_handler.pl rates.insert DEFAULT 2 4 11 12 18 22 24 48 36 72 96 108";    system "write_handler.pl rate.reset 1";}system "/sbin/iwconfig ath0 channel $channel";system "write_handler.pl winfo.channel $channel";

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?