@Test public void testDhcp() { IOFMessageListener listener = getVirtualNetworkListener(); Ethernet dhcpPacket = PacketFactory.DhcpDiscoveryRequestEthernet(mac1); OFPacketIn dhcpPacketOf = PacketFactory.DhcpDiscoveryRequestOFPacketIn(sw1, mac1); cntx = new FloodlightContext(); IFloodlightProviderService.bcStore.put(cntx, IFloodlightProviderService.CONTEXT_PI_PAYLOAD, dhcpPacket); Command ret = listener.receive(sw1, dhcpPacketOf, cntx); assertTrue(ret == Command.CONTINUE); }
@Test public void testDhcp() { IOFMessageListener listener = getVirtualNetworkListener(); Ethernet dhcpPacket = PacketFactory.DhcpDiscoveryRequestEthernet(mac1); OFPacketIn dhcpPacketOf = PacketFactory.DhcpDiscoveryRequestOFPacketIn(mac1); cntx = new FloodlightContext(); IFloodlightProviderService.bcStore.put(cntx, IFloodlightProviderService.CONTEXT_PI_PAYLOAD, dhcpPacket); Command ret = listener.receive(sw1, dhcpPacketOf, cntx); assertTrue(ret == Command.CONTINUE); }