| -- binary |
| 04 0e # version, type |
| 00 48 # length |
| 12 34 56 78 # xid |
| |
| fe dc ba 98 76 54 32 10 # cookie |
| |
| ff 00 ff 00 ff 00 ff 00 # cookie_mask |
| |
| 03 # table_id |
| 00 # _command |
| 00 05 # idle_timeout |
| 00 0a # hard_timeout |
| 17 70 # priority |
| |
| 00 00 00 32 # buffer_id |
| 00 00 00 06 # out_port |
| |
| 00 00 00 08 # out_group |
| 00 00 # flags |
| 00 00 # pad |
| |
| 00 01 # match.type |
| 00 04 # match.length |
| 00 00 00 00 # 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 |
| -- python |
| ofp.message.flow_add( |
| xid=0x12345678, |
| cookie=0xFEDCBA9876543210, |
| cookie_mask=0xFF00FF00FF00FF00, |
| table_id=3, |
| idle_timeout=5, |
| hard_timeout=10, |
| priority=6000, |
| buffer_id=50, |
| out_port=6, |
| out_group=8, |
| flags=0, |
| match=ofp.match(oxm_list=[]), |
| instructions=[ |
| ofp.instruction.goto_table(table_id=4), |
| ofp.instruction.goto_table(table_id=7)]) |
| -- java |
| builder.setXid(0x12345678) |
| .setCookie(U64.parseHex("FEDCBA9876543210")) |
| .setCookieMask(U64.parseHex("FF00FF00FF00FF00")) |
| .setTableId((byte) 3) |
| .setIdleTimeout(5) |
| .setHardTimeout(10) |
| .setPriority(6000) |
| .setBufferId(50) |
| .setOutPort(OFPort.of(6)) |
| .setOutGroup(8) |
| .setFlags(0) |
| .setMatch(factory.createMatchV3Builder().getMessage()) // FIXME: @yotam: replace once we have generic ofmatch |
| .setInstructions( |
| ImmutableList.<OFInstruction>of( |
| factory.createInstructionGotoTableBuilder().setTableId((byte) 4).getMessage(), |
| factory.createInstructionGotoTableBuilder().setTableId((byte) 7).getMessage() |
| ) |
| ); |
| |