@Test public void testForwardToHostIpv6() { Host host1 = new DefaultHost(PID, HID3, MAC3, VLAN1, LOC1, Collections.singleton(IP3)); Host host2 = new DefaultHost(PID, HID4, MAC4, VLAN1, LOC2, Collections.singleton(IP4)); expect(hostService.getHost(SOLICITED_HID3)).andReturn(host1); expect(hostService.getHost(HID4)).andReturn(host2); replay(hostService); replay(interfaceService); Ethernet ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION, MAC4, SOLICITED_MAC3, IP4, IP3); proxyArp.forward(ndpRequest, LOC2); assertEquals(1, packetService.packets.size()); OutboundPacket packet = packetService.packets.get(0); verifyPacketOut(ndpRequest, LOC1, packet); }
@Override public void forward(Ethernet eth, ConnectPoint inPort) { checkPermission(PACKET_WRITE); checkNotNull(eth, REQUEST_NULL); Host h = hostService.getHost(hostId(eth.getDestinationMAC(), vlanId(eth.getVlanID()))); if (h == null) { flood(eth, inPort); } else { Host subject = hostService.getHost(hostId(eth.getSourceMAC(), vlanId(eth.getVlanID()))); store.forward(h.location(), subject, ByteBuffer.wrap(eth.serialize())); } }
ProxyArpManager implements ProxyArpService { @Override public void forward(Ethernet eth, ConnectPoint inPort) { checkPermission(PACKET_WRITE); checkNotNull(eth, REQUEST_NULL); Host h = hostService.getHost(hostId(eth.getDestinationMAC(), vlanId(eth.getVlanID()))); if (h == null) { flood(eth, inPort); } else { Host subject = hostService.getHost(hostId(eth.getSourceMAC(), vlanId(eth.getVlanID()))); store.forward(h.location(), subject, ByteBuffer.wrap(eth.serialize())); } } }
ProxyArpManager implements ProxyArpService { @Override public void forward(Ethernet eth, ConnectPoint inPort) { checkPermission(PACKET_WRITE); checkNotNull(eth, REQUEST_NULL); Host h = hostService.getHost(hostId(eth.getDestinationMAC(), vlanId(eth.getVlanID()))); if (h == null) { flood(eth, inPort); } else { Host subject = hostService.getHost(hostId(eth.getSourceMAC(), vlanId(eth.getVlanID()))); store.forward(h.location(), subject, ByteBuffer.wrap(eth.serialize())); } }  }
ProxyArpManager implements ProxyArpService { @Override public void forward(Ethernet eth, ConnectPoint inPort) { checkPermission(PACKET_WRITE); checkNotNull(eth, REQUEST_NULL); Host h = hostService.getHost(hostId(eth.getDestinationMAC(), vlanId(eth.getVlanID()))); if (h == null) { flood(eth, inPort); } else { Host subject = hostService.getHost(hostId(eth.getSourceMAC(), vlanId(eth.getVlanID()))); store.forward(h.location(), subject, ByteBuffer.wrap(eth.serialize())); } }  @Activate void activate(); @Deactivate void deactivate(); @Override boolean isKnown(IpAddress addr); @Override void reply(Ethernet eth, ConnectPoint inPort); @Override void forward(Ethernet eth, ConnectPoint inPort); @Override boolean handlePacket(PacketContext context); }
ProxyArpManager implements ProxyArpService { @Override public void forward(Ethernet eth, ConnectPoint inPort) { checkPermission(PACKET_WRITE); checkNotNull(eth, REQUEST_NULL); Host h = hostService.getHost(hostId(eth.getDestinationMAC(), vlanId(eth.getVlanID()))); if (h == null) { flood(eth, inPort); } else { Host subject = hostService.getHost(hostId(eth.getSourceMAC(), vlanId(eth.getVlanID()))); store.forward(h.location(), subject, ByteBuffer.wrap(eth.serialize())); } }  @Activate void activate(); @Deactivate void deactivate(); @Override boolean isKnown(IpAddress addr); @Override void reply(Ethernet eth, ConnectPoint inPort); @Override void forward(Ethernet eth, ConnectPoint inPort); @Override boolean handlePacket(PacketContext context);  }