Message Layer

Every OpenFlow message begins with the same header structure. This fixed structure serves three roles that are independent of the version of OpenFlow being used. First, the version field indicates the version of OpenFlow which this message belongs. Second, the length field indicates where this message will end in the byte stream starting from the first byte of the header. Third, the xid, or transaction identifier, is a unique value used to match requests to responses. The type field which indicates what type of message is present and how to interpret the payload, is version dependent.

Message Structure

Name Bits Byte Ordering Constraints
version 8 - = 1
type 8 - in 0..21
length 16 MSBF ≥ 8
xid 32 MSBF none

References

OpenFlow Switch Specification 1.0.0, pages 15-16

Message Structure

Name Bits Byte Ordering Constraints
version 8 - = 2
type 8 - in 0..23
length 16 MSBF ≥ 8
xid 32 MSBF none

References

OpenFlow Switch Specification 1.1.0, pages 24-25

Message Structure

Name Bits Byte Ordering Constraints
version 8 - = 3
type 8 - in 0..25
length 16 MSBF ≥ 8
xid 32 MSBF none

References

OpenFlow Switch Specification 1.2, pages 27-28

Message Structure

Name Bits Byte Ordering Constraints
version 8 - = 4
type 8 - in 0..29
length 16 MSBF ≥ 8
xid 32 MSBF none

References

OpenFlow Switch Specification 1.3.0, pages 34-35

Message Structure

Name Bits Byte Ordering Constraints
version 8 - = 4
type 8 - in 0..29
length 16 MSBF ≥ 8
xid 32 MSBF none

References

OpenFlow Switch Specification 1.3.1, pages 39-40

Message Structure

Name Bits Byte Ordering Constraints
version 8 - = 4
type 8 - in 0..29
length 16 MSBF ≥ 8
xid 32 MSBF none

References

OpenFlow Switch Specification 1.3.2, pages 40-41

Message Structure

Name Bits Byte Ordering Constraints
version 8 - = 4
type 8 - in 0..29
length 16 MSBF ≥ 8
xid 32 MSBF none

References

OpenFlow Switch Specification 1.3.3, pages 43-44

Message Structure

Name Bits Byte Ordering Constraints
version 8 - = 5
type 8 - in 0..21,24..34
length 16 MSBF ≥ 8
xid 32 MSBF none

References

OpenFlow Switch Specification 1.4, pages 44-46

OpenFlow Messages

OFP 1.0 OFP 1.1 OFP 1.2 OFP 1.3 OFP 1.4
Type\Version 1 2 3 4 5
0 Hello Hello Hello Hello Hello
1 Error Error Error Error Error
2 EchoReq EchoReq EchoReq EchoReq EchoReq
3 EchoRes EchoRes EchoRes EchoRes EchoRes
4 Vendor Experimenter Experimenter Experimenter Experimenter
5 FeatureReq FeatureReq FeatureReq FeatureReq FeatureReq
6 FeatureRes FeatureRes FeatureRes FeatureRes FeatureRes
7 GetConfigReq GetConfigReq GetConfigReq GetConfigReq GetConfigReq
8 GetConfigRes GetConfigRes GetConfigRes GetConfigRes GetConfigRes
9 SetConfig SetConfig SetConfig SetConfig SetConfig
10 PacketIn PacketIn PacketIn PacketIn PacketIn
11 FlowRemoved FlowRemoved FlowRemoved FlowRemoved FlowRemoved
12 PortStatus PortStatus PortStatus PortStatus PortStatus
13 PacketOut PacketOut PacketOut PacketOut PacketOut
14 FlowMod FlowMod FlowMod FlowMod FlowMod
15 PortMod GroupMod GroupMod GroupMod GroupMod
16 StatsReq PortMod PortMod PortMod PortMod
17 StatsRes TableMod TableMod TableMod TableMod
18 BarrierReq StatsReq StatsReq MultipartReq MultipartReq
19 BarrierRes StatsRes StatsRes MultipartRes MultipartRes
20 QueueGetConfigReq BarrierReq BarrierReq BarrierReq BarrierReq
21 QueueGetConfigRes BarrierRes BarrierRes BarrierRes BarrierRes
22 - QueueGetConfigReq QueueGetConfigReq QueueGetConfigReq -
23 - QueueGetConfigRes QueueGetConfigRes QueueGetConfigRes -
24 - - RoleReq RoleReq RoleReq
25 - - RoleRes RoleRes RoleRes
26 - - - GetAsyncReq GetAsyncReq
27 - - - GetAsyncRes GetAsyncRes
28 - - - SetAsync SetSync
29 - - - MeterMod MeterMod
30 - - - - RoleStatus
31 - - - - TableStatus
32 - - - - RequestForward
33 - - - - BundleControl
34 - - - - BundleAddMessage