Added javadoc for all the helper classes in SDN-IP.
Also changed a couple of names to better reflect the usage or comply with
naming standards:
in IBgpRouteService.java: getBGPdRestIp -> getBgpdRestIp
in Prefix.java: MAX_BYTES -> ADDRESS_LENGTH
Change-Id: Id23b6bb077d79d671d21e2490ab410f322d7c166
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/IBgpRouteService.java b/src/main/java/net/onrc/onos/apps/bgproute/IBgpRouteService.java
index 04223eb..fa2d3fc 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/IBgpRouteService.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/IBgpRouteService.java
@@ -2,27 +2,47 @@
import net.floodlightcontroller.core.module.IFloodlightService;
+/**
+ * The API exported by the main SDN-IP class. This is the interface between the
+ * REST handlers and the SDN-IP module.
+ */
public interface IBgpRouteService extends IFloodlightService {
- //public RibEntry lookupRib(byte[] dest);
-
- //public Ptree getPtree();
+ /**
+ * Gets a reference to SDN-IP's PATRICIA tree which stores the route table.
+ *
+ * XXX This is a poor API because it exposes internal state of SDN-IP.
+ *
+ * @return the PATRICIA tree.
+ */
public IPatriciaTrie<RibEntry> getPtree();
- public String getBGPdRestIp();
+ /**
+ * Gets the IP address of REST server on the BGPd side. This is used to
+ * communicate with BGPd.
+ *
+ * @return the IP address as a String
+ */
+ public String getBgpdRestIp();
+ /**
+ * Gets the router ID, which is sent to BGPd to identify the route table
+ * we're interested in.
+ *
+ * @return the router ID as a String
+ */
public String getRouterId();
+ /**
+ * Clears SDN-IP's route table.
+ */
public void clearPtree();
/**
* Pass a RIB update to the {@link IBgpRouteService}.
*
- * @param update
+ * @param update a {@link RibUpdate} object containing details of the
+ * update
*/
public void newRibUpdate(RibUpdate update);
-
- //TODO This functionality should be provided by some sort of Ptree listener framework
- //public void prefixAdded(PtreeNode node);
- //public void prefixDeleted(PtreeNode node);
}