Skip to content

Commit

Permalink
support encap and decap for nsh and ethernet
Browse files Browse the repository at this point in the history
Signed-off-by: zhenglinan <[email protected]>
  • Loading branch information
zhenglinan committed Nov 20, 2022
1 parent c5ed7bf commit d485bc8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions openflow15/nx_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -1953,21 +1953,21 @@ func (p *PropTLV) UnmarshalBinary(data []byte) error {
return nil
}

type EncapType uint32
// type EncapType uint32

const (
Ethernet EncapType = 0
Nsh EncapType = 1<<16 | 0x894f
Ethernet uint32 = 0
Nsh uint32 = 1<<16 | 0x894f
)

type NXActionEncapsulate struct {
*NXActionHeader
HeaderSize uint16
HeaderType EncapType
HeaderType uint32
Property []PropTLV
}

func NewNXActionEncapsulate(headerSize uint16, headerType EncapType, property []PropTLV) *NXActionEncapsulate {
func NewNXActionEncapsulate(headerSize uint16, headerType uint32, property []PropTLV) *NXActionEncapsulate {
a := new(NXActionEncapsulate)
a.NXActionHeader = NewNxActionHeader(NXAST_RAW_ENCAP)
a.Length = 16
Expand Down

0 comments on commit d485bc8

Please sign in to comment.