本文整理汇总了Java中org.onosproject.ospf.controller.OspfNbr类的典型用法代码示例。如果您正苦于以下问题:Java OspfNbr类的具体用法?Java OspfNbr怎么用?Java OspfNbr使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OspfNbr类属于org.onosproject.ospf.controller包,在下文中一共展示了OspfNbr类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeNeighbor
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Removes neighbor from the interface neighbor map.
*
* @param ospfNeighbor OSPF neighbor instance
*/
public void removeNeighbor(OspfNbr ospfNeighbor) {
log.debug("Neighbor removed - {}", ospfNeighbor.neighborId());
ospfNeighbor.stopInactivityTimeCheck();
ospfNeighbor.stopFloodingTimer();
ospfNeighbor.stopRxMtDdTimer();
ospfNeighbor.stopRxMtLsrTimer();
listOfNeighbors.remove(ospfNeighbor.neighborId());
}
示例2: buildNeighborInformation
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Builds OSPF neighbor information.
*/
private void buildNeighborInformation() {
try {
this.ospfController = get(OspfController.class);
List<OspfProcess> listOfProcess = ospfController.getAllConfiguredProcesses();
boolean flag = false;
printNeighborsFormat();
Iterator<OspfProcess> itrProcess = listOfProcess.iterator();
while (itrProcess.hasNext()) {
OspfProcess process = itrProcess.next();
List<OspfArea> listAreas = process.areas();
Iterator<OspfArea> itrArea = listAreas.iterator();
while (itrArea.hasNext()) {
OspfArea area = itrArea.next();
List<OspfInterface> itrefaceList = area.ospfInterfaceList();
for (OspfInterface interfc : itrefaceList) {
List<OspfNbr> nghbrList = new ArrayList<>(interfc.listOfNeighbors().values());
for (OspfNbr neigbor : nghbrList) {
print("%-20s%-20s%-20s%-20s%-20s\n", neigbor.neighborId(), neigbor.routerPriority(),
neigbor.getState() + "/" + checkDrBdrOther(neigbor.neighborIpAddr().toString(),
neigbor.neighborDr().toString(),
neigbor.neighborBdr().toString()),
neigbor.neighborIpAddr().toString(), interfc.ipAddress());
}
}
}
}
} catch (Exception ex) {
print("Error occured while Ospf controller getting called" + ex.getMessage());
}
}
示例3: removeNeighbor
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Removes neighbor from the interface neighbor map.
*
* @param ospfNeighbor OSPF neighbor instance
*/
public void removeNeighbor(OspfNbr ospfNeighbor) {
log.debug("Neighbor removed - {}", ospfNeighbor.neighborId());
ospfNeighbor.stopInactivityTimeCheck();
ospfNeighbor.stopFloodingTimer();
ospfNeighbor.stopRxMtDdTimer();
ospfNeighbor.stopRxMtLsrTimer();
listOfNeighbors.remove(ospfNeighbor.neighborId().toString());
}
示例4: buildNetworkLsa
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Builds a network LSA.
*
* @param interfaceIp interface IP address
* @param mask interface network mask
* @return NetworkLsa instance
* @throws Exception might throws exception
*/
public NetworkLsa buildNetworkLsa(Ip4Address interfaceIp, Ip4Address mask) throws Exception {
// generate the Router-LSA for this Area.
NetworkLsa networkLsa = new NetworkLsa();
networkLsa.setAdvertisingRouter(routerId);
networkLsa.setLinkStateId(interfaceIp.toString());
networkLsa.setLsType(OspfLsaType.NETWORK.value());
networkLsa.setAge(1);
networkLsa.setOptions(2);
networkLsa.setNetworkMask(mask);
//Adding our own router.
networkLsa.addAttachedRouter(routerId());
Iterator iter = ospfInterfaceList.iterator();
OspfInterfaceImpl ospfInterface = null;
while (iter.hasNext()) {
ospfInterface = (OspfInterfaceImpl) iter.next();
if (ospfInterface.ipAddress().equals(interfaceIp)) {
break;
}
}
if (ospfInterface != null) {
List<OspfNbr> neighborsInFullState = getNeighborsInFullState(ospfInterface);
if (neighborsInFullState != null) {
for (OspfNbr ospfnbr : neighborsInFullState) {
networkLsa.addAttachedRouter(ospfnbr.neighborId());
log.debug("Adding attached neighbor:: {}", ospfnbr.neighborId());
}
}
}
networkLsa.setLsSequenceNo(database.getLsSequenceNumber(OspfLsaType.NETWORK));
//Find the byte length and add it in lsa object
ChecksumCalculator checksum = new ChecksumCalculator();
byte[] lsaBytes = networkLsa.asBytes();
networkLsa.setLsPacketLen(lsaBytes.length);
//Convert lsa object to byte again to reflect the packet length which we added.
lsaBytes = networkLsa.asBytes();
//find the checksum
byte[] twoByteChecksum = checksum.calculateLsaChecksum(lsaBytes,
OspfUtil.LSAPACKET_CHECKSUM_POS1,
OspfUtil.LSAPACKET_CHECKSUM_POS2);
int checkSumVal = OspfUtil.byteToInteger(twoByteChecksum);
networkLsa.setLsCheckSum(checkSumVal);
return networkLsa;
}
示例5: processLsRequestMessage
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Process the Ls Request message.
*
* @param ospfMessage OSPF message instance.
* @param ctx channel handler context instance.
* @throws Exception might throws exception
*/
void processLsRequestMessage(OspfMessage ospfMessage, ChannelHandlerContext ctx) throws Exception {
log.debug("OspfChannelHandler::processLsRequestMessage...!!!");
Channel channel = ctx.getChannel();
LsRequest lsrPacket = (LsRequest) ospfMessage;
OspfNbr nbr = neighbouringRouter(lsrPacket.routerId().toString());
if (nbr.getState() == OspfNeighborState.EXCHANGE || nbr.getState() == OspfNeighborState.LOADING ||
nbr.getState() == OspfNeighborState.FULL) {
LsRequest reqMsg = (LsRequest) ospfMessage;
if (reqMsg.getLinkStateRequests().isEmpty()) {
log.debug("Received Link State Request Vector is Empty ");
return;
} else {
//Send the LsUpdate back
ListIterator<LsRequestPacket> listItr = reqMsg.getLinkStateRequests().listIterator();
while (listItr.hasNext()) {
LsUpdate lsupdate = new LsUpdate();
lsupdate.setOspfVer(OspfUtil.OSPF_VERSION);
lsupdate.setOspftype(OspfPacketType.LSUPDATE.value());
lsupdate.setRouterId(ospfArea.routerId());
lsupdate.setAreaId(ospfArea.areaId());
lsupdate.setAuthType(OspfUtil.NOT_ASSIGNED);
lsupdate.setAuthentication(OspfUtil.NOT_ASSIGNED);
lsupdate.setOspfPacLength(OspfUtil.NOT_ASSIGNED); // to calculate packet length
lsupdate.setChecksum(OspfUtil.NOT_ASSIGNED);
//limit to mtu
int currentLength = OspfUtil.OSPF_HEADER_LENGTH + OspfUtil.FOUR_BYTES;
int maxSize = mtu() -
OspfUtil.LSA_HEADER_LENGTH; // subtract a normal IP header.
int noLsa = 0;
while (listItr.hasNext()) {
LsRequestPacket lsRequest = (LsRequestPacket) listItr.next();
// to verify length of the LSA
LsaWrapper wrapper = ospfArea.getLsa(lsRequest.lsType(), lsRequest.linkStateId(),
lsRequest.ownRouterId());
OspfLsa ospflsa = wrapper.ospfLsa();
if ((currentLength + ((LsaWrapperImpl) wrapper).lsaHeader().lsPacketLen()) >= maxSize) {
listItr.previous();
break;
}
if (ospflsa != null) {
lsupdate.addLsa(ospflsa);
noLsa++;
currentLength = currentLength + ((LsaWrapperImpl) wrapper).lsaHeader().lsPacketLen();
} else {
nbr.badLSReq(channel);
}
}
lsupdate.setNumberOfLsa(noLsa);
//set the destination
if (state() == OspfInterfaceState.DR ||
state() == OspfInterfaceState.BDR ||
state() == OspfInterfaceState.POINT2POINT) {
lsupdate.setDestinationIp(OspfUtil.ALL_SPF_ROUTERS);
} else if (state() == OspfInterfaceState.DROTHER) {
lsupdate.setDestinationIp(OspfUtil.ALL_DROUTERS);
}
byte[] messageToWrite = getMessage(lsupdate);
ctx.getChannel().write(messageToWrite);
}
}
}
}
示例6: run
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
@Override
public void run() {
if (channel != null && channel.isOpen() && channel.isConnected()) {
if (interfaceType() == OspfInterfaceType.BROADCAST.value()) {
if (interfaceTypeOldValue != interfaceType()) {
try {
callDrElection(channel);
} catch (Exception e) {
log.debug("Error while calling interfaceUp {}", e.getMessage());
}
}
} else {
if (interfaceTypeOldValue != interfaceType()) {
interfaceTypeOldValue = interfaceType();
}
}
HelloPacket hellopacket = new HelloPacket();
//Headers
hellopacket.setOspfVer(OspfUtil.OSPF_VERSION);
hellopacket.setOspftype(OspfPacketType.HELLO.value());
hellopacket.setOspfPacLength(0); //will be modified while encoding
hellopacket.setRouterId(ospfArea.routerId());
hellopacket.setAreaId(ospfArea.areaId());
hellopacket.setChecksum(0); //will be modified while encoding
hellopacket.setAuthType(OspfUtil.NOT_ASSIGNED);
hellopacket.setAuthentication(OspfUtil.NOT_ASSIGNED);
//Body
hellopacket.setNetworkMask(ipNetworkMask());
hellopacket.setOptions(ospfArea.options());
hellopacket.setHelloInterval(helloIntervalTime());
hellopacket.setRouterPriority(routerPriority());
hellopacket.setRouterDeadInterval(routerDeadIntervalTime());
hellopacket.setDr(dr());
hellopacket.setBdr(bdr());
Map<String, OspfNbr> listOfNeighbors = listOfNeighbors();
Set<String> keys = listOfNeighbors.keySet();
Iterator itr = keys.iterator();
while (itr.hasNext()) {
String nbrKey = (String) itr.next();
OspfNbrImpl nbr = (OspfNbrImpl) listOfNeighbors.get(nbrKey);
if (nbr.getState() != OspfNeighborState.DOWN) {
hellopacket.addNeighbor(Ip4Address.valueOf(nbrKey));
}
}
// build a hello Packet
if (channel == null || !channel.isOpen() || !channel.isConnected()) {
log.debug("Hello Packet not sent !!.. Channel Issue...");
return;
}
hellopacket.setDestinationIp(OspfUtil.ALL_SPF_ROUTERS);
byte[] messageToWrite = getMessage(hellopacket);
ChannelFuture future = channel.write(messageToWrite);
if (future.isSuccess()) {
log.debug("Hello Packet successfully sent !!");
} else {
future.awaitUninterruptibly();
}
}
}
示例7: updateInterfaceMap
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Updates the interface map with interface details.
*
* @param ospfProcesses updated process instances
* @throws Exception might throws exception
*/
public void updateInterfaceMap(List<OspfProcess> ospfProcesses) throws Exception {
for (OspfProcess ospfUpdatedProcess : ospfProcesses) {
for (OspfArea updatedArea : ospfUpdatedProcess.areas()) {
for (OspfInterface ospfUpdatedInterface : updatedArea.ospfInterfaceList()) {
OspfInterface ospfInterface = ospfInterfaceMap.get(ospfUpdatedInterface.interfaceIndex());
if (ospfInterface == null) {
ospfUpdatedInterface.setOspfArea(updatedArea);
((OspfInterfaceImpl) ospfUpdatedInterface).setController(controller);
((OspfInterfaceImpl) ospfUpdatedInterface).setState(OspfInterfaceState.DOWN);
ospfUpdatedInterface.setDr(Ip4Address.valueOf("0.0.0.0"));
ospfUpdatedInterface.setBdr(Ip4Address.valueOf("0.0.0.0"));
ospfInterfaceMap.put(ospfUpdatedInterface.interfaceIndex(), ospfUpdatedInterface);
((OspfInterfaceImpl) ospfUpdatedInterface).setChannel(channel);
ospfUpdatedInterface.interfaceUp();
ospfUpdatedInterface.startDelayedAckTimer();
} else {
ospfInterface.setOspfArea(updatedArea);
if (ospfInterface.routerDeadIntervalTime() != ospfUpdatedInterface.routerDeadIntervalTime()) {
ospfInterface.setRouterDeadIntervalTime(ospfUpdatedInterface.routerDeadIntervalTime());
Map<String, OspfNbr> neighbors = ospfInterface.listOfNeighbors();
for (String key : neighbors.keySet()) {
OspfNbr ospfNbr = ospfInterface.neighbouringRouter(key);
ospfNbr.setRouterDeadInterval(ospfInterface.routerDeadIntervalTime());
ospfNbr.stopInactivityTimeCheck();
ospfNbr.startInactivityTimeCheck();
}
}
if (ospfInterface.interfaceType() != ospfUpdatedInterface.interfaceType()) {
ospfInterface.setInterfaceType(ospfUpdatedInterface.interfaceType());
if (ospfInterface.interfaceType() == OspfInterfaceType.POINT_TO_POINT.value()) {
ospfInterface.setDr(Ip4Address.valueOf("0.0.0.0"));
ospfInterface.setBdr(Ip4Address.valueOf("0.0.0.0"));
}
ospfInterface.removeNeighbors();
}
if (ospfInterface.helloIntervalTime() != ospfUpdatedInterface.helloIntervalTime()) {
ospfInterface.setHelloIntervalTime(ospfUpdatedInterface.helloIntervalTime());
ospfInterface.stopHelloTimer();
ospfInterface.startHelloTimer();
}
ospfInterfaceMap.put(ospfInterface.interfaceIndex(), ospfInterface);
}
}
}
}
}
示例8: buildNetworkLsa
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Builds a network LSA.
*
* @param interfaceIp interface IP address
* @param mask interface network mask
* @return NetworkLsa instance
* @throws OspfParseException might throws exception
*/
public NetworkLsa buildNetworkLsa(Ip4Address interfaceIp, Ip4Address mask) throws OspfParseException {
// generate the Router-LSA for this Area.
NetworkLsa networkLsa = new NetworkLsa();
networkLsa.setAdvertisingRouter(routerId);
networkLsa.setLinkStateId(interfaceIp.toString());
networkLsa.setLsType(OspfLsaType.NETWORK.value());
networkLsa.setAge(1);
networkLsa.setOptions(2);
networkLsa.setNetworkMask(mask);
//Adding our own router.
networkLsa.addAttachedRouter(routerId());
Iterator iter = ospfInterfaceList.iterator();
OspfInterfaceImpl ospfInterface = null;
while (iter.hasNext()) {
ospfInterface = (OspfInterfaceImpl) iter.next();
if (ospfInterface.ipAddress().equals(interfaceIp)) {
break;
}
}
if (ospfInterface != null) {
List<OspfNbr> neighborsInFullState = getNeighborsInFullState(ospfInterface);
if (neighborsInFullState != null) {
for (OspfNbr ospfnbr : neighborsInFullState) {
networkLsa.addAttachedRouter(ospfnbr.neighborId());
log.debug("Adding attached neighbor:: {}", ospfnbr.neighborId());
}
}
}
networkLsa.setLsSequenceNo(database.getLsSequenceNumber(OspfLsaType.NETWORK));
//Find the byte length and add it in lsa object
ChecksumCalculator checksum = new ChecksumCalculator();
byte[] lsaBytes = networkLsa.asBytes();
networkLsa.setLsPacketLen(lsaBytes.length);
//Convert lsa object to byte again to reflect the packet length which we added.
lsaBytes = networkLsa.asBytes();
//find the checksum
byte[] twoByteChecksum = checksum.calculateLsaChecksum(lsaBytes,
OspfUtil.LSAPACKET_CHECKSUM_POS1,
OspfUtil.LSAPACKET_CHECKSUM_POS2);
int checkSumVal = OspfUtil.byteToInteger(twoByteChecksum);
networkLsa.setLsCheckSum(checkSumVal);
return networkLsa;
}
示例9: processLsRequestMessage
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Process the Ls Request message.
*
* @param ospfMessage OSPF message instance.
* @param ctx channel handler context instance.
*/
void processLsRequestMessage(OspfMessage ospfMessage, ChannelHandlerContext ctx) {
log.debug("OspfChannelHandler::processLsRequestMessage...!!!");
Channel channel = ctx.getChannel();
LsRequest lsrPacket = (LsRequest) ospfMessage;
OspfNbr nbr = neighbouringRouter(lsrPacket.routerId().toString());
if (nbr.getState() == OspfNeighborState.EXCHANGE || nbr.getState() == OspfNeighborState.LOADING ||
nbr.getState() == OspfNeighborState.FULL) {
LsRequest reqMsg = (LsRequest) ospfMessage;
if (reqMsg.getLinkStateRequests().isEmpty()) {
log.debug("Received Link State Request Vector is Empty ");
return;
} else {
//Send the LsUpdate back
ListIterator<LsRequestPacket> listItr = reqMsg.getLinkStateRequests().listIterator();
while (listItr.hasNext()) {
LsUpdate lsupdate = new LsUpdate();
lsupdate.setOspfVer(OspfUtil.OSPF_VERSION);
lsupdate.setOspftype(OspfPacketType.LSUPDATE.value());
lsupdate.setRouterId(ospfArea.routerId());
lsupdate.setAreaId(ospfArea.areaId());
lsupdate.setAuthType(OspfUtil.NOT_ASSIGNED);
lsupdate.setAuthentication(OspfUtil.NOT_ASSIGNED);
lsupdate.setOspfPacLength(OspfUtil.NOT_ASSIGNED); // to calculate packet length
lsupdate.setChecksum(OspfUtil.NOT_ASSIGNED);
//limit to mtu
int currentLength = OspfUtil.OSPF_HEADER_LENGTH + OspfUtil.FOUR_BYTES;
int maxSize = mtu() -
OspfUtil.LSA_HEADER_LENGTH; // subtract a normal IP header.
int noLsa = 0;
while (listItr.hasNext()) {
LsRequestPacket lsRequest = listItr.next();
// to verify length of the LSA
LsaWrapper wrapper = ospfArea.getLsa(lsRequest.lsType(), lsRequest.linkStateId(),
lsRequest.ownRouterId());
if (wrapper != null) {
OspfLsa ospflsa = wrapper.ospfLsa();
if ((currentLength + ((LsaWrapperImpl) wrapper).lsaHeader().lsPacketLen()) >= maxSize) {
listItr.previous();
break;
}
if (ospflsa != null) {
lsupdate.addLsa(ospflsa);
noLsa++;
currentLength = currentLength + ((LsaWrapperImpl) wrapper).lsaHeader().lsPacketLen();
} else {
nbr.badLSReq(channel);
}
}
}
lsupdate.setNumberOfLsa(noLsa);
//set the destination
if (state() == OspfInterfaceState.DR ||
state() == OspfInterfaceState.BDR ||
state() == OspfInterfaceState.POINT2POINT) {
lsupdate.setDestinationIp(OspfUtil.ALL_SPF_ROUTERS);
} else if (state() == OspfInterfaceState.DROTHER) {
lsupdate.setDestinationIp(OspfUtil.ALL_DROUTERS);
}
byte[] messageToWrite = getMessage(lsupdate);
ctx.getChannel().write(messageToWrite);
}
}
}
}
示例10: updateInterfaceMap
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Updates the interface map with interface details.
*
* @param ospfProcesses updated process instances
*/
public void updateInterfaceMap(List<OspfProcess> ospfProcesses) {
for (OspfProcess ospfUpdatedProcess : ospfProcesses) {
for (OspfArea updatedArea : ospfUpdatedProcess.areas()) {
for (OspfInterface ospfUpdatedInterface : updatedArea.ospfInterfaceList()) {
OspfInterface ospfInterface = ospfInterfaceMap.get(ospfUpdatedInterface.interfaceIndex());
if (ospfInterface == null) {
ospfUpdatedInterface.setOspfArea(updatedArea);
((OspfInterfaceImpl) ospfUpdatedInterface).setController(controller);
((OspfInterfaceImpl) ospfUpdatedInterface).setState(OspfInterfaceState.DOWN);
ospfUpdatedInterface.setDr(Ip4Address.valueOf("0.0.0.0"));
ospfUpdatedInterface.setBdr(Ip4Address.valueOf("0.0.0.0"));
ospfInterfaceMap.put(ospfUpdatedInterface.interfaceIndex(), ospfUpdatedInterface);
((OspfInterfaceImpl) ospfUpdatedInterface).setChannel(channel);
ospfUpdatedInterface.interfaceUp();
ospfUpdatedInterface.startDelayedAckTimer();
} else {
ospfInterface.setOspfArea(updatedArea);
if (ospfInterface.routerDeadIntervalTime() != ospfUpdatedInterface.routerDeadIntervalTime()) {
ospfInterface.setRouterDeadIntervalTime(ospfUpdatedInterface.routerDeadIntervalTime());
Map<String, OspfNbr> neighbors = ospfInterface.listOfNeighbors();
for (String key : neighbors.keySet()) {
OspfNbr ospfNbr = ospfInterface.neighbouringRouter(key);
ospfNbr.setRouterDeadInterval(ospfInterface.routerDeadIntervalTime());
ospfNbr.stopInactivityTimeCheck();
ospfNbr.startInactivityTimeCheck();
}
}
if (ospfInterface.interfaceType() != ospfUpdatedInterface.interfaceType()) {
ospfInterface.setInterfaceType(ospfUpdatedInterface.interfaceType());
if (ospfInterface.interfaceType() == OspfInterfaceType.POINT_TO_POINT.value()) {
ospfInterface.setDr(Ip4Address.valueOf("0.0.0.0"));
ospfInterface.setBdr(Ip4Address.valueOf("0.0.0.0"));
}
ospfInterface.removeNeighbors();
}
if (ospfInterface.helloIntervalTime() != ospfUpdatedInterface.helloIntervalTime()) {
ospfInterface.setHelloIntervalTime(ospfUpdatedInterface.helloIntervalTime());
ospfInterface.stopHelloTimer();
ospfInterface.startHelloTimer();
}
ospfInterfaceMap.put(ospfInterface.interfaceIndex(), ospfInterface);
}
}
}
}
}
示例11: addNeighbouringRouter
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Adds neighboring router to list.
*
* @param ospfNbr ospfNbr instance
*/
public void addNeighbouringRouter(OspfNbr ospfNbr) {
listOfNeighbors.put(ospfNbr.neighborId().toString(), ospfNbr);
}
示例12: neighbouringRouter
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Gets the neighbour details from listOfNeighbors map.
*
* @param neighborId neighbors id
* @return ospfNbr neighbor instance
*/
public OspfNbr neighbouringRouter(String neighborId) {
return listOfNeighbors.get(neighborId);
}
示例13: listOfNeighbors
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Gets the list of neighbors.
*
* @return listOfNeighbors as key value pair
*/
public Map<String, OspfNbr> listOfNeighbors() {
return listOfNeighbors;
}
示例14: setListOfNeighbors
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Sets the list of neighbors.
*
* @param listOfNeighbors as key value pair
*/
public void setListOfNeighbors(HashMap<String, OspfNbr> listOfNeighbors) {
this.listOfNeighbors = listOfNeighbors;
}
示例15: addNeighbouringRouter
import org.onosproject.ospf.controller.OspfNbr; //导入依赖的package包/类
/**
* Adds neighboring router to list.
*
* @param ospfNbr ospfNbr instance
*/
@Override
public void addNeighbouringRouter(OspfNbr ospfNbr) {
listOfNeighbors.put(ospfNbr.neighborId().toString(), ospfNbr);
}