blob: 21ee3d3f024d7665dafc8c5e700ca02581b266fd [file] [log] [blame]
Jonathan Hart8f6dc092014-04-18 15:56:43 -07001package net.onrc.onos.apps.sdnip;
pingping-lina2cbfad2013-03-07 08:39:21 +08002
3import net.floodlightcontroller.core.module.IFloodlightService;
4
Jonathan Hart31e15f12014-04-10 10:33:00 -07005/**
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 Hart8f6dc092014-04-18 15:56:43 -07009public interface ISdnIpService extends IFloodlightService {
pingping-lina2cbfad2013-03-07 08:39:21 +080010
Jonathan Hart31e15f12014-04-10 10:33:00 -070011 /**
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 Hart5e54f2e2014-04-17 13:43:40 -070018 public IPatriciaTree<RibEntry> getPtree();
Jonathan Hart61ba9372013-05-19 20:10:29 -070019
Jonathan Hart31e15f12014-04-10 10:33:00 -070020 /**
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 Hart61ba9372013-05-19 20:10:29 -070027
Jonathan Hart31e15f12014-04-10 10:33:00 -070028 /**
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 Milkey269ffb92014-04-03 14:43:30 -070034 public String getRouterId();
Jonathan Hart61ba9372013-05-19 20:10:29 -070035
Jonathan Hart31e15f12014-04-10 10:33:00 -070036 /**
37 * Clears SDN-IP's route table.
38 */
Ray Milkey269ffb92014-04-03 14:43:30 -070039 public void clearPtree();
40
41 /**
Jonathan Hart8f6dc092014-04-18 15:56:43 -070042 * Pass a RIB update to the {@link ISdnIpService}.
Ray Milkey269ffb92014-04-03 14:43:30 -070043 *
Jonathan Hart31e15f12014-04-10 10:33:00 -070044 * @param update a {@link RibUpdate} object containing details of the
45 * update
Ray Milkey269ffb92014-04-03 14:43:30 -070046 */
47 public void newRibUpdate(RibUpdate update);
Komal Shah399a2922014-05-28 01:57:40 -070048
49 /**
50 * Start SDN-IP Routing.
51 */
52 public void beginRoutingNew();
pingping-lina2cbfad2013-03-07 08:39:21 +080053}