列表 5. 路由器服务器的 Perl 代码

#!/usr/bin/perl
[...]
sub loadSettings {
   my($recv) = shift;
   [...]
   if ($recv eq "SLA_X") {
     # execute "ipchains-restore" for
     # this SLA & check for errors
   } else {
     # if we're here, we didn't
     # understand the SLA, so throw an error
   }
   [...]
}
© . All rights reserved.