Yafit Hadar | f8caac0 | 2015-08-25 10:21:44 +0300 | [diff] [blame] | 1 | -- binary |
| 2 | 04 13 # version, type |
| 3 | 00 58 # length |
| 4 | 12 34 56 78 # xid |
| 5 | ff ff # stats_type |
| 6 | 00 00 # flags |
| 7 | 00 00 00 00 # pad |
| 8 | FF 00 00 07 # experimenter |
| 9 | 00 00 00 01 # subtype |
| 10 | # entries[0] |
| 11 | 00 00 00 01 # port |
| 12 | 00 40 # length - ???????? |
| 13 | 00 00 # pad |
| 14 | 00 00 00 00 00 00 # entries[0].hw_addr |
| 15 | 00 00 # pad |
| 16 | 69 6e 74 65 72 66 61 63 65 31 32 33 34 35 36 37 # entries[0].name |
| 17 | 00 00 00 60 # entries[0].config |
| 18 | 00 00 00 04 # entries[0].state |
| 19 | # properties[0] |
| 20 | 00 02 # entries[0].properties[0].type |
| 21 | 00 18 # entries[0].properties[0].length ??????? |
| 22 | 0C # port_signal_type OMSn = 2,OCH = 5,OTU2 = 12(oduclt-10),OTU4 = 14(oduclt-100) |
| 23 | 00 #reserved |
| 24 | 00 00 #pad |
| 25 | # features[0] |
| 26 | 00 02 |
| 27 | 00 10 # length - ???????? |
| 28 | 00 00 00 00 |
| 29 | # layeres[0] |
| 30 | 03 # layer class (PORT=1,OCH=2,ODU=3,DUCLT=4) |
| 31 | 01 # signal_type; /*OFP(OTP/OCH/ODU/ODUCL)T_*/ |
| 32 | 06 #(OTS_OMS=1,OMS_OCH=2,OPS_OCHr=3,OPSM_OTUk=4,OCH_OTUk=5,ODUk_ODUij=6,ODUk_ODUj21=7, |
| 33 | #ODUkh_ODUj21=8,ODU0_CBRx=9,ODUk_CBRx=10,ODUk_CBRxg=11,ODUk_RSn=12,ODUk_ATM=13,ODUk_ETH=14,ODUkh_ETH=15,ODUk_ETHPPOS=16 |
| 34 | 00 00 00 00 00 |
| 35 | |
| 36 | -- python |
| 37 | ofp.message.exp_port_desc_stats_reply( |
| 38 | xid=0x12345678, |
| 39 | flags=0, |
| 40 | entries=[ |
| 41 | ofp.exp_port_desc( |
| 42 | port_no=1, |
| 43 | hw_addr=[0,0,0,0,0,0], |
| 44 | name="interface1234567", |
| 45 | config=0x60, |
| 46 | state=0x03, |
| 47 | properties=[ |
| 48 | ofp.exp_port_desc_prop.ethernet( |
| 49 | curr=0x70, |
| 50 | max_speed=0x80)])]) |
| 51 | |
| 52 | |
| 53 | -- java |
| 54 | builder |
| 55 | .setXid(0x12345678) |
| 56 | .setFlags(ImmutableSet.<OFStatsReplyFlags>of()) |
| 57 | .setEntries(ImmutableList.of( |
| 58 | factory.buildExpPort() |
| 59 | .setPortNo(OFPort.of(1)) |
| 60 | .setHwAddr(MacAddress.of("00:00:00:00:00:00")) |
| 61 | .setName("interface1234567") |
| 62 | .setConfig(Sets.immutableEnumSet(OFPortConfig.NO_FWD, OFPortConfig.NO_PACKET_IN)) |
| 63 | .setState(Sets.immutableEnumSet(OFPortState.LIVE)) |
| 64 | .setProperties(ImmutableList.of( |
| 65 | factory.buildExpPortDescPropOpticalTransport() |
| 66 | .setPortSignalType(OFPortOpticalTransportSignalType.OTU2) |
| 67 | .setFeatures(ImmutableList.of( |
| 68 | factory.buildExpPortOpticalTransportLayerStack() |
| 69 | .setValue(ImmutableList.of( |
| 70 | factory.buildExpPortOpticalTransportLayerEntry() |
| 71 | .setLayerClass(OFPortOpticalTransportLayerClass.ODU) |
| 72 | .setSignalType((short)1) |
| 73 | .setAdaptation(OFAdaptationsType.ODUK_ODUIJ) |
| 74 | .build())) |
| 75 | .build())) |
| 76 | .build())) |
| 77 | .build())) |
| 78 | .build(); |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |