3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.forwarding.staticrouting;
12 import java.net.InetAddress;
13 import java.util.concurrent.ConcurrentMap;
16 * This interface provides APIs to configure and manage static routes.
19 import org.opendaylight.controller.sal.utils.Status;
23 * This Interface provides APIs to manage and query the static routes
26 public interface IForwardingStaticRouting {
29 * Retrieves the StaticRoute that has the longest prefix matching the ipAddress.
30 * @param ipAddress (InetAddress) the IP address
33 StaticRoute getBestMatchStaticRoute(InetAddress ipAddress);
36 * Returns all the StaticRouteConfig
37 * @return all the StaticRouteConfig
39 ConcurrentMap<String, StaticRouteConfig> getStaticRouteConfigs();
42 * Adds a StaticRouteConfig
43 * @param config: the StaticRouteConfig to be added
44 * @return a text string indicating the result of the operation..
45 * If the operation is successful, the return string will be "SUCCESS"
47 Status addStaticRoute(StaticRouteConfig config);
50 * Removes the named StaticRouteConfig
51 * @param name: the name of the StaticRouteConfig to be removed
52 * @return a text string indicating the result of the operation.
53 * If the operation is successful, the return string will be "SUCCESS"
55 Status removeStaticRoute(String name);