Implemented support for routes where the next hop is not a BGP peer
diff --git a/src/main/java/net/onrc/onos/ofcontroller/bgproute/PathUpdate.java b/src/main/java/net/onrc/onos/ofcontroller/bgproute/PathUpdate.java
index 1d2a47b..c39b51d 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/bgproute/PathUpdate.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/bgproute/PathUpdate.java
@@ -1,6 +1,8 @@
package net.onrc.onos.ofcontroller.bgproute;
import java.net.InetAddress;
+import java.util.Collections;
+import java.util.List;
/*
* A path is always assumed to be from all other interfaces (external-facing
@@ -11,6 +13,10 @@
private Interface dstInterface;
private InetAddress dstIpAddress;
+ private int numUsers = 0;
+
+ private List<PushedFlowMod> flowMods = null;
+ private boolean permanent = false;
public PathUpdate(Interface dstInterface, InetAddress dstIpAddress) {
this.dstInterface = dstInterface;
@@ -24,4 +30,32 @@
public InetAddress getDstIpAddress() {
return dstIpAddress;
}
+
+ public void incrementUsers() {
+ numUsers++;
+ }
+
+ public void decrementUsers() {
+ numUsers--;
+ }
+
+ public int getUsers() {
+ return numUsers;
+ }
+
+ public List<PushedFlowMod> getFlowMods() {
+ return Collections.unmodifiableList(flowMods);
+ }
+
+ public void setFlowMods(List<PushedFlowMod> flowMods) {
+ this.flowMods = flowMods;
+ }
+
+ public boolean isPermanent() {
+ return permanent;
+ }
+
+ public void setPermanent() {
+ permanent = true;
+ }
}