blob: d01c2094b9c78bfccc805ffaa68b9fe782e97fef [file] [log] [blame]
Rich Lanec9fc57d2013-05-16 16:39:12 -07001-- binary
204 0e # version, type
300 48 # length
412 34 56 78 # xid
5
6fe dc ba 98 76 54 32 10 # cookie
7
8ff 00 ff 00 ff 00 ff 00 # cookie_mask
9
1003 # table_id
1100 # _command
1200 05 # idle_timeout
1300 0a # hard_timeout
1417 70 # priority
15
1600 00 00 32 # buffer_id
1700 00 00 06 # out_port
18
1900 00 00 08 # out_group
2000 00 # flags
2100 00 # pad
22
2300 01 # match.type
2400 04 # match.length
2500 00 00 00 # pad
26
2700 01 # instructions[0].type
2800 08 # instructions[0].length
2904 # instructions[0].table_id
3000 00 00 # pad
31
3200 01 # instructions[1].type
3300 08 # instructions[1].length
3407 # instructions[1].table_id
3500 00 00 # pad
36-- python
37ofp.message.flow_add(
38 xid=0x12345678,
39 cookie=0xFEDCBA9876543210,
40 cookie_mask=0xFF00FF00FF00FF00,
41 table_id=3,
42 idle_timeout=5,
43 hard_timeout=10,
44 priority=6000,
45 buffer_id=50,
46 out_port=6,
47 out_group=8,
48 flags=0,
49 match=ofp.match(oxm_list=[]),
50 instructions=[
51 ofp.instruction.goto_table(table_id=4),
52 ofp.instruction.goto_table(table_id=7)])
Andreas Wundsamb85d7d72013-08-01 22:14:49 -070053-- java
54builder.setXid(0x12345678)
55 .setCookie(U64.parseHex("FEDCBA9876543210"))
56 .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
57 .setTableId((byte) 3)
58 .setIdleTimeout(5)
59 .setHardTimeout(10)
60 .setPriority(6000)
61 .setBufferId(50)
62 .setOutPort(OFPort.of(6))
63 .setOutGroup(8)
64 .setFlags(0)
65 .setMatch(factory.createMatchV3Builder().getMessage()) // FIXME: @yotam: replace once we have generic ofmatch
66 .setInstructions(
67 ImmutableList.<OFInstruction>of(
68 factory.createInstructionGotoTableBuilder().setTableId((byte) 4).getMessage(),
69 factory.createInstructionGotoTableBuilder().setTableId((byte) 7).getMessage()
70 )
71 );
72