Skip to content

Commit

Permalink
Add const MSG_MAX_LEN, the max size of Openflow message (#56)
Browse files Browse the repository at this point in the history
This constant represents the maximum size of an OpenFlow message in bytes.
It can be utilized by other projects using this library.

Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
  • Loading branch information
hongliangl committed Feb 6, 2024
1 parent 4140706 commit f8e71bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.13.0
v0.14.0
6 changes: 6 additions & 0 deletions openflow15/openflow15.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ const (
VERSION = 6
)

const (
// Referring to page 43 in https://opennetworking.org/wp-content/uploads/2014/10/openflow-switch-v1.5.1.pdf,
// an OpenFlow message size can reach up to 64KB.
MSG_MAX_LEN = 0xffff
)

// Returns a new OpenFlow header with version field set to v1.5.
var NewOfp15Header func() common.Header = common.NewHeaderGenerator(VERSION)

Expand Down

0 comments on commit f8e71bf

Please sign in to comment.