public class OspfNbrImpl extends Object implements org.onosproject.ospf.controller.OspfNbr
| Constructor and Description |
|---|
OspfNbrImpl(org.onosproject.ospf.controller.OspfArea paramOspfArea,
org.onosproject.ospf.controller.OspfInterface paramOspfInterface,
org.onlab.packet.Ip4Address ipAddr,
org.onlab.packet.Ip4Address routerId,
int options,
OspfInterfaceChannelHandler handler,
org.onosproject.ospf.controller.TopologyForDeviceAndLink topologyForDeviceAndLinkCommon)
Creates an instance of Neighbor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
adjOk(org.jboss.netty.channel.Channel ch)
Determines whether an adjacency should be established/maintained with the neighbor or not.
|
void |
badLSReq(org.jboss.netty.channel.Channel ch)
Called if a LS Request has been received for an LSA which is not contained in the database.
|
long |
ddSeqNum()
Gets the DD sequence number.
|
void |
directAcknowledge(org.onosproject.ospf.protocol.lsa.LsaHeader ackLsa,
org.jboss.netty.channel.Channel ch,
org.onlab.packet.Ip4Address sourceIp)
Sends a direct Acknowledgment for a particular LSA to the Neighbor.
|
void |
exchangeDone(org.onosproject.ospf.protocol.ospfpacket.OspfMessage message,
org.jboss.netty.channel.Channel ch)
At this point, the router has sent and received an entire sequence of DD packets.
|
org.onosproject.ospf.protocol.ospfpacket.types.LsRequest |
getLastSentLsrPacket()
Gets the last sent Ls Request Packet.
|
Hashtable |
getLsReqList()
Gets the ls request list.
|
Map<String,org.onosproject.ospf.controller.OspfLsa> |
getPendingReTxList()
Gets the pending re transmit list.
|
Map |
getReTxList()
Gets the reTxList instance.
|
org.onosproject.ospf.controller.OspfNeighborState |
getState()
Gets the neighbors state.
|
int |
isMaster()
Gets neighbor is master or not.
|
String |
isNullorLatest(org.onosproject.ospf.controller.LsaWrapper lsWrapper,
org.onosproject.ospf.protocol.lsa.LsaHeader recLsa)
RFC 2328 Section 13 (5).
|
boolean |
isOpaqueCapable()
Gets the neighbor is opaque enabled or not.
|
org.onosproject.ospf.protocol.ospfpacket.types.DdPacket |
lastDdPacket()
Gets the last sent DdPacket.
|
org.onosproject.ospf.protocol.ospfpacket.types.DdPacket |
lastSentDdPacket()
Gets the last sent DD Packet.
|
void |
loadingDone()
Method gets called when no more ls request list and moving to FULL State.
|
void |
negotiationDone(org.onosproject.ospf.protocol.ospfpacket.OspfMessage ospfMessage,
boolean neighborIsMaster,
List payload,
org.jboss.netty.channel.Channel ch)
At this point Master/Slave relationship is definitely established.
|
org.onlab.packet.Ip4Address |
neighborBdr()
Gets the neighbor BDR address.
|
void |
neighborDown()
Called when neighbor is down.
|
org.onlab.packet.Ip4Address |
neighborDr()
Gets the neighbor DR address.
|
org.onlab.packet.Ip4Address |
neighborId()
Gets neighbor id.
|
org.onlab.packet.Ip4Address |
neighborIpAddr()
Gets the IP address of this neighbor.
|
void |
oneWayReceived(org.onosproject.ospf.protocol.ospfpacket.OspfMessage ospfHello,
org.jboss.netty.channel.Channel channel)
Have seen a Neighbor, but the Neighbor doesn't know about me.
|
int |
options()
Gets the options value.
|
void |
processDdPacket(boolean neighborIsMaster,
org.onosproject.ospf.protocol.ospfpacket.types.DdPacket dataDescPkt,
org.jboss.netty.channel.Channel ch)
Called if state is EXCHANGE.
|
void |
processLsas(List ddPayload)
Process the LSA Headers received in the last received Database Description OSPFMessage.
|
void |
processLsUpdate(org.onosproject.ospf.protocol.ospfpacket.types.LsUpdate lsUpdPkt,
org.jboss.netty.channel.Channel ch)
LS Update Packet has been received while state was EXCHANGE or LOADING.
|
boolean |
processReceivedLsa(org.onosproject.ospf.protocol.lsa.LsaHeader recLsa,
boolean receivedViaFlooding,
org.jboss.netty.channel.Channel ch,
org.onlab.packet.Ip4Address sourceIp)
Processes the received Lsa.
|
void |
processSelfOriginatedLsa()
RFC 2328 section 13.4
Processing self-originated LSAs.
|
int |
routerPriority()
Gets router priority.
|
void |
sendLsa(org.onosproject.ospf.protocol.lsa.LsaHeader lsa,
org.onlab.packet.Ip4Address destination,
org.jboss.netty.channel.Channel ch)
Sends the LSA to destination address.
|
org.onosproject.ospf.protocol.ospfpacket.OspfMessage |
seqNumMismatch(String reason)
Handles sequence number mis match event.
|
void |
setDdSeqNum(long ddSeqNum)
Sets the DD sequence number.
|
void |
setIsMaster(int isMaster)
Sets neighbor is master or not.
|
void |
setIsOpaqueCapable(boolean isOpaqueCapable)
Sets the neighbor is opaque enabled or not.
|
void |
setLastDdPacket(org.onosproject.ospf.protocol.ospfpacket.types.DdPacket lastDdPacket)
Sets the last sent DdPacket.
|
void |
setLastSentDdPacket(org.onosproject.ospf.protocol.ospfpacket.types.DdPacket lastSentDdPacket)
Sets the last sent DD Packet.
|
void |
setLastSentLsrPacket(org.onosproject.ospf.protocol.ospfpacket.types.LsRequest lastSentLsrPacket)
Sets the last sent Ls Request Packet.
|
void |
setNeighborBdr(org.onlab.packet.Ip4Address neighborBdr)
Sets the neighbor BDR address.
|
void |
setNeighborDr(org.onlab.packet.Ip4Address neighborDr)
Sets the neighbor DR address.
|
void |
setNeighborId(org.onlab.packet.Ip4Address neighborId)
Sets the neighbor id.
|
void |
setOptions(int options)
Sets the options value.
|
void |
setRouterPriority(int routerPriority)
Sets router priority.
|
void |
setState(org.onosproject.ospf.controller.OspfNeighborState state)
Sets the neighbors state.
|
void |
startFloodingTimer(org.jboss.netty.channel.Channel channel)
Starts the flooding timer.
|
void |
twoWayReceived(org.onosproject.ospf.protocol.ospfpacket.OspfMessage ospfMessage,
org.jboss.netty.channel.Channel channel)
Called when a DD OSPFMessage is received while state was INIT.
|
public OspfNbrImpl(org.onosproject.ospf.controller.OspfArea paramOspfArea,
org.onosproject.ospf.controller.OspfInterface paramOspfInterface,
org.onlab.packet.Ip4Address ipAddr,
org.onlab.packet.Ip4Address routerId,
int options,
OspfInterfaceChannelHandler handler,
org.onosproject.ospf.controller.TopologyForDeviceAndLink topologyForDeviceAndLinkCommon)
paramOspfArea - OSPF Area instanceparamOspfInterface - OSPF interface instanceipAddr - IP addressrouterId - router idoptions - optionshandler - channel handler instancetopologyForDeviceAndLinkCommon - topology for device and link instancepublic org.onlab.packet.Ip4Address neighborIpAddr()
neighborIpAddr in interface org.onosproject.ospf.controller.OspfNbrpublic boolean isOpaqueCapable()
isOpaqueCapable in interface org.onosproject.ospf.controller.OspfNbrpublic void setIsOpaqueCapable(boolean isOpaqueCapable)
setIsOpaqueCapable in interface org.onosproject.ospf.controller.OspfNbrisOpaqueCapable - true if the neighbor is opaque enabledelse falsepublic void oneWayReceived(org.onosproject.ospf.protocol.ospfpacket.OspfMessage ospfHello,
org.jboss.netty.channel.Channel channel)
ospfHello - Hello Packet instancechannel - netty channel instancepublic void twoWayReceived(org.onosproject.ospf.protocol.ospfpacket.OspfMessage ospfMessage,
org.jboss.netty.channel.Channel channel)
throws Exception
ospfMessage - ospf message instancechannel - netty channel instanceException - might throws exceptionpublic void negotiationDone(org.onosproject.ospf.protocol.ospfpacket.OspfMessage ospfMessage,
boolean neighborIsMaster,
List payload,
org.jboss.netty.channel.Channel ch)
throws Exception
ospfMessage - OSPF message instanceneighborIsMaster - neighbor is master or slavepayload - contains the LSAs to add in Dd Packetch - netty channel instanceException - might throws exceptionpublic void processLsas(List ddPayload) throws Exception
ddPayload - LSA headers to processException - might throws exceptionpublic org.onosproject.ospf.protocol.ospfpacket.OspfMessage seqNumMismatch(String reason) throws Exception
reason - a string represents the mismatch reasonException - might throws exceptionpublic void badLSReq(org.jboss.netty.channel.Channel ch)
throws Exception
badLSReq in interface org.onosproject.ospf.controller.OspfNbrch - netty channel instanceExceptionpublic void processDdPacket(boolean neighborIsMaster,
org.onosproject.ospf.protocol.ospfpacket.types.DdPacket dataDescPkt,
org.jboss.netty.channel.Channel ch)
throws Exception
neighborIsMaster - true if neighbor is master else falsedataDescPkt - DdPacket instancech - netty channel instanceException - might throws exceptionpublic void exchangeDone(org.onosproject.ospf.protocol.ospfpacket.OspfMessage message,
org.jboss.netty.channel.Channel ch)
message - OSPF message instancech - netty channel handlerpublic void adjOk(org.jboss.netty.channel.Channel ch)
adjOk in interface org.onosproject.ospf.controller.OspfNbrch - netty channel instancepublic void processLsUpdate(org.onosproject.ospf.protocol.ospfpacket.types.LsUpdate lsUpdPkt,
org.jboss.netty.channel.Channel ch)
throws Exception
lsUpdPkt - LS Update Packet received while Neighbor state was EXCHANGE or
LOADINGch - netty channel instanceException - might throws exceptionpublic void loadingDone()
throws Exception
Exception - might throws exceptionpublic boolean processReceivedLsa(org.onosproject.ospf.protocol.lsa.LsaHeader recLsa,
boolean receivedViaFlooding,
org.jboss.netty.channel.Channel ch,
org.onlab.packet.Ip4Address sourceIp)
throws Exception
recLsa - received LsareceivedViaFlooding - received via flooding or notch - channel instancesourceIp - source of this LsaException - might throws exceptionpublic String isNullorLatest(org.onosproject.ospf.controller.LsaWrapper lsWrapper, org.onosproject.ospf.protocol.lsa.LsaHeader recLsa)
lsWrapper - ls wrapper instancerecLsa - received LSA instancepublic void processSelfOriginatedLsa()
throws Exception
Exception - might throws exceptionpublic void sendLsa(org.onosproject.ospf.protocol.lsa.LsaHeader lsa,
org.onlab.packet.Ip4Address destination,
org.jboss.netty.channel.Channel ch)
lsa - LSA instance to sentdestination - destination IP addressch - netty channel instancepublic void directAcknowledge(org.onosproject.ospf.protocol.lsa.LsaHeader ackLsa,
org.jboss.netty.channel.Channel ch,
org.onlab.packet.Ip4Address sourceIp)
ackLsa - LSA instancech - netty channel instancesourceIp - source IP addresspublic void neighborDown()
throws Exception
Exception - might throws exceptionpublic void startFloodingTimer(org.jboss.netty.channel.Channel channel)
channel - channel instancepublic org.onosproject.ospf.protocol.ospfpacket.types.DdPacket lastDdPacket()
public void setLastDdPacket(org.onosproject.ospf.protocol.ospfpacket.types.DdPacket lastDdPacket)
lastDdPacket - DdPacket instancepublic org.onlab.packet.Ip4Address neighborId()
neighborId in interface org.onosproject.ospf.controller.OspfNbrpublic void setNeighborId(org.onlab.packet.Ip4Address neighborId)
setNeighborId in interface org.onosproject.ospf.controller.OspfNbrneighborId - neighbor idpublic org.onlab.packet.Ip4Address neighborDr()
neighborDr in interface org.onosproject.ospf.controller.OspfNbrpublic void setNeighborDr(org.onlab.packet.Ip4Address neighborDr)
setNeighborDr in interface org.onosproject.ospf.controller.OspfNbrneighborDr - neighbor DR addresspublic org.onlab.packet.Ip4Address neighborBdr()
neighborBdr in interface org.onosproject.ospf.controller.OspfNbrpublic void setNeighborBdr(org.onlab.packet.Ip4Address neighborBdr)
setNeighborBdr in interface org.onosproject.ospf.controller.OspfNbrneighborBdr - neighbor BDR addresspublic int routerPriority()
routerPriority in interface org.onosproject.ospf.controller.OspfNbrpublic void setRouterPriority(int routerPriority)
setRouterPriority in interface org.onosproject.ospf.controller.OspfNbrrouterPriority - router prioritypublic int options()
options in interface org.onosproject.ospf.controller.OspfNbrpublic void setOptions(int options)
setOptions in interface org.onosproject.ospf.controller.OspfNbroptions - options valuepublic long ddSeqNum()
ddSeqNum in interface org.onosproject.ospf.controller.OspfNbrpublic void setDdSeqNum(long ddSeqNum)
setDdSeqNum in interface org.onosproject.ospf.controller.OspfNbrddSeqNum - DD sequence numberpublic int isMaster()
isMaster in interface org.onosproject.ospf.controller.OspfNbrpublic org.onosproject.ospf.protocol.ospfpacket.types.DdPacket lastSentDdPacket()
public void setLastSentDdPacket(org.onosproject.ospf.protocol.ospfpacket.types.DdPacket lastSentDdPacket)
lastSentDdPacket - last sent DD Packetpublic org.onosproject.ospf.protocol.ospfpacket.types.LsRequest getLastSentLsrPacket()
public void setLastSentLsrPacket(org.onosproject.ospf.protocol.ospfpacket.types.LsRequest lastSentLsrPacket)
lastSentLsrPacket - last sent Ls Request Packetpublic org.onosproject.ospf.controller.OspfNeighborState getState()
getState in interface org.onosproject.ospf.controller.OspfNbrpublic void setState(org.onosproject.ospf.controller.OspfNeighborState state)
state - neighbors statepublic void setIsMaster(int isMaster)
setIsMaster in interface org.onosproject.ospf.controller.OspfNbrisMaster - neighbor is master or notpublic Hashtable getLsReqList()
getLsReqList in interface org.onosproject.ospf.controller.OspfNbrpublic Map getReTxList()
getReTxList in interface org.onosproject.ospf.controller.OspfNbrCopyright © 2016. All rights reserved.