Jonathan Hart | 8f6dc09 | 2014-04-18 15:56:43 -0700 | [diff] [blame] | 1 | package net.onrc.onos.apps.sdnip; |
pingping-lin | a2cbfad | 2013-03-07 08:39:21 +0800 | [diff] [blame] | 2 | |
| 3 | import net.floodlightcontroller.core.module.IFloodlightService; |
| 4 | |
Jonathan Hart | 31e15f1 | 2014-04-10 10:33:00 -0700 | [diff] [blame] | 5 | /** |
| 6 | * The API exported by the main SDN-IP class. This is the interface between the |
| 7 | * REST handlers and the SDN-IP module. |
| 8 | */ |
Jonathan Hart | 8f6dc09 | 2014-04-18 15:56:43 -0700 | [diff] [blame] | 9 | public interface ISdnIpService extends IFloodlightService { |
pingping-lin | a2cbfad | 2013-03-07 08:39:21 +0800 | [diff] [blame] | 10 | |
Jonathan Hart | 31e15f1 | 2014-04-10 10:33:00 -0700 | [diff] [blame] | 11 | /** |
| 12 | * Gets a reference to SDN-IP's PATRICIA tree which stores the route table. |
| 13 | * |
| 14 | * XXX This is a poor API because it exposes internal state of SDN-IP. |
| 15 | * |
| 16 | * @return the PATRICIA tree. |
| 17 | */ |
Jonathan Hart | 5e54f2e | 2014-04-17 13:43:40 -0700 | [diff] [blame] | 18 | public IPatriciaTree<RibEntry> getPtree(); |
Jonathan Hart | 61ba937 | 2013-05-19 20:10:29 -0700 | [diff] [blame] | 19 | |
Jonathan Hart | 31e15f1 | 2014-04-10 10:33:00 -0700 | [diff] [blame] | 20 | /** |
| 21 | * Gets the IP address of REST server on the BGPd side. This is used to |
| 22 | * communicate with BGPd. |
| 23 | * |
| 24 | * @return the IP address as a String |
| 25 | */ |
| 26 | public String getBgpdRestIp(); |
Jonathan Hart | 61ba937 | 2013-05-19 20:10:29 -0700 | [diff] [blame] | 27 | |
Jonathan Hart | 31e15f1 | 2014-04-10 10:33:00 -0700 | [diff] [blame] | 28 | /** |
| 29 | * Gets the router ID, which is sent to BGPd to identify the route table |
| 30 | * we're interested in. |
| 31 | * |
| 32 | * @return the router ID as a String |
| 33 | */ |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 34 | public String getRouterId(); |
Jonathan Hart | 61ba937 | 2013-05-19 20:10:29 -0700 | [diff] [blame] | 35 | |
Jonathan Hart | 31e15f1 | 2014-04-10 10:33:00 -0700 | [diff] [blame] | 36 | /** |
| 37 | * Clears SDN-IP's route table. |
| 38 | */ |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 39 | public void clearPtree(); |
| 40 | |
| 41 | /** |
Jonathan Hart | 8f6dc09 | 2014-04-18 15:56:43 -0700 | [diff] [blame] | 42 | * Pass a RIB update to the {@link ISdnIpService}. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 43 | * |
Jonathan Hart | 31e15f1 | 2014-04-10 10:33:00 -0700 | [diff] [blame] | 44 | * @param update a {@link RibUpdate} object containing details of the |
| 45 | * update |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 46 | */ |
| 47 | public void newRibUpdate(RibUpdate update); |
Komal Shah | 399a292 | 2014-05-28 01:57:40 -0700 | [diff] [blame] | 48 | |
| 49 | /** |
| 50 | * Start SDN-IP Routing. |
| 51 | */ |
| 52 | public void beginRoutingNew(); |
pingping-lin | a2cbfad | 2013-03-07 08:39:21 +0800 | [diff] [blame] | 53 | } |