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