public class OspfInterfaceChannelHandler
extends org.jboss.netty.handler.timeout.IdleStateAwareChannelHandler
| Constructor and Description |
|---|
OspfInterfaceChannelHandler() |
OspfInterfaceChannelHandler(Controller controller,
org.onosproject.ospf.controller.OspfArea ospfArea,
org.onosproject.ospf.controller.OspfInterface ospfInterface)
Creates an instance of OSPF channel handler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDeviceInformation(org.onosproject.ospf.controller.OspfRouter ospfRouter)
Adds device information.
|
void |
addLinkInformation(org.onosproject.ospf.controller.OspfRouter ospfRouter,
org.onosproject.ospf.controller.OspfLinkTed ospfLinkTed)
Adds link information.
|
void |
backupSeen(org.jboss.netty.channel.Channel ch)
Gets called when a BDR was detected before the wait timer expired.
|
List<OspfEligibleRouter> |
calculateListOfEligibleRouters(OspfEligibleRouter electedDr)
BDR Election process.
|
void |
channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent evt) |
void |
channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent evt) |
boolean |
compareDdPackets(org.onosproject.ospf.protocol.ospfpacket.types.DdPacket receivedDPacket,
org.onosproject.ospf.protocol.ospfpacket.types.DdPacket lastDdPacket)
Compares two Dd Packets to check whether its duplicate or not.
|
OspfEligibleRouter |
electBdr(List<OspfEligibleRouter> eligibleRouters)
Based on router priority assigns BDR.
|
OspfEligibleRouter |
electDr(List<OspfEligibleRouter> eligibleRouters,
OspfEligibleRouter electedBdr)
DR Election process.
|
void |
electRouter(org.jboss.netty.channel.Channel ch)
Performs DR election.
|
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e) |
void |
interfaceDown()
Gets called when an interface is down.
|
void |
interfaceUp()
Represents an interface is up and connected.
|
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e) |
void |
neighborChange()
Neighbor change event is triggered when the router priority gets changed.
|
void |
processOspfMessage(org.onosproject.ospf.protocol.ospfpacket.OspfMessage ospfMessage,
org.jboss.netty.channel.ChannelHandlerContext ctx)
When an OSPF message received it is handed over to this method.
|
void |
removeDeviceInformation(org.onosproject.ospf.controller.OspfRouter ospfRouter)
removes device information.
|
void |
removeLinkInformation(org.onosproject.ospf.controller.OspfNbr ospfNbr)
Removes link information.
|
OspfEligibleRouter |
selectRouterBasedOnPriority(List<OspfEligibleRouter> routersList)
DR election process.
|
void |
waitTimer(org.jboss.netty.channel.Channel ch)
Gets called when no hello message received for particular period.
|
channelIdle, handleUpstreambindRequested, channelBound, channelClosed, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, handleDownstream, setInterestOpsRequested, unbindRequested, writeComplete, writeRequestedpublic OspfInterfaceChannelHandler()
public OspfInterfaceChannelHandler(Controller controller, org.onosproject.ospf.controller.OspfArea ospfArea, org.onosproject.ospf.controller.OspfInterface ospfInterface)
controller - controller instanceospfArea - ospf area instanceospfInterface - ospf interface instancepublic void interfaceUp()
throws Exception
Exception - might throws exceptionpublic void backupSeen(org.jboss.netty.channel.Channel ch)
throws Exception
ch - channel instanceException - might throws exceptionpublic void waitTimer(org.jboss.netty.channel.Channel ch)
throws Exception
ch - channel instanceException - might throws exceptionpublic void neighborChange()
throws Exception
Exception - might throws exceptionpublic void interfaceDown()
public void channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent evt)
throws Exception
channelConnected in class org.jboss.netty.channel.SimpleChannelHandlerExceptionpublic void channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent evt)
channelDisconnected in class org.jboss.netty.channel.SimpleChannelHandlerpublic void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e)
throws Exception
exceptionCaught in class org.jboss.netty.channel.SimpleChannelHandlerExceptionpublic void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e)
throws Exception
messageReceived in class org.jboss.netty.channel.SimpleChannelHandlerExceptionpublic void processOspfMessage(org.onosproject.ospf.protocol.ospfpacket.OspfMessage ospfMessage,
org.jboss.netty.channel.ChannelHandlerContext ctx)
throws Exception
ospfMessage - received OSPF messagectx - channel handler context instance.Exception - might throws exceptionpublic boolean compareDdPackets(org.onosproject.ospf.protocol.ospfpacket.types.DdPacket receivedDPacket,
org.onosproject.ospf.protocol.ospfpacket.types.DdPacket lastDdPacket)
receivedDPacket - received DD packet from network.lastDdPacket - Last DdPacket which we sent.public void electRouter(org.jboss.netty.channel.Channel ch)
throws Exception
ch - Netty Channel instance.Exception - might throws exceptionpublic List<OspfEligibleRouter> calculateListOfEligibleRouters(OspfEligibleRouter electedDr)
electedDr - router elected as DR.public OspfEligibleRouter electBdr(List<OspfEligibleRouter> eligibleRouters)
eligibleRouters - list of routers to participate in bdr election.public OspfEligibleRouter electDr(List<OspfEligibleRouter> eligibleRouters, OspfEligibleRouter electedBdr)
eligibleRouters - list of eligible routers.electedBdr - Elected Bdr, OSPF eligible router instance.public OspfEligibleRouter selectRouterBasedOnPriority(List<OspfEligibleRouter> routersList)
routersList - list of eligible routers.public void addDeviceInformation(org.onosproject.ospf.controller.OspfRouter ospfRouter)
ospfRouter - OSPF router instancepublic void removeDeviceInformation(org.onosproject.ospf.controller.OspfRouter ospfRouter)
ospfRouter - OSPF neighbor instancepublic void addLinkInformation(org.onosproject.ospf.controller.OspfRouter ospfRouter,
org.onosproject.ospf.controller.OspfLinkTed ospfLinkTed)
ospfRouter - OSPF router instanceospfLinkTed - list link ted instancespublic void removeLinkInformation(org.onosproject.ospf.controller.OspfNbr ospfNbr)
ospfNbr - OSPF neighbor instanceCopyright © 2016. All rights reserved.