OSPF协议栈的perl 脚本实现!
print "Hello from: ".$f->ref->{'IPv4'}->src."\n"; print "Found: DR : $dr\n"if $dr;print "Found: BDR: $bdr\n" if $bdr;
print "Found: neighborList: @nl\n" if @nl;
$Env->{dr} = $drif $dr;
$Env->{bdr} = $bdr if $bdr;
$Env->{neighborList}= \@nl if @nl;
$Env->{helloInterval} = $packet->helloInterval
if $packet->helloInterval;
$Env->{routerDeadInterval} = $packet->routerDeadInterval
if $packet->routerDeadInterval;
$Env->{networkMask} = $packet->networkMask
if $packet->networkMask;
$Env->{areaId} = $f->ref->{'OSPF'}->areaId
if $f->ref->{'OSPF'}->areaId;
页:
[1]