blob: 242543cc65735e7a2eb3f1bef1ea614de1442f54 [file] [log] [blame]
package net.onrc.onos.ofcontroller.proxyarp;
import java.util.List;
import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;
/**
* REST resource to view the IP to MAC mappings in the ARP cache.
*
*/
public class ArpCacheResource extends ServerResource {
/**
* Handler for a REST call to retrieve the ARP cache.
* @return list of mappings formatted as a human-readable string.
*/
@Get("json")
public List<String> getArpCache() {
IProxyArpService arp = (IProxyArpService) getContext().getAttributes()
.get(IProxyArpService.class.getCanonicalName());
return arp.getMappings();
}
}