NAME
IPDevice::RouterBase::BGP
SYNOPSIS
use IPDevice::RouterBase::BGP;
my $bgp = new IPDevice::RouterBase::BGP;
$bgp->set_localas(1234);
my $vrf = $bgp->vrf('9999');
my $neigh = $bgp->add_neighbor('192.168.0.2');
DESCRIPTION
This module provides routines for storing informations regarding a BGP instance.
CONSTRUCTOR AND METHODS
This module provides, in addition to all methods from IPDevice::RouterBase::BGPVRF, the following methods.
set_localas($localas)
Set the BGP local AS number. (INTEGER)
get_localas()
Returns the BGP local AS number. (INTEGER)
set_routerid($routerid)
Set the BGP router id.
get_routerid()
Returns the BGP router id.
group($name)
Returns the IPDevice::RouterBase::BGPGroup with the given name. If the group does not exist yet, a newly created IPDevice::RouterBase::BGPGroup will be returned.
vrf($vrfname)
Returns the IPDevice::RouterBase::BGPVRF with the given name, or, if none found, a new IPDevice::RouterBase::BGPVRF.
foreach_vrf($func, $data)
Walks through all VRFs calling the function $func. Args passed to $func are:
$vrf: The IPDevice::RouterBase::BGPVRF. %data: The given data, just piped through.
If $func returns FALSE, the VRF list evaluation will be stopped.
foreach_neighbor($func, $data)
Walks through all VRFs/BGP neighbors calling the function $func. Args passed to $func are:
$neighbor: The IPDevice::RouterBase::BGPNeighbor. %data: The given data, just piped through.
If $func returns FALSE, the neighbor list evaluation will be stopped.
COPYRIGHT
Copyright (c) 2004 Samuel Abels. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Samuel Abels <spam debain org>