blob: 1908050a0336c4297eb0958a2711a1affde684a0 [file] [log] [blame]
Jonathan Hart382623d2014-04-03 09:48:11 -07001package net.onrc.onos.apps.bgproute;
Jonathan Hart309889c2013-08-13 23:26:24 +12002
3import org.openflow.protocol.OFFlowMod;
4
Jonathan Hart08ee8522013-09-22 17:34:43 +12005/**
6 * Wraps up a DPID and a OFFlowMod so we know how to delete
7 * the flow if we have to.
8 *
9 * TODO This functionality should be handled by ONOS's flow layer in future.
10 *
11 */
Jonathan Hart309889c2013-08-13 23:26:24 +120012public class PushedFlowMod {
13 private long dpid;
14 private OFFlowMod flowMod;
15
16 public PushedFlowMod(long dpid, OFFlowMod flowMod) {
17 this.dpid = dpid;
18 try {
19 this.flowMod = flowMod.clone();
20 } catch (CloneNotSupportedException e) {
21 this.flowMod = flowMod;
22 }
23 }
24
25 public long getDpid() {
26 return dpid;
27 }
28
29 public OFFlowMod getFlowMod() {
30 return flowMod;
31 }
32}