Rich Lane | c10be43 | 2014-10-10 17:13:46 -0700 | [diff] [blame] | 1 | -- binary |
| 2 | 05 13 # version/type |
| 3 | 00 58 # length |
| 4 | 00 00 00 05 # xid |
| 5 | 00 0d # stats_type |
| 6 | 00 00 # flags |
| 7 | 00 00 00 00 # pad |
| 8 | 00 00 00 01 # entries[0].port_no |
| 9 | 00 48 # entries[0].length |
| 10 | 00 00 # pad |
| 11 | 01 02 03 04 05 06 # entries[0].hw_addr |
| 12 | 00 00 # pad |
| 13 | 69 6e 74 65 72 66 61 63 65 31 32 33 34 35 36 37 # entries[0].name |
Andreas Wundsam | 703278b | 2014-10-10 21:34:13 -0700 | [diff] [blame] | 14 | 00 00 00 60 # entries[0].config |
| 15 | 00 00 00 03 # entries[0].state |
Rich Lane | c10be43 | 2014-10-10 17:13:46 -0700 | [diff] [blame] | 16 | 00 00 # entries[0].properties[0].type (ethernet) |
| 17 | 00 20 # entries[0].properties[0].length |
| 18 | 00 00 00 00 # pad |
| 19 | 00 00 00 70 # entries[0].properties[0].curr |
| 20 | 00 00 00 00 # entries[0].properties[0].advertised |
| 21 | 00 00 00 00 # entries[0].properties[0].supported |
| 22 | 00 00 00 00 # entries[0].properties[0].peer |
| 23 | 00 00 00 00 # entries[0].properties[0].curr_speed |
| 24 | 00 00 00 80 # entries[0].properties[0].max_speed |
| 25 | -- python |
| 26 | ofp.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 Wundsam | 703278b | 2014-10-10 21:34:13 -0700 | [diff] [blame] | 32 | config=0x60, |
| 33 | state=0x03, |
Rich Lane | c10be43 | 2014-10-10 17:13:46 -0700 | [diff] [blame] | 34 | properties=[ |
| 35 | ofp.port_desc_prop.ethernet( |
| 36 | curr=0x70, |
| 37 | max_speed=0x80)])]) |
Andreas Wundsam | 703278b | 2014-10-10 21:34:13 -0700 | [diff] [blame] | 38 | -- java |
| 39 | builder |
| 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 | ); |