exit;
use A3Com::BridgeTable;

$n = new A3Com::BridgeTable (
    SWITCH => "sw2-3",
    CACHE => 0,
    GLOBALCACHE => 0,
);

%a = $n->btable();

for (keys %a) {
    print "$_=@{$a{$_}}\n";
}

exit;
use A3Com::ARP;

$ENV{"A3COM_GLOBALCACHEDIR"} = "$ENV{HOME}/.a3comglobal";

$n = new A3Com::ARP (
    SWITCH => "hydrogen",
    GLOBALCACHE => 0,
    CACHE => 0,
);

die if (!defined $n);


$t = time;

$c = {
    "10.1.1.225" => "00:a0:c9:67:d6:2a",
};

$h = $n->load_history ("out.arp");

if ($n->error ne "") {
    die "load error: " . $n->error . "\n";
}

$m = $n->merge_current_with_history (
    $c,
    $h,
    $t,
);


$n->save_history ("out1.arp", $h);

if ($n->error ne "") {
    die "save error: " . $n->error . "\n";
}

exit;
use A3Com::ARP;

$n = new A3Com::ARP;
$n->switch ("helium");

for ($n->mac_addrs) {
    print "$_\n";
}


__END__
use A3Com::EtherDetail;

$n = new A3Com::EtherDetail;
$n->switch ("sw27-3");
$n->cache(1);

@p = $n->ports;
die $n->error . "\n" if (!defined $p[0]);

print "[@p]\n";

print $n->port_val (1, "rxFrameRate"), "\n";

__END__
use A3Com::Password;

$n = new A3Com::Password;
$n->switch ("10.1.27.100");
$n->login ("adm");
$n->password ("transmeta");
$n->log (1);

$result = $n->set_admpassword ("transmeta");
if ($result eq undef) {
    die "*** ERROR: " . $n->error, "\n";
}

exit (0);


__END__
use A3Com::BridgeTable;

$n = new A3Com::BridgeTable;
$n->switch ("testsw");
$n->log (0);
$n->cache (1);


@i = $n->mac("0:0:0:1:1:1");

die $n->error, "\n"
    if (!defined (@macs = $n->macs));

for (@macs) { print "mac [$_]\n"; }

die $n->error, "\n"
    if (!defined (@ports = $n->ports));

for (@ports) { print "port [$_]\n"; }
__END__


die $n->error, "\n"
    if (!defined (@i = $n->ip_addrs));
for (@i) { print "ip [$_]\n"; }

die $n->error, "\n"
    if (!defined (@m = $n->mac_addrs));
for (@m) { print "mac [$_]\n"; }

__END__
