@Test public void testReplyToRequestFromUsIpv6() { Ip6Address ourIp = Ip6Address.valueOf("1000::1"); MacAddress ourMac = MacAddress.valueOf(1L); Ip6Address theirIp = Ip6Address.valueOf("1000::100"); expect(hostService.getHostsByIp(theirIp)).andReturn(Collections.emptySet()); expect(interfaceService.getInterfacesByIp(ourIp)) .andReturn(Collections.singleton(new Interface(getLocation(1), Collections.singletonList(new InterfaceIpAddress( ourIp, IpPrefix.valueOf("1000::1/64"))), ourMac, VLAN1))); expect(hostService.getHost(HostId.hostId(ourMac, VLAN1))).andReturn(null); replay(hostService); replay(interfaceService); Ethernet ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION, ourMac, MacAddress.valueOf("33:33:ff:00:00:01"), ourIp, theirIp); proxyArp.reply(ndpRequest, getLocation(5)); assertEquals(1, packetService.packets.size()); verifyPacketOut(ndpRequest, getLocation(1), packetService.packets.get(0)); packetService.packets.clear(); proxyArp.reply(ndpRequest, getLocation(2)); assertEquals(0, packetService.packets.size()); }
@Override public void reply(Ethernet eth, ConnectPoint inPort) { checkPermission(PACKET_WRITE); checkNotNull(eth, REQUEST_NULL); MessageContext context = createContext(eth, inPort); if (context != null) { replyInternal(context); } }
ProxyArpManager implements ProxyArpService { @Override public void reply(Ethernet eth, ConnectPoint inPort) { checkPermission(PACKET_WRITE); checkNotNull(eth, REQUEST_NULL); MessageContext context = createContext(eth, inPort); if (context != null) { replyInternal(context); } } }
ProxyArpManager implements ProxyArpService { @Override public void reply(Ethernet eth, ConnectPoint inPort) { checkPermission(PACKET_WRITE); checkNotNull(eth, REQUEST_NULL); MessageContext context = createContext(eth, inPort); if (context != null) { replyInternal(context); } }  }
ProxyArpManager implements ProxyArpService { @Override public void reply(Ethernet eth, ConnectPoint inPort) { checkPermission(PACKET_WRITE); checkNotNull(eth, REQUEST_NULL); MessageContext context = createContext(eth, inPort); if (context != null) { replyInternal(context); } }  @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 reply(Ethernet eth, ConnectPoint inPort) { checkPermission(PACKET_WRITE); checkNotNull(eth, REQUEST_NULL); MessageContext context = createContext(eth, inPort); if (context != null) { replyInternal(context); } }  @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);  }