blob: 84a36a616725f182c80da500ad96655e4f160ae3 [file] [log] [blame]
Rich Lane1ac43002013-12-03 12:56:35 -08001-- binary
204 13 # version, type
300 38 # length
412 34 56 78 # xid
5ff ff # stats_type
600 00 # flags
700 00 00 00 # pad
800 5c 16 c7 # experimenter
900 00 00 05 # subtype
1088 77 66 55 44 33 22 11 FF EE DD CC BB AA 99 88 # entries[0].checksum
1112 34 23 45 34 56 45 67 56 78 67 89 78 9A 89 AB # entries[1].checksum
12-- python
13ofp.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
22builder.setXid(0x12345678)
23 .setEntries(
24 ImmutableList.<OFBsnGentableBucketStatsEntry>of(
Andreas Wundsam7c15b172014-04-24 19:02:40 -070025 factory.bsnGentableBucketStatsEntry(U128.of(0x8877665544332211L, 0xFFEEDDCCBBAA9988L)),
26 factory.bsnGentableBucketStatsEntry(U128.of(0x1234234534564567L, 0x56786789789A89ABL))
Rich Lane1ac43002013-12-03 12:56:35 -080027 )
28 )
29-- c
30obj = of_bsn_gentable_bucket_stats_reply_new(OF_VERSION_1_3);
31of_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}