functional version
Change-Id: Ic089d1fc7a2c6bc51e00371c993a6fc6aaa17863
diff --git a/openflow/utils.go b/openflow/utils.go
index aba7400..7994fd2 100644
--- a/openflow/utils.go
+++ b/openflow/utils.go
@@ -24,7 +24,7 @@
"sync"
ofp "github.com/donNewtonAlpha/goloxi/of13"
- "github.com/opencord/voltha-protos/go/openflow_13"
+ "github.com/opencord/voltha-protos/v2/go/openflow_13"
)
var mu sync.Mutex
@@ -51,11 +51,19 @@
var outputAction openflow_13.OfpAction_Output
loxiOutputAction := action.(*ofp.ActionOutput)
var output openflow_13.OfpActionOutput
- output.Port = uint32(loxiOutputAction.Port)
- output.MaxLen = uint32(loxiOutputAction.MaxLen)
+ output.Port = uint32(loxiOutputAction.GetPort())
+ /*
+ var maxLen uint16
+ maxLen = loxiOutputAction.GetMaxLen()
+ output.MaxLen = uint32(maxLen)
+
+ */
+ output.MaxLen = 0
outputAction.Output = &output
ofpAction.Action = &outputAction
ofpAction.Type = openflow_13.OfpActionType_OFPAT_OUTPUT
+ js, _ := json.Marshal(outputAction)
+ log.Printf("EXTRACT ACTION %s", js)
case ofp.OFPATCopyTtlOut: //CopyTtltOut
case ofp.OFPATCopyTtlIn: //CopyTtlIn
case ofp.OFPATSetMplsTtl: //SetMplsTtl
@@ -105,6 +113,7 @@
ofpActionSetField.Field = &ofpOxmField
ofpAction_SetField.SetField = &ofpActionSetField
ofpAction.Action = &ofpAction_SetField
+
case ofp.OFPATPushPbb: //PushPbb
case ofp.OFPATPopPbb: //PopPbb
case ofp.OFPATExperimenter: //Experimenter