blob: effc81be3d76d6cd21d0518b2ea4833f3bc2ddf8 [file] [log] [blame]
Jonathan Hart382623d2014-04-03 09:48:11 -07001package net.onrc.onos.apps.bgproute;
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 */
pingping-lina2cbfad2013-03-07 08:39:21 +08009public interface IBgpRouteService extends IFloodlightService {
10
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 /**
Ray Milkeyb41100a2014-04-10 10:42:15 -070042 * Pass a RIB update to the {@link IBgpRouteService}.
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);
pingping-lina2cbfad2013-03-07 08:39:21 +080048}