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 01 # err_type |
| 6 | 00 08 # code |
| 7 | 61 62 63 # data |
| 8 | -- python |
| 9 | ofp.message.bad_request_error_msg( |
| 10 | xid=0x12345678, |
| 11 | code=ofp.OFPBRC_BUFFER_UNKNOWN, |
| 12 | data="abc") |
| 13 | -- c |
| 14 | obj = of_bad_request_error_msg_new(OF_VERSION_1_3); |
Rob Vaterlaus | 1932960 | 2013-10-01 20:57:38 -0700 | [diff] [blame] | 15 | of_bad_request_error_msg_xid_set(obj, 0x12345678); |
Rob Vaterlaus | ca1978e | 2013-10-01 20:47:03 -0700 | [diff] [blame] | 16 | of_bad_request_error_msg_code_set(obj, OF_REQUEST_FAILED_BUFFER_UNKNOWN_BY_VERSION(OF_VERSION_1_3)); |
| 17 | of_octets_t data = { .bytes=3, .data=(uint8_t *)"\x61\x62\x63" }; |
| 18 | of_bad_request_error_msg_data_set(obj, &data); |
| 19 | -- java |
| 20 | builder.setXid(0x12345678) |
| 21 | .setCode(OFBadRequestCode.BUFFER_UNKNOWN) |
Andreas Wundsam | 62cbcff | 2014-05-09 16:35:00 -0700 | [diff] [blame] | 22 | .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_13)); |