@Test public void testProcessIsisMessage3() throws Exception { psnp = new Psnp(isisHeader); psnp.setSourceMac(macAddress1); psnp.setIsisPduType(IsisPduType.L2PSNP.value()); isisMessage = psnp; defaultIsisInterface.processIsisMessage(isisMessage, isisLsdb, channel); assertThat(defaultIsisInterface, is(notNullValue())); }
public void processIsisMessage(IsisMessage isisMessage, IsisLsdb isisLsdb, Channel channel) { log.debug("IsisInterfaceImpl::processIsisMessage...!!!"); this.channel = channel; if (isisMessage.sourceMac().equals(interfaceMacAddress)) { log.debug("Received our own message {}...!!!", isisMessage.isisPduType()); return; } if (isisMessage.isisPduType() == IsisPduType.P2PHELLOPDU && networkType.equals(IsisNetworkType.BROADCAST)) { return; } else if ((isisMessage.isisPduType() == IsisPduType.L1HELLOPDU || isisMessage.isisPduType() == IsisPduType.L2HELLOPDU) && networkType.equals(IsisNetworkType.P2P)) { return; } if (this.isisLsdb == null) { this.isisLsdb = isisLsdb; } switch (isisMessage.isisPduType()) { case L1HELLOPDU: case L2HELLOPDU: processL1L2HelloPduMessage(isisMessage, channel); break; case P2PHELLOPDU: processP2pHelloPduMessage(isisMessage, channel); break; case L1LSPDU: case L2LSPDU: processLsPduMessage(isisMessage, channel); break; case L1CSNP: case L2CSNP: processCsnPduMessage(isisMessage, channel); break; case L1PSNP: case L2PSNP: processPsnPduMessage(isisMessage, channel); break; default: log.debug("Unknown packet to process...!!!"); break; } }
DefaultIsisInterface implements IsisInterface { public void processIsisMessage(IsisMessage isisMessage, IsisLsdb isisLsdb, Channel channel) { log.debug("IsisInterfaceImpl::processIsisMessage...!!!"); this.channel = channel; if (isisMessage.sourceMac().equals(interfaceMacAddress)) { log.debug("Received our own message {}...!!!", isisMessage.isisPduType()); return; } if (isisMessage.isisPduType() == IsisPduType.P2PHELLOPDU && networkType.equals(IsisNetworkType.BROADCAST)) { return; } else if ((isisMessage.isisPduType() == IsisPduType.L1HELLOPDU || isisMessage.isisPduType() == IsisPduType.L2HELLOPDU) && networkType.equals(IsisNetworkType.P2P)) { return; } if (this.isisLsdb == null) { this.isisLsdb = isisLsdb; } switch (isisMessage.isisPduType()) { case L1HELLOPDU: case L2HELLOPDU: processL1L2HelloPduMessage(isisMessage, channel); break; case P2PHELLOPDU: processP2pHelloPduMessage(isisMessage, channel); break; case L1LSPDU: case L2LSPDU: processLsPduMessage(isisMessage, channel); break; case L1CSNP: case L2CSNP: processCsnPduMessage(isisMessage, channel); break; case L1PSNP: case L2PSNP: processPsnPduMessage(isisMessage, channel); break; default: log.debug("Unknown packet to process...!!!"); break; } } }
DefaultIsisInterface implements IsisInterface { public void processIsisMessage(IsisMessage isisMessage, IsisLsdb isisLsdb, Channel channel) { log.debug("IsisInterfaceImpl::processIsisMessage...!!!"); this.channel = channel; if (isisMessage.sourceMac().equals(interfaceMacAddress)) { log.debug("Received our own message {}...!!!", isisMessage.isisPduType()); return; } if (isisMessage.isisPduType() == IsisPduType.P2PHELLOPDU && networkType.equals(IsisNetworkType.BROADCAST)) { return; } else if ((isisMessage.isisPduType() == IsisPduType.L1HELLOPDU || isisMessage.isisPduType() == IsisPduType.L2HELLOPDU) && networkType.equals(IsisNetworkType.P2P)) { return; } if (this.isisLsdb == null) { this.isisLsdb = isisLsdb; } switch (isisMessage.isisPduType()) { case L1HELLOPDU: case L2HELLOPDU: processL1L2HelloPduMessage(isisMessage, channel); break; case P2PHELLOPDU: processP2pHelloPduMessage(isisMessage, channel); break; case L1LSPDU: case L2LSPDU: processLsPduMessage(isisMessage, channel); break; case L1CSNP: case L2CSNP: processCsnPduMessage(isisMessage, channel); break; case L1PSNP: case L2PSNP: processPsnPduMessage(isisMessage, channel); break; default: log.debug("Unknown packet to process...!!!"); break; } }  }
DefaultIsisInterface implements IsisInterface { public void processIsisMessage(IsisMessage isisMessage, IsisLsdb isisLsdb, Channel channel) { log.debug("IsisInterfaceImpl::processIsisMessage...!!!"); this.channel = channel; if (isisMessage.sourceMac().equals(interfaceMacAddress)) { log.debug("Received our own message {}...!!!", isisMessage.isisPduType()); return; } if (isisMessage.isisPduType() == IsisPduType.P2PHELLOPDU && networkType.equals(IsisNetworkType.BROADCAST)) { return; } else if ((isisMessage.isisPduType() == IsisPduType.L1HELLOPDU || isisMessage.isisPduType() == IsisPduType.L2HELLOPDU) && networkType.equals(IsisNetworkType.P2P)) { return; } if (this.isisLsdb == null) { this.isisLsdb = isisLsdb; } switch (isisMessage.isisPduType()) { case L1HELLOPDU: case L2HELLOPDU: processL1L2HelloPduMessage(isisMessage, channel); break; case P2PHELLOPDU: processP2pHelloPduMessage(isisMessage, channel); break; case L1LSPDU: case L2LSPDU: processLsPduMessage(isisMessage, channel); break; case L1CSNP: case L2CSNP: processCsnPduMessage(isisMessage, channel); break; case L1PSNP: case L2PSNP: processPsnPduMessage(isisMessage, channel); break; default: log.debug("Unknown packet to process...!!!"); break; } }  IsisLsdb isisLsdb(); void setAllConfiguredInterfaceIps(List<Ip4Address> allConfiguredInterfaces); void removeNeighbor(IsisNeighbor isisNeighbor); void removeNeighbors(); IsisNeighbor lookup(MacAddress isisNeighborMac); Set<MacAddress> neighbors(); Channel channel(); int interfaceIndex(); void setInterfaceIndex(int interfaceIndex); Ip4Address interfaceIpAddress(); void setInterfaceIpAddress(Ip4Address interfaceIpAddress); byte[] networkMask(); void setNetworkMask(byte[] networkMask); MacAddress getInterfaceMacAddress(); void setInterfaceMacAddress(MacAddress interfaceMacAddress); String intermediateSystemName(); void setIntermediateSystemName(String intermediateSystemName); String systemId(); void setSystemId(String systemId); String l1LanId(); void setL1LanId(String l1LanId); String l2LanId(); void setL2LanId(String l2LanId); int getIdLength(); void setIdLength(int idLength); int getMaxAreaAddresses(); void setMaxAreaAddresses(int maxAreaAddresses); int reservedPacketCircuitType(); void setReservedPacketCircuitType(int reservedPacketCircuitType); IsisNetworkType networkType(); void setNetworkType(IsisNetworkType networkType); String areaAddress(); void setAreaAddress(String areaAddress); int getAreaLength(); void setAreaLength(int areaLength); int holdingTime(); void setHoldingTime(int holdingTime); int priority(); void setPriority(int priority); int helloInterval(); void setHelloInterval(int helloInterval); IsisInterfaceState interfaceState(); void setInterfaceState(IsisInterfaceState interfaceState); String circuitId(); void setCircuitId(String circuitId); void processIsisMessage(IsisMessage isisMessage, IsisLsdb isisLsdb, Channel channel); boolean validateHelloMessage(HelloPdu helloPdu); void processL1L2HelloPduMessage(IsisMessage isisMessage, Channel channel); void processP2pHelloPduMessage(IsisMessage isisMessage, Channel channel); void processLsPduMessage(IsisMessage isisMessage, Channel channel); void processPsnPduMessage(IsisMessage isisMessage, Channel channel); void processCsnPduMessage(IsisMessage isisMessage, Channel channel); String lspKeyP2P(String systemId); void startHelloSender(Channel channel); void stopHelloSender(); }
DefaultIsisInterface implements IsisInterface { public void processIsisMessage(IsisMessage isisMessage, IsisLsdb isisLsdb, Channel channel) { log.debug("IsisInterfaceImpl::processIsisMessage...!!!"); this.channel = channel; if (isisMessage.sourceMac().equals(interfaceMacAddress)) { log.debug("Received our own message {}...!!!", isisMessage.isisPduType()); return; } if (isisMessage.isisPduType() == IsisPduType.P2PHELLOPDU && networkType.equals(IsisNetworkType.BROADCAST)) { return; } else if ((isisMessage.isisPduType() == IsisPduType.L1HELLOPDU || isisMessage.isisPduType() == IsisPduType.L2HELLOPDU) && networkType.equals(IsisNetworkType.P2P)) { return; } if (this.isisLsdb == null) { this.isisLsdb = isisLsdb; } switch (isisMessage.isisPduType()) { case L1HELLOPDU: case L2HELLOPDU: processL1L2HelloPduMessage(isisMessage, channel); break; case P2PHELLOPDU: processP2pHelloPduMessage(isisMessage, channel); break; case L1LSPDU: case L2LSPDU: processLsPduMessage(isisMessage, channel); break; case L1CSNP: case L2CSNP: processCsnPduMessage(isisMessage, channel); break; case L1PSNP: case L2PSNP: processPsnPduMessage(isisMessage, channel); break; default: log.debug("Unknown packet to process...!!!"); break; } }  IsisLsdb isisLsdb(); void setAllConfiguredInterfaceIps(List<Ip4Address> allConfiguredInterfaces); void removeNeighbor(IsisNeighbor isisNeighbor); void removeNeighbors(); IsisNeighbor lookup(MacAddress isisNeighborMac); Set<MacAddress> neighbors(); Channel channel(); int interfaceIndex(); void setInterfaceIndex(int interfaceIndex); Ip4Address interfaceIpAddress(); void setInterfaceIpAddress(Ip4Address interfaceIpAddress); byte[] networkMask(); void setNetworkMask(byte[] networkMask); MacAddress getInterfaceMacAddress(); void setInterfaceMacAddress(MacAddress interfaceMacAddress); String intermediateSystemName(); void setIntermediateSystemName(String intermediateSystemName); String systemId(); void setSystemId(String systemId); String l1LanId(); void setL1LanId(String l1LanId); String l2LanId(); void setL2LanId(String l2LanId); int getIdLength(); void setIdLength(int idLength); int getMaxAreaAddresses(); void setMaxAreaAddresses(int maxAreaAddresses); int reservedPacketCircuitType(); void setReservedPacketCircuitType(int reservedPacketCircuitType); IsisNetworkType networkType(); void setNetworkType(IsisNetworkType networkType); String areaAddress(); void setAreaAddress(String areaAddress); int getAreaLength(); void setAreaLength(int areaLength); int holdingTime(); void setHoldingTime(int holdingTime); int priority(); void setPriority(int priority); int helloInterval(); void setHelloInterval(int helloInterval); IsisInterfaceState interfaceState(); void setInterfaceState(IsisInterfaceState interfaceState); String circuitId(); void setCircuitId(String circuitId); void processIsisMessage(IsisMessage isisMessage, IsisLsdb isisLsdb, Channel channel); boolean validateHelloMessage(HelloPdu helloPdu); void processL1L2HelloPduMessage(IsisMessage isisMessage, Channel channel); void processP2pHelloPduMessage(IsisMessage isisMessage, Channel channel); void processLsPduMessage(IsisMessage isisMessage, Channel channel); void processPsnPduMessage(IsisMessage isisMessage, Channel channel); void processCsnPduMessage(IsisMessage isisMessage, Channel channel); String lspKeyP2P(String systemId); void startHelloSender(Channel channel); void stopHelloSender();  }