blob: 71adefa14fa3bea9cf8245524925bb067cee6b86 [file] [log] [blame]
Rob Vaterlausca1978e2013-10-01 20:47:03 -07001-- binary
204 01 # version / type
300 0f # length
412 34 56 78 # xid
500 01 # err_type
600 08 # code
761 62 63 # data
8-- python
9ofp.message.bad_request_error_msg(
10 xid=0x12345678,
11 code=ofp.OFPBRC_BUFFER_UNKNOWN,
12 data="abc")
13-- c
14obj = of_bad_request_error_msg_new(OF_VERSION_1_3);
Rob Vaterlaus19329602013-10-01 20:57:38 -070015of_bad_request_error_msg_xid_set(obj, 0x12345678);
Rob Vaterlausca1978e2013-10-01 20:47:03 -070016of_bad_request_error_msg_code_set(obj, OF_REQUEST_FAILED_BUFFER_UNKNOWN_BY_VERSION(OF_VERSION_1_3));
17of_octets_t data = { .bytes=3, .data=(uint8_t *)"\x61\x62\x63" };
18of_bad_request_error_msg_data_set(obj, &data);
19-- java
20builder.setXid(0x12345678)
21 .setCode(OFBadRequestCode.BUFFER_UNKNOWN)
Andreas Wundsam62cbcff2014-05-09 16:35:00 -070022 .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_13));