Rich Lane | 9a3f1fd | 2013-05-10 16:29:17 -0700 | [diff] [blame] | 1 | -- binary |
| 2 | 01 02 # version / type |
| 3 | 00 0b # length |
| 4 | 12 34 56 78 # xid |
| 5 | 61 62 01 # data |
| 6 | -- python |
| 7 | ofp.message.echo_request(xid=0x12345678, data="ab\x01") |
| 8 | -- python pretty-printer |
| 9 | echo_request { xid = 0x12345678, data = 'ab\x01' } |
Rich Lane | ccae031 | 2013-07-21 23:34:13 -0700 | [diff] [blame] | 10 | -- c |
| 11 | obj = of_echo_request_new(OF_VERSION_1_0); |
| 12 | of_echo_request_xid_set(obj, 0x12345678); |
| 13 | { |
| 14 | of_octets_t data = { .data=(uint8_t *)"ab\x01", .bytes=3 }; |
| 15 | of_echo_request_data_set(obj, &data); |
| 16 | } |