@Test public void testReplyToRequestForUsIpv6() { Ip6Address theirIp = Ip6Address.valueOf("1000::ffff"); Ip6Address ourFirstIp = Ip6Address.valueOf("1000::1"); Ip6Address ourSecondIp = Ip6Address.valueOf("2000::2"); MacAddress firstMac = MacAddress.valueOf(1L); MacAddress secondMac = MacAddress.valueOf(2L); Host requestor = new DefaultHost(PID, HID2, MAC2, VLAN1, LOC1, Collections.singleton(theirIp)); expect(hostService.getHost(HID2)).andReturn(requestor); expect(hostService.getHostsByIp(ourFirstIp)) .andReturn(Collections.singleton(requestor)); replay(hostService); replay(interfaceService); Ethernet ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION, MAC2, MacAddress.valueOf("33:33:ff:00:00:01"), theirIp, ourFirstIp); proxyArp.reply(ndpRequest, LOC1); assertEquals(1, packetService.packets.size()); Ethernet ndpReply = buildNdp(ICMP6.NEIGHBOR_ADVERTISEMENT, firstMac, MAC2, ourFirstIp, theirIp); verifyPacketOut(ndpReply, LOC1, packetService.packets.get(0)); packetService.packets.clear(); ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION, MAC2, MacAddress.valueOf("33:33:ff:00:00:01"), theirIp, ourSecondIp); proxyArp.reply(ndpRequest, LOC1); assertEquals(1, packetService.packets.size()); ndpReply = buildNdp(ICMP6.NEIGHBOR_ADVERTISEMENT, secondMac, MAC2, ourSecondIp, theirIp); verifyPacketOut(ndpReply, LOC1, packetService.packets.get(0)); }
@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);  }