Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 1 | -- binary |
| 2 | 04 13 # version, type |
| 3 | 00 38 # length |
| 4 | 12 34 56 78 # xid |
| 5 | ff ff # stats_type |
| 6 | 00 00 # flags |
| 7 | 00 00 00 00 # pad |
| 8 | 00 5c 16 c7 # experimenter |
| 9 | 00 00 00 05 # subtype |
| 10 | 88 77 66 55 44 33 22 11 FF EE DD CC BB AA 99 88 # entries[0].checksum |
| 11 | 12 34 23 45 34 56 45 67 56 78 67 89 78 9A 89 AB # entries[1].checksum |
| 12 | -- python |
| 13 | ofp.message.bsn_gentable_bucket_stats_reply( |
| 14 | xid=0x12345678, |
| 15 | entries=[ |
| 16 | ofp.bsn_gentable_bucket_stats_entry( |
| 17 | checksum=0x8877665544332211FFEEDDCCBBAA9988), |
| 18 | ofp.bsn_gentable_bucket_stats_entry( |
| 19 | checksum=0x123423453456456756786789789A89AB), |
| 20 | ]) |
| 21 | -- java |
| 22 | builder.setXid(0x12345678) |
| 23 | .setEntries( |
| 24 | ImmutableList.<OFBsnGentableBucketStatsEntry>of( |
Andreas Wundsam | 7c15b17 | 2014-04-24 19:02:40 -0700 | [diff] [blame] | 25 | factory.bsnGentableBucketStatsEntry(U128.of(0x8877665544332211L, 0xFFEEDDCCBBAA9988L)), |
| 26 | factory.bsnGentableBucketStatsEntry(U128.of(0x1234234534564567L, 0x56786789789A89ABL)) |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 27 | ) |
| 28 | ) |
| 29 | -- c |
| 30 | obj = of_bsn_gentable_bucket_stats_reply_new(OF_VERSION_1_3); |
| 31 | of_bsn_gentable_bucket_stats_reply_xid_set(obj, 0x12345678); |
| 32 | { |
| 33 | of_object_t *list = of_list_bsn_gentable_bucket_stats_entry_new(OF_VERSION_1_3); |
| 34 | { |
| 35 | of_object_t *entry = of_bsn_gentable_bucket_stats_entry_new(OF_VERSION_1_3); |
| 36 | { |
| 37 | of_checksum_128_t checksum = { 0x8877665544332211L, 0xFFEEDDCCBBAA9988L }; |
| 38 | of_bsn_gentable_bucket_stats_entry_checksum_set(entry, checksum); |
| 39 | } |
| 40 | of_list_append(list, entry); |
| 41 | of_object_delete(entry); |
| 42 | } |
| 43 | { |
| 44 | of_object_t *entry = of_bsn_gentable_bucket_stats_entry_new(OF_VERSION_1_3); |
| 45 | { |
| 46 | of_checksum_128_t checksum = { 0x1234234534564567L, 0x56786789789A89ABL }; |
| 47 | of_bsn_gentable_bucket_stats_entry_checksum_set(entry, checksum); |
| 48 | } |
| 49 | of_list_append(list, entry); |
| 50 | of_object_delete(entry); |
| 51 | } |
| 52 | of_bsn_gentable_bucket_stats_reply_entries_set(obj, list); |
| 53 | of_object_delete(list); |
| 54 | } |