diff --git a/VERSION b/VERSION index 60f63432..14909610 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.6.0 +v0.6.1 diff --git a/ofctrl/ofAction.go b/ofctrl/ofAction.go index 1345a89f..e35e142d 100644 --- a/ofctrl/ofAction.go +++ b/ofctrl/ofAction.go @@ -57,6 +57,8 @@ const ( ActTypeSetField = "setField" ActTypeCopyField = "copyField" ActTypeMeter = "meter" + ActTypeEncapsulate = "encap" + ActTypeDecapsulate = "decap" ) type OFAction interface { @@ -878,3 +880,29 @@ func NewMeterAction(meterId uint32) *MeterAction { MeterId: meterId, } } + +type NXEncapsulate struct { + HeaderSize uint16 + HeaderType uint32 + Properties []openflow15.PropTLV +} + +func (a *NXEncapsulate) GetActionMessage() openflow15.Action { + return openflow15.NewNXActionEncapsulate(a.HeaderSize, a.HeaderType, a.Property) +} + +func (a *NXEncapsulate) GetActionType() string { + return ActTypeEncapsulate +} + +type NXDecapsulate struct { + HeaderType uint32 +} + +func (a *NXDecapsulate) GetActionMessage() openflow15.Action { + return openflow15.NewNXActionDecapsulate(a.HeaderType) +} + +func (a *NXDecapsulate) GetActionType() string { + return ActTypeDecapsulate +}