StatsRequest
p

StatsRequest is used to request information about individual flows.
- Initiator
- Controller
- Acknowledged
- Yes
Structure

StatsReq contains a standard header, a 2 byte type, a 2 byte flags and a body. Types include Desc(description), Flow(individual flow), Aggregate(aggregate flow), Table, Port, Queue and Vendor. The body of StatsReq depends on the type. StatsReq with types Desc and Table have an empty body. The body of StatsReq with type Flow contains match, 1 byte table_id, 1 byte pad for 32 bits aligning and 2 byte out_port. The field table_id is the index of the table and a value of 0xFF indicating all tables. Out_port serves as a filter for the output port to include constraints for matching. They are introduced in the port numbering part of port. Using None will disable filtering. Type Aggregate shares the same structure with Flow. The body of StatsReq with type Port includes 2 byte port_no and padding for 64 bit alignment. The field port_no is used for port filtering as well. Type Queue contains 2 byte port_no, padding for 32 bit alignment and 4 byte queue_id. The field queue_id represents the index of queue. The body of StatsReq with type Vendor includes a 4 byte vendor and a vendor-defined payload. The vendor field represents Vendor's ID and is described in Vendor. Finally, the bodies of Desc and Table are empty.
Message Structure
Name | Bits | Byte Ordering | Constraints |
type | 16 | MSBF | in 0x0000..0x0005, 0xffff |
flags | 16 | MSBF | none |
StatsRequest Payload
Type Name | Type Value | Field Name | Bits | Byte Ordering | Constraints | |
Description | 0x0000 | type | 16 | MSBF | = 0x0000 | |
flags | 16 | MSBF | none | |||
![]() |
Flow | 0x0001 | type | 16 | MSBF | = 0x0001 |
flags | 16 | MSBF | none | |||
match | - | - | match constraints | |||
table_id | 8 | MSBF | none | |||
pad | 8 | - | none | |||
out_port | 16 | MSBF | in 0x0000..0xffef | |||
![]() |
Aggregate | 0x0002 | type | 16 | MSBF | = 0x0002 |
flags | 16 | MSBF | none | |||
match | - | - | match constraints | |||
table_id | 8 | MSBF | none | |||
pad | 8 | - | none | |||
out_port | 16 | MSBF | in 0x0000..0xffef | |||
Table | 0x0003 | type | 16 | MSBF | = 0x0003 | |
flags | 16 | MSBF | none | |||
![]() |
Port | 0x0004 | type | 16 | MSBF | = 0x0004 |
flags | 16 | MSBF | none | |||
port_number | 16 | MSBF | in 0x0000..0xffef | |||
pad | 48 | - | none | |||
![]() |
Queue | 0x0005 | type | 16 | MSBF | = 0x0005 |
flags | 16 | MSBF | none | |||
port_number | 16 | MSBF | in 0x0000..0xffef | |||
pad | 16 | - | none | |||
queue_id | 32 | MSBF | none | |||
![]() |
Vendor | 0xffff | type | 16 | MSBF | = 0xffff |
flags | 16 | MSBF | none | |||
vendor_id | 32 | MSBF | none |
References
OpenFlow Switch Specification 1.0.0, pages 30-36Structure

In this version, padding is added after flags. New types Group and GroupDesc (group description) are added and type Vendor is renamed to Experimenter. Similar to out_port, out_group serves as filtering through group[Group.md]. The field cookie_mask is defined in FlowMod. In the body with type GroupDesc, bucket is defined in GroupMod. The body of GroupDesc is empty.
Message Structure
Name | Bits | Byte Ordering | Constraints |
type | 16 | MSBF | in 0x0000..0x0007, 0xffff |
flags | 16 | MSBF | none |
pad | 32 | - | none |
StatsRequest Payload
Type Name | Type Value | Field Name | Bits | Byte Ordering | Constraints | |
Description | 0x0000 | type | 16 | MSBF | = 0x0000 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Flow | 0x0001 | type | 16 | MSBF | = 0x0001 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
table_id | 8 | MSBF | none | |||
pad | 24 | - | none | |||
out_port | 32 | MSFB | in 0x00000000..0xffffffef | |||
out_group | 32 | MSBF | none | |||
pad | 32 | - | none | |||
cookie | 64 | MSBF | none | |||
cookie_mask | 64 | - | none | |||
match | - | - | match constraints | |||
![]() |
Aggregate | 0x0002 | type | 16 | MSBF | = 0x0002 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
table_id | 8 | MSBF | none | |||
pad | 24 | - | none | |||
out_port | 32 | MSBF | none | |||
out_group | 32 | MSBF | none | |||
pad | 32 | - | none | |||
cookie | 64 | MSBF | none | |||
cookie_mask | 64 | MSBF | none | |||
match | - | - | match constraints | |||
Table | 0x0003 | type | 16 | MSBF | = 0x0003 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Port | 0x0004 | type | 16 | MSBF | = 0x0004 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
port_number | 32 | MSBF | in 0x00000000..0xffffffef | |||
pad | 32 | - | none | |||
![]() |
Queue | 0x0005 | type | 16 | MSBF | = 0x0005 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
port_number | 32 | MSBF | in 0x00000000..0xffffffef | |||
queue_id | 32 | - | none | |||
![]() |
Group | 0x0006 | type | 16 | MSBF | = 0x0006 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
group_id | 32 | MSBF | none | |||
pad | 32 | - | none | |||
GroupDesc | 0x0007 | type | 16 | MSBF | = 0x0007 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Experimenter | 0xffff | type | 16 | MSBF | = 0xffff |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
experimenter | 32 | MSBF | none |
References
OpenFlow Switch Specification 1.1, pages 43-49Structure

In this version of StatsReq, a new type GroupFeatures is added and an experimenter defined exp_type is added in the body of type Experimenter. No other changes were made. The body of GroupFeatures in StatsReq is empty.
Message Structure
Name | Bits | Byte Ordering | Constraints |
type | 16 | MSBF | in 0x0000..0x0008, 0xffff |
flags | 16 | MSBF | none |
pad | 32 | - | none |
StatsRequest Payload
Type Name | Type Value | Field Name | Bits | Byte Ordering | Constraints | |
Description | 0x0000 | type | 16 | MSBF | = 0x0000 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Flow | 0x0001 | type | 16 | MSBF | = 0x0001 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
table_id | 8 | MSBF | none | |||
pad | 24 | - | none | |||
out_port | 32 | MSFB | in 0x00000000..0xffffffef | |||
out_group | 32 | MSBF | none | |||
pad | 32 | - | none | |||
cookie | 64 | MSBF | none | |||
cookie_mask | 64 | - | none | |||
match | - | - | match constraints | |||
![]() |
Aggregate | 0x0002 | type | 16 | MSBF | = 0x0002 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
table_id | 8 | MSBF | none | |||
pad | 24 | - | none | |||
out_port | 32 | MSBF | none | |||
out_group | 32 | MSBF | none | |||
pad | 32 | - | none | |||
cookie | 64 | MSBF | none | |||
cookie_mask | 64 | MSBF | none | |||
match | - | - | match constraints | |||
Table | 0x0003 | type | 16 | MSBF | = 0x0003 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Port | 0x0004 | type | 16 | MSBF | = 0x0004 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
port_number | 32 | MSBF | in 0x00000000..0xffffffef | |||
pad | 32 | - | none | |||
![]() |
Queue | 0x0005 | type | 16 | MSBF | = 0x0005 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
port_number | 32 | MSBF | in 0x00000000..0xffffffef | |||
queue_id | 32 | - | none | |||
![]() |
Group | 0x0006 | type | 16 | MSBF | = 0x0006 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
group_id | 32 | MSBF | none | |||
pad | 32 | - | none | |||
GroupDesc | 0x0007 | type | 16 | MSBF | = 0x0007 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
GroupFeatures | 0x0008 | type | 16 | MSBF | = 0x0008 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Experimenter | 0xffff | type | 16 | MSBF | = 0xffff |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
experimenter_id | 32 | MSBF | none | |||
experimenter_type | 32 | MSBF | none |
References
OpenFlow Switch Specification 1.2, pages 50-57Structure

From this version, Stats is renamed to be Multipart. Type Port is renamed to be PortStats. Furthermore, new types TableFeatures, Meter, MeterConfig and MeterFeatures are added. The body of MeterFeatures in MultipartReq is empty.
Message Structure
Name | Bits | Byte Ordering | Constraints |
type | 16 | MSBF | in 0x0000..0x000c, 0xffff |
flags | 16 | MSBF | none |
pad | 32 | - | none |
StatsRequest Payload
Type Name | Type Value | Field Name | Bits | Byte Ordering | Constraints | |
Description | 0x0000 | type | 16 | MSBF | = 0x0000 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Flow | 0x0001 | type | 16 | MSBF | = 0x0001 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
table_id | 8 | MSBF | none | |||
pad | 24 | - | none | |||
out_port | 32 | MSFB | in 0x00000000..0xffffffef | |||
out_group | 32 | MSBF | none | |||
pad | 32 | - | none | |||
cookie | 64 | MSBF | none | |||
cookie_mask | 64 | - | none | |||
match | - | - | match constraints | |||
![]() |
Aggregate | 0x0002 | type | 16 | MSBF | = 0x0002 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
table_id | 8 | MSBF | none | |||
pad | 24 | - | none | |||
out_port | 32 | MSBF | none | |||
out_group | 32 | MSBF | none | |||
pad | 32 | - | none | |||
cookie | 64 | MSBF | none | |||
cookie_mask | 64 | MSBF | none | |||
match | - | - | match constraints | |||
Table | 0x0003 | type | 16 | MSBF | = 0x0003 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Port | 0x0004 | type | 16 | MSBF | = 0x0004 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
port_number | 32 | MSBF | in 0x00000000..0xffffffef | |||
pad | 32 | - | none | |||
![]() |
Queue | 0x0005 | type | 16 | MSBF | = 0x0005 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
port_number | 32 | MSBF | in 0x00000000..0xffffffef | |||
queue_id | 32 | - | none | |||
![]() |
Group | 0x0006 | type | 16 | MSBF | = 0x0006 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
group_id | 32 | MSBF | none | |||
pad | 32 | - | none | |||
GroupDesc | 0x0007 | type | 16 | MSBF | = 0x0007 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
GroupFeatures | 0x0008 | type | 16 | MSBF | = 0x0008 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Meter | 0x0009 | type | 16 | MSBF | = 0x0009 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
meter_id | 32 | - | none | |||
pad | 32 | - | none | |||
![]() |
MeterConfig | 0x000a | type | 16 | MSBF | = 0x0009 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
meter_id | 32 | - | none | |||
pad | 32 | - | none | |||
MeterFeatures | 0x000b | type | 16 | MSBF | = 0x000b | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
TableFeatures | 0x000c | type | 16 | MSBF | = 0x000c |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
length | 16 | MSBF | ≥ 64 | |||
table_id | 8 | MSBF | none | |||
pad | 40 | - | none | |||
name | 32Bytes | MSBF | NTS | |||
metadata_match | 64 | MSBF | none | |||
metadata_write | 64 | MSBF | none | |||
config | 32 | MSBF | none | |||
max_entries | 32 | MSBF | none | |||
table_feature_prop | - | - | table_feature_prop | |||
PortDesc | 0x000d | type | 16 | MSBF | = 0x000d | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Experimenter | 0xffff | type | 16 | MSBF | = 0xffff |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
experimenter_id | 32 | MSBF | none | |||
experimenter_type | 32 | MSBF | none |
TableFeatureProperty

Type Name | Type Value | Field Name | Bits | Byte Ordering | Constraints |
Instructions | 0x0000 | type | 16 | MSBF | = 0x0000 |
length | 16 | MSBF | ≥ 4 | ||
instruction | - | - | instruction constraints | ||
InstructionMiss | 0x0001 | type | 16 | MSBF | = 0x0001 |
length | 16 | MSBF | ≥ 4 | ||
instruction | - | - | instruction constraints | ||
NextTables | 0x0002 | type | 16 | MSBF | = 0x0002 |
length | 16 | MSBF | ≥ 4 | ||
next_table_ids | - | - | next_table_ids | ||
NextTablesMiss | 0x0003 | type | 16 | MSBF | = 0x0003 |
length | 16 | MSBF | ≥ 4 | ||
next_table_ids | - | - | next_table_ids | ||
WriteActions | 0x0004 | type | 16 | MSBF | = 0x0004 |
length | 16 | MSBF | ≥ 4 | ||
actions | - | - | action constraints | ||
WriteActionsMiss | 0x0005 | type | 16 | MSBF | = 0x0005 |
length | 16 | MSBF | ≥ 4 | ||
actions | - | - | action constraints | ||
ApplyActions | 0x0006 | type | 16 | MSBF | = 0x0006 |
length | 16 | MSBF | ≥ 4 | ||
actions | - | - | action constraints | ||
ApplyActionsMiss | 0x0007 | type | 16 | MSBF | = 0x0007 |
length | 16 | MSBF | ≥ 4 | ||
actions | - | - | action constraints | ||
Match | 0x0008 | type | 16 | MSBF | = 0x0008 |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header | ||
Wildcards | 0x0009 | type | 16 | MSBF | = 0x0009 |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header | ||
WriteSetField | 0x000a | type | 16 | MSBF | = 0x000a |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header | ||
WriteSetFieldMiss | 0x000b | type | 16 | MSBF | = 0x000b |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header | ||
ApplySetField | 0x000c | type | 16 | MSBF | = 0x000c |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header | ||
ApplySetFieldMiss | 0x000d | type | 16 | MSBF | = 0x000d |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header |
References
OpenFlow Switch Specification 1.3, pages 60-73Structure

In version 1.3 stats was renamed to be Multipart. Type Port is renamed to be PortStats. Furthermore, new types TableFeatures, Meter, MeterConfig and MeterFeatures are added. The body of MeterFeatures in MultipartReq is empty.
Message Structure
Name | Bits | Byte Ordering | Constraints |
type | 16 | MSBF | in 0x0000..0x000c, 0xffff |
flags | 16 | MSBF | none |
pad | 32 | - | none |
StatsRequest Payload
Type Name | Type Value | Field Name | Bits | Byte Ordering | Constraints | |
Description | 0x0000 | type | 16 | MSBF | = 0x0000 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Flow | 0x0001 | type | 16 | MSBF | = 0x0001 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
table_id | 8 | MSBF | none | |||
pad | 24 | - | none | |||
out_port | 32 | MSFB | in 0x00000000..0xffffffef | |||
out_group | 32 | MSBF | none | |||
pad | 32 | - | none | |||
cookie | 64 | MSBF | none | |||
cookie_mask | 64 | - | none | |||
match | - | - | match constraints | |||
![]() |
Aggregate | 0x0002 | type | 16 | MSBF | = 0x0002 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
table_id | 8 | MSBF | none | |||
pad | 24 | - | none | |||
out_port | 32 | MSBF | none | |||
out_group | 32 | MSBF | none | |||
pad | 32 | - | none | |||
cookie | 64 | MSBF | none | |||
cookie_mask | 64 | MSBF | none | |||
match | - | - | match constraints | |||
Table | 0x0003 | type | 16 | MSBF | = 0x0003 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Port | 0x0004 | type | 16 | MSBF | = 0x0004 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
port_number | 32 | MSBF | in 0x00000000..0xffffffef | |||
pad | 32 | - | none | |||
![]() |
Queue | 0x0005 | type | 16 | MSBF | = 0x0005 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
port_number | 32 | MSBF | in 0x00000000..0xffffffef | |||
queue_id | 32 | - | none | |||
![]() |
Group | 0x0006 | type | 16 | MSBF | = 0x0006 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
group_id | 32 | MSBF | none | |||
pad | 32 | - | none | |||
GroupDesc | 0x0007 | type | 16 | MSBF | = 0x0007 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
GroupFeatures | 0x0008 | type | 16 | MSBF | = 0x0008 | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Meter | 0x0009 | type | 16 | MSBF | = 0x0009 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
meter_id | 32 | - | none | |||
pad | 32 | - | none | |||
![]() |
MeterConfig | 0x000a | type | 16 | MSBF | = 0x0009 |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
meter_id | 32 | - | none | |||
pad | 32 | - | none | |||
MeterFeatures | 0x000b | type | 16 | MSBF | = 0x000b | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
TableFeatures | 0x000c | type | 16 | MSBF | = 0x000c |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
length | 16 | MSBF | ≥ 64 | |||
table_id | 8 | MSBF | none | |||
pad | 40 | - | none | |||
name | 32Bytes | MSBF | NTS | |||
metadata_match | 64 | MSBF | none | |||
metadata_write | 64 | MSBF | none | |||
config | 32 | MSBF | none | |||
max_entries | 32 | MSBF | none | |||
table_feature_prop | - | - | table_feature_prop | |||
PortDesc | 0x000d | type | 16 | MSBF | = 0x000d | |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
![]() |
Experimenter | 0xffff | type | 16 | MSBF | = 0xffff |
flags | 16 | MSBF | none | |||
pad | 32 | - | none | |||
experimenter_id | 32 | MSBF | none | |||
experimenter_type | 32 | MSBF | none |
TableFeatureProperty

Type Name | Type Value | Field Name | Bits | Byte Ordering | Constraints |
Instructions | 0x0000 | type | 16 | MSBF | = 0x0000 |
length | 16 | MSBF | ≥ 4 | ||
instruction | - | - | instruction constraints | ||
InstructionMiss | 0x0001 | type | 16 | MSBF | = 0x0001 |
length | 16 | MSBF | ≥ 4 | ||
instruction | - | - | instruction constraints | ||
NextTables | 0x0002 | type | 16 | MSBF | = 0x0002 |
length | 16 | MSBF | ≥ 4 | ||
next_table_ids | - | - | next_table_ids | ||
NextTablesMiss | 0x0003 | type | 16 | MSBF | = 0x0003 |
length | 16 | MSBF | ≥ 4 | ||
next_table_ids | - | - | next_table_ids | ||
WriteActions | 0x0004 | type | 16 | MSBF | = 0x0004 |
length | 16 | MSBF | ≥ 4 | ||
actions | - | - | action constraints | ||
WriteActionsMiss | 0x0005 | type | 16 | MSBF | = 0x0005 |
length | 16 | MSBF | ≥ 4 | ||
actions | - | - | action constraints | ||
ApplyActions | 0x0006 | type | 16 | MSBF | = 0x0006 |
length | 16 | MSBF | ≥ 4 | ||
actions | - | - | action constraints | ||
ApplyActionsMiss | 0x0007 | type | 16 | MSBF | = 0x0007 |
length | 16 | MSBF | ≥ 4 | ||
actions | - | - | action constraints | ||
Match | 0x0008 | type | 16 | MSBF | = 0x0008 |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header | ||
Wildcards | 0x0009 | type | 16 | MSBF | = 0x0009 |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header | ||
WriteSetField | 0x000a | type | 16 | MSBF | = 0x000a |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header | ||
WriteSetFieldMiss | 0x000b | type | 16 | MSBF | = 0x000b |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header | ||
ApplySetField | 0x000c | type | 16 | MSBF | = 0x000c |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header | ||
ApplySetFieldMiss | 0x000d | type | 16 | MSBF | = 0x000d |
length | 16 | MSBF | ≥ 4 | ||
OXM TLV Header | - | - | OXM TLV Header |
References
OpenFlow Switch Specification 1.3.1, pages 72-88Under development
This section is under active development.
Under development
This section is under active development.
Under development
This section is under active development.