|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ac.ucl.ingi.totem.repository.CBGP
public class CBGP
This class implements the Routing interface and is used to compute the interdomain routes available from a node towards a destination. The class relies on the C-BGP's JNI interface.
Field Summary | |
---|---|
protected boolean |
optVerbose
|
protected static java.util.ArrayList<ParameterDescriptor> |
params
|
Constructor Summary | |
---|---|
CBGP()
|
Method Summary | |
---|---|
void |
bgpDomainRescan(Domain domain)
Used to rescan the routes after IGP changes |
java.util.Vector<be.ac.ucl.ingi.cbgp.bgp.Route> |
bgpRouterGetAdjRib(java.lang.String sRouterAddr,
java.lang.String sPeerAddr,
java.lang.String sPrefix,
boolean bIn)
Returns a vector with the BGP routes in the Adj-RIB(s) of this router. |
java.util.Vector<be.ac.ucl.ingi.cbgp.bgp.Peer> |
bgpRouterGetPeers(java.lang.String sRouterAddr)
Returns a vector with the neighbors of this router. |
java.util.Vector |
bgpRouterGetRib(java.lang.String sRouterAddr,
java.lang.String sPrefix)
Returns a vector with the BGP routes in the RIB of this node. |
void |
bgpRouterLoadRib(java.lang.String sRouterAddr,
java.lang.String sFileName)
Load the RIB contained in the given filename into the given router's RIB. |
void |
bgpRouterPeerRecv(java.lang.String sRouterAddr,
java.lang.String sPeerAddr,
java.lang.String sMsg)
Send a BGP message in MRT format to the given router, through the given peer. |
void |
bgpRouterPeerUp(java.lang.String sRouterAddr,
java.lang.String sPeerAddr,
boolean bUp)
Change the status of the BGP session between a router and one of its neighbors. |
void |
computeIGP(Domain domain)
For each domain, for each node, compute the intradomain routes. |
java.util.HashMap |
getRunningParameters()
Returns the parameters given when the algorithm was started |
java.util.List<ParameterDescriptor> |
getStartAlgoParameters()
Returns the optional parameters that can be given when starting the algorithm |
void |
netLinkUp(java.lang.String sSrcAddr,
java.lang.String sDstAddr,
boolean bUp)
Change the status of a link |
void |
netLinkWeight(java.lang.String sSrcAddr,
java.lang.String sDstAddr,
int iWeight)
Change the metric of a link |
java.util.Vector |
netNodeGetLinks(java.lang.String sNodeAddr)
Returns a vector with the links adjacent to this node. |
java.util.Vector |
netNodeGetRT(java.lang.String sNodeAddr,
java.lang.String sPrefix)
Returns a vector with the routes currently in the routing table of this node. |
be.ac.ucl.ingi.cbgp.IPTrace |
netNodeRecordRoute(java.lang.String sNodeAddr,
java.lang.String sDstAddr)
Returns an IPTrace object that contains the record-route status, the list of IP address hops, the total delay and the total IGP weight. |
void |
runCmd(java.lang.String sCommand)
Send a "raw" command to the C-BGP instance. |
void |
simRun()
Run the C-BGP simulator. |
void |
start()
Implements the 'start' method defined by the TotemAlgorithm interface. |
void |
start(java.util.HashMap params)
Implements the 'start' method defined by the TotemAlgorithm interface. |
void |
stop()
Implements the 'stop' method defined by the TotemAlgorithm interface. |
void |
updateLinksWeights(Domain domain)
Update Weights in CBGP with TE weights values TODO: solve the problem with asymmetric links |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean optVerbose
protected static final java.util.ArrayList<ParameterDescriptor> params
Constructor Detail |
---|
public CBGP()
Method Detail |
---|
public void updateLinksWeights(Domain domain) throws RoutingException
domain
-
RoutingException
public void computeIGP(Domain domain) throws RoutingException
RoutingException
public void start(java.util.HashMap params)
start
in interface TotemAlgorithm
public void start()
public void stop()
stop
in interface TotemAlgorithm
public void runCmd(java.lang.String sCommand) throws RoutingException
runCmd
in interface CBGPSimulator
sCommand
- the command
RoutingException
public void simRun() throws RoutingException
simRun
in interface CBGPSimulator
RoutingException
public java.util.Vector netNodeGetLinks(java.lang.String sNodeAddr) throws RoutingException
netNodeGetLinks
in interface CBGPSimulator
sNodeAddr
- the IP address of the node
RoutingException
public java.util.Vector netNodeGetRT(java.lang.String sNodeAddr, java.lang.String sPrefix) throws RoutingException
netNodeGetRT
in interface CBGPSimulator
sNodeAddr
- the IP address of the nodesPrefix
- a filter for routes to return
RoutingException
public be.ac.ucl.ingi.cbgp.IPTrace netNodeRecordRoute(java.lang.String sNodeAddr, java.lang.String sDstAddr) throws RoutingException
netNodeRecordRoute
in interface CBGPSimulator
sNodeAddr
- the IP address of the source nodesDstAddr
- the IP address of the destination node
RoutingException
public void bgpDomainRescan(Domain domain) throws RoutingException
domain
-
RoutingException
public java.util.Vector<be.ac.ucl.ingi.cbgp.bgp.Peer> bgpRouterGetPeers(java.lang.String sRouterAddr) throws RoutingException
bgpRouterGetPeers
in interface CBGPSimulator
sRouterAddr
- the IP address of the BGP router
RoutingException
public java.util.Vector bgpRouterGetRib(java.lang.String sRouterAddr, java.lang.String sPrefix) throws RoutingException
bgpRouterGetRib
in interface CBGPSimulator
sRouterAddr
- the IP address of the BGP routersPrefix
- a filter for the routes to return
RoutingException
public java.util.Vector<be.ac.ucl.ingi.cbgp.bgp.Route> bgpRouterGetAdjRib(java.lang.String sRouterAddr, java.lang.String sPeerAddr, java.lang.String sPrefix, boolean bIn) throws RoutingException
bgpRouterGetAdjRib
in interface CBGPSimulator
sRouterAddr
- the IP address of the BGP routersPeerAddr
- the IP address of one peer of the router (may
be null if the Adj-RIB of all peers mut be
returned)sPrefix
- a filter for the routes to return
RoutingException
public void bgpRouterPeerRecv(java.lang.String sRouterAddr, java.lang.String sPeerAddr, java.lang.String sMsg) throws RoutingException
bgpRouterPeerRecv
in interface CBGPSimulator
sRouterAddr
- the IP address of the BGP routersPeerAddr
- the IP address of the peersMsg
- the BGP message in MRT format
RoutingException
public void bgpRouterPeerUp(java.lang.String sRouterAddr, java.lang.String sPeerAddr, boolean bUp) throws RoutingException
bgpRouterPeerUp
in interface CBGPSimulator
sRouterAddr
- the IP address of the BGP routersPeerAddr
- the IP address of the BGP router's neighborbUp
- a boolean indicating the requested status. True
means the session up and false means the session down.
RoutingException
public void bgpRouterLoadRib(java.lang.String sRouterAddr, java.lang.String sFileName) throws RoutingException
bgpRouterLoadRib
in interface CBGPSimulator
sRouterAddr
- the IP address of the BGP routersFileName
- the name of the file that contains the RIB.
RoutingException
public java.util.List<ParameterDescriptor> getStartAlgoParameters()
TotemAlgorithm
getStartAlgoParameters
in interface TotemAlgorithm
public java.util.HashMap getRunningParameters()
TotemAlgorithm
getRunningParameters
in interface TotemAlgorithm
public void netLinkUp(java.lang.String sSrcAddr, java.lang.String sDstAddr, boolean bUp)
sSrcAddr
- l'adresse IP du routeur source du liensDstAddr
- l'adresse IP du routeur destination du lienbUp
- le status du noeud (true = UP)public void netLinkWeight(java.lang.String sSrcAddr, java.lang.String sDstAddr, int iWeight) throws RoutingException
sSrcAddr
- l'adresse IP du routeur source du liensDstAddr
- l'adresse IP du routeur destination du lieniWeight
- la nouvelle métrique
RoutingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |