@Service public class Router extends Object implements RoutingService
| Modifier and Type | Field and Description |
|---|---|
protected RouteService |
routeService |
CONFIG_CLASS, ROUTER_APP_ID, ROUTER_CONFIG_CLASS| Constructor and Description |
|---|
Router() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFibListener(FibListener fibListener)
Adds FIB listener.
|
RouteEntry |
getLongestMatchableRouteEntry(org.onlab.packet.IpAddress ipAddress)
Finds out the route entry which has the longest matchable IP prefix.
|
Collection<RouteEntry> |
getRoutes4()
Gets all IPv4 routes from the RIB.
|
Collection<RouteEntry> |
getRoutes6()
Gets all IPv6 routes from the RIB.
|
void |
start()
Starts the routing service.
|
void |
stop()
Stops the routing service.
|
@Reference(cardinality=MANDATORY_UNARY) protected RouteService routeService
public void start()
RoutingServicestart in interface RoutingServicepublic void addFibListener(FibListener fibListener)
RoutingServiceaddFibListener in interface RoutingServicefibListener - listener to send FIB updates topublic void stop()
RoutingServicestop in interface RoutingServicepublic Collection<RouteEntry> getRoutes4()
RoutingServicegetRoutes4 in interface RoutingServicepublic Collection<RouteEntry> getRoutes6()
RoutingServicegetRoutes6 in interface RoutingServicepublic RouteEntry getLongestMatchableRouteEntry(org.onlab.packet.IpAddress ipAddress)
RoutingServicegetLongestMatchableRouteEntry in interface RoutingServiceipAddress - IP address used to find out longest matchable IP prefix