Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 1 | -- binary |
| 2 | 04 13 # version, type |
Rich Lane | 7b2a8b6 | 2014-01-02 14:00:49 -0800 | [diff] [blame] | 3 | 00 78 # length |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 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 04 # subtype |
| 10 | |
| 11 | # entries[0] |
Rich Lane | 7b2a8b6 | 2014-01-02 14:00:49 -0800 | [diff] [blame] | 12 | 00 30 # length |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 13 | 00 00 # table id |
| 14 | 74 61 62 6c 65 20 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 # name |
| 15 | 00 00 00 20 # buckets_size |
Rich Lane | 7b2a8b6 | 2014-01-02 14:00:49 -0800 | [diff] [blame] | 16 | 00 00 00 40 # max_entries |
| 17 | 00 00 00 00 # pad |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 18 | |
| 19 | # entries[1] |
Rich Lane | 7b2a8b6 | 2014-01-02 14:00:49 -0800 | [diff] [blame] | 20 | 00 30 # length |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 21 | 00 01 # table id |
| 22 | 74 61 62 6c 65 20 31 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e # name |
| 23 | 00 00 00 40 # buckets_size |
Rich Lane | 7b2a8b6 | 2014-01-02 14:00:49 -0800 | [diff] [blame] | 24 | 00 00 00 80 # max_entries |
| 25 | 00 00 00 00 # pad |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 26 | -- python |
| 27 | ofp.message.bsn_gentable_desc_stats_reply( |
| 28 | xid=0x12345678, |
| 29 | entries=[ |
| 30 | ofp.bsn_gentable_desc_stats_entry( |
| 31 | table_id=0, |
| 32 | name="table 0", |
Rich Lane | 7b2a8b6 | 2014-01-02 14:00:49 -0800 | [diff] [blame] | 33 | buckets_size=32, |
| 34 | max_entries=64), |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 35 | ofp.bsn_gentable_desc_stats_entry( |
| 36 | table_id=1, |
| 37 | name="table 1".ljust(32, '.'), |
Rich Lane | 7b2a8b6 | 2014-01-02 14:00:49 -0800 | [diff] [blame] | 38 | buckets_size=64, |
| 39 | max_entries=128), |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 40 | ]) |
| 41 | -- java |
| 42 | builder.setXid(0x12345678) |
| 43 | .setEntries( |
| 44 | ImmutableList.<OFBsnGentableDescStatsEntry>of( |
| 45 | factory.buildBsnGentableDescStatsEntry() |
Andreas Wundsam | d4b2269 | 2014-01-14 14:17:26 -0800 | [diff] [blame] | 46 | .setTableId(GenTableId.of(0)) |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 47 | .setName("table 0") |
| 48 | .setBucketsSize(32) |
Rich Lane | 7b2a8b6 | 2014-01-02 14:00:49 -0800 | [diff] [blame] | 49 | .setMaxEntries(64) |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 50 | .build(), |
| 51 | factory.buildBsnGentableDescStatsEntry() |
Andreas Wundsam | d4b2269 | 2014-01-14 14:17:26 -0800 | [diff] [blame] | 52 | .setTableId(GenTableId.of(1)) |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 53 | .setName("table 1.........................") |
| 54 | .setBucketsSize(64) |
Rich Lane | 7b2a8b6 | 2014-01-02 14:00:49 -0800 | [diff] [blame] | 55 | .setMaxEntries(128) |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 56 | .build() |
| 57 | ) |
| 58 | ) |
| 59 | -- c |
| 60 | obj = of_bsn_gentable_desc_stats_reply_new(OF_VERSION_1_3); |
| 61 | of_bsn_gentable_desc_stats_reply_xid_set(obj, 0x12345678); |
| 62 | { |
| 63 | of_object_t *list = of_list_bsn_gentable_desc_stats_entry_new(OF_VERSION_1_3); |
| 64 | { |
| 65 | of_table_name_t name = "table 0"; |
| 66 | of_object_t *entry = of_bsn_gentable_desc_stats_entry_new(OF_VERSION_1_3); |
| 67 | of_bsn_gentable_desc_stats_entry_table_id_set(entry, 0); |
| 68 | of_bsn_gentable_desc_stats_entry_name_set(entry, name); |
| 69 | of_bsn_gentable_desc_stats_entry_buckets_size_set(entry, 32); |
Rich Lane | 7b2a8b6 | 2014-01-02 14:00:49 -0800 | [diff] [blame] | 70 | of_bsn_gentable_desc_stats_entry_max_entries_set(entry, 64); |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 71 | of_list_append(list, entry); |
| 72 | of_object_delete(entry); |
| 73 | } |
| 74 | { |
| 75 | of_table_name_t name = "table 1........................."; |
| 76 | of_object_t *entry = of_bsn_gentable_desc_stats_entry_new(OF_VERSION_1_3); |
| 77 | of_bsn_gentable_desc_stats_entry_table_id_set(entry, 1); |
| 78 | of_bsn_gentable_desc_stats_entry_name_set(entry, name); |
| 79 | of_bsn_gentable_desc_stats_entry_buckets_size_set(entry, 64); |
Rich Lane | 7b2a8b6 | 2014-01-02 14:00:49 -0800 | [diff] [blame] | 80 | of_bsn_gentable_desc_stats_entry_max_entries_set(entry, 128); |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 81 | of_list_append(list, entry); |
| 82 | of_object_delete(entry); |
| 83 | } |
| 84 | of_bsn_gentable_desc_stats_reply_entries_set(obj, list); |
| 85 | of_object_delete(list); |
| 86 | } |