Skip to content

Commit f8e71bf

Browse files
authored
Add const MSG_MAX_LEN, the max size of Openflow message (#56)
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>
1 parent 4140706 commit f8e71bf

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.13.0
1+
v0.14.0

‎openflow15/openflow15.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ const (
2323
VERSION = 6
2424
)
2525

26+
const (
27+
// Referring to page 43 in https://opennetworking.org/wp-content/uploads/2014/10/openflow-switch-v1.5.1.pdf,
28+
// an OpenFlow message size can reach up to 64KB.
29+
MSG_MAX_LEN = 0xffff
30+
)
31+
2632
// Returns a new OpenFlow header with version field set to v1.5.
2733
var NewOfp15Header func() common.Header = common.NewHeaderGenerator(VERSION)
2834

0 commit comments

Comments
 (0)