Murat Parlakisik | f95672c | 2016-12-05 00:53:17 -0800 | [diff] [blame] | 1 | -- binary |
| 2 | 06 10 # version, type |
| 3 | 00 28 # length |
| 4 | 12 34 56 78 # xid |
| 5 | 00 00 00 01 # port_no |
| 6 | 00 00 00 00 # pad |
| 7 | 00 01 02 03 04 05 # hw_addr |
| 8 | 00 00 # pad |
| 9 | 00 00 00 01 # config (OFPPC_PORT_DOWN) |
| 10 | 00 00 00 01 # mask (OFPPC_PORT_DOWN) |
| 11 | 00 00 # properties[0].type (OFPPMPT_ETHERNET) |
| 12 | 00 08 # properties[0].length |
| 13 | 00 00 00 01 # properties[0].advertise (OFPPF_10MB_HD) |
| 14 | -- java |
| 15 | builder |
| 16 | .setXid(0x12345678) |
| 17 | .setPortNo(OFPort.of(1)) |
| 18 | .setHwAddr(MacAddress.of("00:01:02:03:04:05")) |
| 19 | .setConfig(ImmutableSet.<OFPortConfig>of(OFPortConfig.PORT_DOWN)) |
| 20 | .setMask(ImmutableSet.<OFPortConfig>of(OFPortConfig.PORT_DOWN)) |
| 21 | .setProperties(ImmutableList.<OFPortModProp>of(factory.buildPortModPropEthernet().setAdvertise(ImmutableSet.<OFPortFeatures>of(OFPortFeatures.PF_10MB_HD)).build())) |
| 22 | .build() |
| 23 | |