blob: 8e38975263186b749f4a5a37ac8cc3ea392211da [file] [log] [blame]
Rich Lanec10be432014-10-10 17:13:46 -07001-- binary
205 13 # version/type
300 58 # length
400 00 00 05 # xid
500 0d # stats_type
600 00 # flags
700 00 00 00 # pad
800 00 00 01 # entries[0].port_no
900 48 # entries[0].length
1000 00 # pad
1101 02 03 04 05 06 # entries[0].hw_addr
1200 00 # pad
1369 6e 74 65 72 66 61 63 65 31 32 33 34 35 36 37 # entries[0].name
Andreas Wundsam703278b2014-10-10 21:34:13 -07001400 00 00 60 # entries[0].config
1500 00 00 03 # entries[0].state
Rich Lanec10be432014-10-10 17:13:46 -07001600 00 # entries[0].properties[0].type (ethernet)
1700 20 # entries[0].properties[0].length
1800 00 00 00 # pad
1900 00 00 70 # entries[0].properties[0].curr
2000 00 00 00 # entries[0].properties[0].advertised
2100 00 00 00 # entries[0].properties[0].supported
2200 00 00 00 # entries[0].properties[0].peer
2300 00 00 00 # entries[0].properties[0].curr_speed
2400 00 00 80 # entries[0].properties[0].max_speed
25-- python
26ofp.message.port_desc_stats_reply(
27 xid=5, flags=0, entries=[
28 ofp.port_desc(
29 port_no=1,
30 hw_addr=[1,2,3,4,5,6],
31 name="interface1234567",
Andreas Wundsam703278b2014-10-10 21:34:13 -070032 config=0x60,
33 state=0x03,
Rich Lanec10be432014-10-10 17:13:46 -070034 properties=[
35 ofp.port_desc_prop.ethernet(
36 curr=0x70,
37 max_speed=0x80)])])
Andreas Wundsam703278b2014-10-10 21:34:13 -070038-- java
39builder
40 .setXid(5)
41 .setFlags(ImmutableSet.<OFStatsReplyFlags>of())
42 .setEntries(ImmutableList.of(
43 factory.buildPortDesc()
44 .setPortNo(OFPort.of(1))
45 .setHwAddr(MacAddress.of("01:02:03:04:05:06"))
46 .setName("interface1234567")
47 .setConfig(Sets.immutableEnumSet(OFPortConfig.NO_FWD, OFPortConfig.NO_PACKET_IN))
48 .setState(Sets.immutableEnumSet(OFPortState.LINK_DOWN, OFPortState.BLOCKED))
49 .setProperties(ImmutableList.<OFPortDescProp>of(factory.buildPortDescPropEthernet()
50 .setCurr(0x70)
51 .setMaxSpeed(0x80)
52 .build()))
53 .build())
54 );