Route CLI improvements and bug fixes
Change-Id: I4b4547f578cc053dc150066dadb68b6b2cbb82ee
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteStore.java b/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteStore.java
index 132afd4..9b75099 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteStore.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteStore.java
@@ -21,6 +21,7 @@
import org.onosproject.store.Store;
import java.util.Collection;
+import java.util.Map;
import java.util.Set;
/**
@@ -66,6 +67,14 @@
Route longestPrefixMatch(IpAddress ip);
/**
+ * Returns the routes that point to the given next hop IP address.
+ *
+ * @param ip IP address of the next hop
+ * @return routes for the given next hop
+ */
+ Collection<Route> getRoutesForNextHop(IpAddress ip);
+
+ /**
* Updates a next hop IP and MAC in the store.
*
* @param ip IP address
@@ -88,4 +97,11 @@
* @return MAC address
*/
MacAddress getNextHop(IpAddress ip);
+
+ /**
+ * Returns all next hops in the route store.
+ *
+ * @return next hops
+ */
+ Map<IpAddress, MacAddress> getNextHops();
}