public class OspfAreaImpl extends Object implements org.onosproject.ospf.controller.OspfArea
| Constructor and Description |
|---|
OspfAreaImpl()
Creates an instance of area implementation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLsa(org.onosproject.ospf.controller.OspfLsa ospfLsa,
boolean isSelfOriginated,
org.onosproject.ospf.controller.OspfInterface ospfInterface)
Methods gets called from ChannelHandler to add the received LSA to LSDB.
|
void |
addLsa(org.onosproject.ospf.controller.OspfLsa ospfLsa,
org.onosproject.ospf.controller.OspfInterface ospfInterface)
Methods gets called from ChannelHandler to add the received LSA to LSDB.
|
void |
addLsaToMaxAgeBin(String key,
org.onosproject.ospf.controller.LsaWrapper wrapper)
Adds the LSA to maxAge bin.
|
List<org.onosproject.ospf.controller.OspfAreaAddressRange> |
addressRanges()
Gets address range.
|
void |
addToOtherNeighborLsaTxList(org.onosproject.ospf.protocol.lsa.LsaHeader recLsa)
Adds the received LSA in other neighbors tx list.
|
org.onlab.packet.Ip4Address |
areaId()
Gets the area id.
|
org.onosproject.ospf.protocol.lsa.types.NetworkLsa |
buildNetworkLsa(org.onlab.packet.Ip4Address interfaceIp,
org.onlab.packet.Ip4Address mask)
Builds a network LSA.
|
org.onosproject.ospf.protocol.lsa.types.RouterLsa |
buildRouterLsa(org.onosproject.ospf.controller.OspfInterface ospfInterface)
Builds Router LSA.
|
org.onosproject.ospf.controller.OspfLsdb |
database()
Gets the lsdb instance for this area.
|
void |
deleteLsa(org.onosproject.ospf.protocol.lsa.LsaHeader ospfLsa)
Methods gets called from ChannelHandler to delete the LSA.
|
boolean |
equals(Object o) |
List<org.onosproject.ospf.controller.OspfInterface> |
getInterfacesLst()
Gets the list of interfaces in this area.
|
org.onosproject.ospf.controller.LsaWrapper |
getLsa(int lsType,
String linkStateID,
String advertisingRouter)
Gets the LSA from LSDB based on the input.
|
List |
getLsaHeaders(boolean excludeMaxAgeLsa,
boolean isOpaquecapable)
Gets header of all types of LSAs.
|
String |
getLsaKey(org.onosproject.ospf.protocol.lsa.LsaHeader lsaHeader)
Gets the LSDB LSA key from LSA header.
|
List<org.onosproject.ospf.controller.OspfNbr> |
getNeighborsInFullState(org.onosproject.ospf.controller.OspfInterface ospfInterface)
Checks all Neighbors belonging to this Area whether they are in state lesser than the EXCHANGE.
|
int |
hashCode() |
void |
initializeDb()
Initializes link state database.
|
boolean |
isExternalRoutingCapability()
Gets external routing capability.
|
String |
isNewerOrSameLsa(org.onosproject.ospf.controller.OspfLsa lsa1,
org.onosproject.ospf.controller.OspfLsa lsa2)
Checks whether an instance of the given LSA exists in the database belonging to this area.
|
boolean |
isOpaqueEnabled()
Gets is opaque enabled or not.
|
boolean |
isTransitCapability()
Gets is transit capable or not.
|
org.onosproject.ospf.controller.LsaWrapper |
lsaLookup(org.onosproject.ospf.controller.OspfLsa lookupLsa)
Checks whether an instance of the given LSA exists in the database belonging to this area.
|
boolean |
noNeighborInLsaExchangeProcess()
Checks all neighbors belonging to this area whether they are in state EXCHANGE or LOADING.
|
int |
opaqueEnabledOptions()
Gets the opaque enabled options value.
|
int |
options()
Gets the options value.
|
void |
refreshArea(org.onosproject.ospf.controller.OspfInterface ospfInterface)
Refreshes the OSPF area information .
|
void |
removeLsaFromBin(org.onosproject.ospf.controller.LsaWrapper lsaWrapper)
Removes LSA from bin.
|
org.onlab.packet.Ip4Address |
routerId()
Gets the router id.
|
void |
setAddressRanges(List<org.onosproject.ospf.controller.OspfAreaAddressRange> addressRanges)
Sets the area address ranges.
|
void |
setAreaId(org.onlab.packet.Ip4Address areaId)
Sets the area id.
|
void |
setDbRouterSequenceNumber(long newSequenceNumber)
Sets router sequence number for router LSA.
|
void |
setExternalRoutingCapability(boolean externalRoutingCapability)
Sets external routing capability.
|
void |
setInterfacesLst(List<org.onosproject.ospf.controller.OspfInterface> interfacesLst)
Sets the list of interfaces attached to the area.
|
void |
setIsOpaqueEnabled(boolean isOpaqueEnable)
Sets opaque enabled to true or false.
|
void |
setOptions(int options)
Sets the options value.
|
void |
setRouterId(org.onlab.packet.Ip4Address routerId)
Sets the router id.
|
void |
setStubCost(int stubCost)
Sets the stub cost.
|
void |
setTransitCapability(boolean transitCapability)
Sets transit capability.
|
int |
stubCost()
Gets the stub cost.
|
String |
toString() |
public org.onlab.packet.Ip4Address routerId()
routerId in interface org.onosproject.ospf.controller.OspfAreapublic void setRouterId(org.onlab.packet.Ip4Address routerId)
setRouterId in interface org.onosproject.ospf.controller.OspfArearouterId - router idpublic void setIsOpaqueEnabled(boolean isOpaqueEnable)
setIsOpaqueEnabled in interface org.onosproject.ospf.controller.OspfAreaisOpaqueEnable - true if opaque enabled else falsepublic boolean isOpaqueEnabled()
isOpaqueEnabled in interface org.onosproject.ospf.controller.OspfAreapublic void initializeDb()
initializeDb in interface org.onosproject.ospf.controller.OspfAreapublic void refreshArea(org.onosproject.ospf.controller.OspfInterface ospfInterface)
refreshArea in interface org.onosproject.ospf.controller.OspfAreaospfInterface - OSPF interface instancepublic org.onosproject.ospf.protocol.lsa.types.NetworkLsa buildNetworkLsa(org.onlab.packet.Ip4Address interfaceIp,
org.onlab.packet.Ip4Address mask)
throws Exception
interfaceIp - interface IP addressmask - interface network maskException - might throws exceptionpublic org.onosproject.ospf.protocol.lsa.types.RouterLsa buildRouterLsa(org.onosproject.ospf.controller.OspfInterface ospfInterface)
throws Exception
ospfInterface - Interface instanceException - might throws exceptionpublic org.onlab.packet.Ip4Address areaId()
areaId in interface org.onosproject.ospf.controller.OspfAreapublic void setAreaId(org.onlab.packet.Ip4Address areaId)
setAreaId in interface org.onosproject.ospf.controller.OspfAreaareaId - area idpublic List<org.onosproject.ospf.controller.OspfAreaAddressRange> addressRanges()
addressRanges in interface org.onosproject.ospf.controller.OspfAreapublic void setAddressRanges(List<org.onosproject.ospf.controller.OspfAreaAddressRange> addressRanges)
setAddressRanges in interface org.onosproject.ospf.controller.OspfAreaaddressRanges - list of area address rangepublic boolean isTransitCapability()
isTransitCapability in interface org.onosproject.ospf.controller.OspfAreapublic void setTransitCapability(boolean transitCapability)
setTransitCapability in interface org.onosproject.ospf.controller.OspfAreatransitCapability - true if transit capable, else falsepublic boolean isExternalRoutingCapability()
isExternalRoutingCapability in interface org.onosproject.ospf.controller.OspfAreapublic void setExternalRoutingCapability(boolean externalRoutingCapability)
setExternalRoutingCapability in interface org.onosproject.ospf.controller.OspfAreaexternalRoutingCapability - true if external routing capable, else falsepublic int stubCost()
stubCost in interface org.onosproject.ospf.controller.OspfAreapublic void setStubCost(int stubCost)
setStubCost in interface org.onosproject.ospf.controller.OspfAreastubCost - stub costpublic List<org.onosproject.ospf.controller.OspfInterface> getInterfacesLst()
getInterfacesLst in interface org.onosproject.ospf.controller.OspfAreapublic void setInterfacesLst(List<org.onosproject.ospf.controller.OspfInterface> interfacesLst)
setInterfacesLst in interface org.onosproject.ospf.controller.OspfAreainterfacesLst - list of OspfInterface instancespublic boolean noNeighborInLsaExchangeProcess()
noNeighborInLsaExchangeProcess in interface org.onosproject.ospf.controller.OspfAreapublic List getLsaHeaders(boolean excludeMaxAgeLsa, boolean isOpaquecapable)
getLsaHeaders in interface org.onosproject.ospf.controller.OspfAreaexcludeMaxAgeLsa - need to include(true) or exclude(false) maxage lsa'sisOpaquecapable - need to include(true) or exclude(false) Type 10 Opaque lsa'spublic org.onosproject.ospf.controller.LsaWrapper getLsa(int lsType,
String linkStateID,
String advertisingRouter)
throws Exception
getLsa in interface org.onosproject.ospf.controller.OspfArealsType - type of lsa to form the keylinkStateID - link state id to form the keyadvertisingRouter - advertising router to form the keyException - might throws exceptionpublic org.onosproject.ospf.controller.LsaWrapper lsaLookup(org.onosproject.ospf.controller.OspfLsa lookupLsa)
lsaLookup in interface org.onosproject.ospf.controller.OspfArealookupLsa - ospf LSA instance to lookuppublic String isNewerOrSameLsa(org.onosproject.ospf.controller.OspfLsa lsa1, org.onosproject.ospf.controller.OspfLsa lsa2)
isNewerOrSameLsa in interface org.onosproject.ospf.controller.OspfArealsa1 - OSPF LSA instance to comparelsa2 - OSPF LSA instance to comparepublic void addLsa(org.onosproject.ospf.controller.OspfLsa ospfLsa,
org.onosproject.ospf.controller.OspfInterface ospfInterface)
throws Exception
addLsa in interface org.onosproject.ospf.controller.OspfAreaospfLsa - OSPF LSA instanceospfInterface - OSPF interface instanceExceptionpublic void addLsa(org.onosproject.ospf.controller.OspfLsa ospfLsa,
boolean isSelfOriginated,
org.onosproject.ospf.controller.OspfInterface ospfInterface)
throws Exception
addLsa in interface org.onosproject.ospf.controller.OspfAreaospfLsa - OSPF LSA instanceisSelfOriginated - true if the LSA is self originated. Else falseospfInterface - OSPF interface instanceExceptionpublic void addLsaToMaxAgeBin(String key, org.onosproject.ospf.controller.LsaWrapper wrapper)
addLsaToMaxAgeBin in interface org.onosproject.ospf.controller.OspfAreakey - key to add it to LSDBwrapper - LSA wrapper instancepublic void setDbRouterSequenceNumber(long newSequenceNumber)
setDbRouterSequenceNumber in interface org.onosproject.ospf.controller.OspfAreanewSequenceNumber - sequence numberpublic void deleteLsa(org.onosproject.ospf.protocol.lsa.LsaHeader ospfLsa)
ospfLsa - the LSA instance to deletepublic void removeLsaFromBin(org.onosproject.ospf.controller.LsaWrapper lsaWrapper)
removeLsaFromBin in interface org.onosproject.ospf.controller.OspfArealsaWrapper - the LSA wrapper instance to deletepublic List<org.onosproject.ospf.controller.OspfNbr> getNeighborsInFullState(org.onosproject.ospf.controller.OspfInterface ospfInterface)
Creates list of such neighbors
Returns list of neighbors who satisfy the conditions
ospfInterface - OSPF interface instancepublic String getLsaKey(org.onosproject.ospf.protocol.lsa.LsaHeader lsaHeader)
lsaHeader - LSA header instancepublic void addToOtherNeighborLsaTxList(org.onosproject.ospf.protocol.lsa.LsaHeader recLsa)
recLsa - LSA Header instancepublic int options()
options in interface org.onosproject.ospf.controller.OspfAreapublic void setOptions(int options)
setOptions in interface org.onosproject.ospf.controller.OspfAreaoptions - options valuepublic int opaqueEnabledOptions()
opaqueEnabledOptions in interface org.onosproject.ospf.controller.OspfAreapublic org.onosproject.ospf.controller.OspfLsdb database()
database in interface org.onosproject.ospf.controller.OspfAreaCopyright © 2016. All rights reserved.