Rob Vaterlaus | ca1978e | 2013-10-01 20:47:03 -0700 | [diff] [blame] | 1 | -- binary |
| 2 | 04 01 # version / type |
| 3 | 00 0f # length |
| 4 | 12 34 56 78 # xid |
| 5 | 00 04 # err_type |
| 6 | 00 08 # code |
| 7 | 61 62 63 # data |
| 8 | -- python |
| 9 | ofp.message.bad_match_error_msg( |
| 10 | xid=0x12345678, |
| 11 | code=ofp.OFPBMC_BAD_MASK, |
| 12 | data="abc") |
| 13 | -- c |
| 14 | obj = of_bad_match_error_msg_new(OF_VERSION_1_3); |
Rob Vaterlaus | 1932960 | 2013-10-01 20:57:38 -0700 | [diff] [blame] | 15 | of_bad_match_error_msg_xid_set(obj, 0x12345678); |
Rob Vaterlaus | ca1978e | 2013-10-01 20:47:03 -0700 | [diff] [blame] | 16 | of_bad_match_error_msg_code_set(obj, OF_MATCH_FAILED_BAD_MASK_BY_VERSION(OF_VERSION_1_3)); |
| 17 | of_octets_t data = { .bytes=3, .data=(uint8_t *)"\x61\x62\x63" }; |
| 18 | of_bad_match_error_msg_data_set(obj, &data); |
| 19 | -- java |
| 20 | builder.setXid(0x12345678) |
| 21 | .setCode(OFBadMatchCode.BAD_MASK) |
| 22 | .setData(new byte[] { 0x61, 0x62, 0x63 }); |