blob: b4c45e55f3f37366653e0a0372e405cde171a564 [file] [log] [blame]
-- binary
06 13 # version, type
00 68 # length
12 34 56 78 # xid
00 01 # multipart message type (OFPMP_FLOW_DESC) -- old name is OFPMP_FLOW for spec 1.3.1, 1.4.0, 1.4.1
00 01 # flags
00 00 00 00 # pad
00 58 # length
00 00 # pad
01 # table_id
00 # pad
00 01 # priority
00 10 # idle_timeout
00 60 # hard_timeout
00 01 # flags (OFPFF_SEND_FLOW_REM) Send flow removed message when flow expires or is deleted
00 01 # importance
fe dc ba 98 76 54 32 10 # cookie
00 01 # match.type
00 10 # match.length
80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
00 00 00 04 # match.oxm_list[0].value
00 00 00 05 # match.oxm_list[0].mask
00 00 # match.pad
00 1c # stats.length
80 02 00 08 # stats.oxs_list[0].type_len - DURATION
00 00 00 00 00 00 00 04 # stats.oxs_list[0].value
80 02 02 08 # stats.oxs_list[1].type_len - IDLE_TIME (8002 -> Openflow_basic oxs class and 02 -> 0000 0010 -> oxs_field width 7, oxs_reserved width 1 and 08 is length)
00 00 00 00 00 00 00 06 # stats.oxs_list[1].value
00 00 00 00 # stats.pad
00 01 # instructions[0].type
00 08 # instructions[0].length
04 # instructions[0].table_id
00 00 00 # pad
00 01 # instructions[1].type
00 08 # instructions[1].length
07 # instructions[1].table_id
00 00 00 # pad
--java
builder
.setXid(0x12345678)
.setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
.setEntries(ImmutableList.<OFFlowStatsEntry>of(
factory.buildFlowStatsEntry().setTableId(TableId.of(1))
.setPriority(1)
.setIdleTimeout(16)
.setHardTimeout(96)
.setFlags(ImmutableSet.<OFFlowModFlags>of(OFFlowModFlags.SEND_FLOW_REM))
.setImportance(1)
.setCookie(U64.parseHex("FEDCBA9876543210"))
.setMatch(factory.buildMatch()
.setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
.build())
.setStats(factory.buildStatV6()
.setOxsFields(OFOxsList.of(factory.oxss().buildDuration().setValue(U64.of(4)).build(),
factory.oxss().buildIdleTime().setValue(U64.of(6)).build()))
.build())
.setInstructions(ImmutableList.<OFInstruction>of(
factory.instructions().gotoTable(TableId.of(4)),
factory.instructions().gotoTable(TableId.of(7))))
.build() ))
.build()