Rich Lane | c9fc57d | 2013-05-16 16:39:12 -0700 | [diff] [blame] | 1 | -- binary |
| 2 | 04 0c # version, type |
| 3 | 00 50 # length |
| 4 | 12 34 56 78 # xid |
| 5 | 02 # reason |
| 6 | 00 00 00 00 00 00 00 # pad |
| 7 | 00 00 00 04 # port_no |
| 8 | 00 00 00 00 # pad |
| 9 | 01 02 03 04 05 06 # hw_addr |
| 10 | 00 00 # pad |
| 11 | 66 6f 6f 00 00 00 00 00 # name |
| 12 | 00 00 00 00 00 00 00 00 # ... |
| 13 | 00 00 00 24 # config |
| 14 | 00 00 00 02 # state |
| 15 | 00 00 00 01 # curr |
| 16 | 00 00 00 02 # advertised |
| 17 | 00 00 00 04 # supported |
| 18 | 00 00 00 08 # peer |
| 19 | 00 00 00 0a # curr_speed |
| 20 | 00 00 00 14 # max_speed |
| 21 | -- python |
| 22 | ofp.message.port_status( |
| 23 | xid=0x12345678, |
| 24 | reason=ofp.OFPPR_MODIFY, |
| 25 | desc=ofp.port_desc( |
| 26 | port_no=4, |
| 27 | hw_addr=[1,2,3,4,5,6], |
| 28 | name="foo", |
| 29 | config=ofp.OFPPC_NO_FWD|ofp.OFPPC_NO_RECV, |
| 30 | state=ofp.OFPPS_BLOCKED, |
| 31 | curr=ofp.OFPPF_10MB_HD, |
| 32 | advertised=ofp.OFPPF_10MB_FD, |
| 33 | supported=ofp.OFPPF_100MB_HD, |
| 34 | peer=ofp.OFPPF_100MB_FD, |
| 35 | curr_speed=10, |
| 36 | max_speed=20)) |