blob: cd4ab626b3729496717f3c578d74faa5d4d01c11 [file] [log] [blame]
Rich Lane1ac43002013-12-03 12:56:35 -08001-- binary
204 13 # version, type
300 60 # 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 03 # subtype
10
11# entries[0]
1200 24 # length
1300 08 # key_length
1400 00 # key[0].type
1500 08 # key[0].length
1600 00 00 05 # key[0].value
1700 02 # stats[0].type
1800 0c # stats[0].length
1900 00 00 00 00 00 00 64 # stats[0].value
2000 03 # stats[0].type
2100 0c # stats[0].length
2200 00 00 00 00 00 00 65 # stats[0].value
23
24# entries[1]
2500 24 # length
2600 08 # key_length
2700 00 # key[0].type
2800 08 # key[0].length
2900 00 00 06 # key[0].value
3000 02 # stats[0].type
3100 0c # stats[0].length
3200 00 00 00 00 00 00 64 # stats[0].value
3300 03 # stats[0].type
3400 0c # stats[0].length
3500 00 00 00 00 00 00 65 # stats[0].value
36-- python
37ofp.message.bsn_gentable_entry_stats_reply(
38 xid=0x12345678,
39 entries=[
40 ofp.bsn_gentable_entry_stats_entry(
41 key=[
42 ofp.bsn_tlv.port(5),
43 ],
44 stats=[
45 ofp.bsn_tlv.rx_packets(100),
46 ofp.bsn_tlv.tx_packets(101),
47 ]),
48 ofp.bsn_gentable_entry_stats_entry(
49 key=[
50 ofp.bsn_tlv.port(6),
51 ],
52 stats=[
53 ofp.bsn_tlv.rx_packets(100),
54 ofp.bsn_tlv.tx_packets(101),
55 ]),
56 ])
57-- java
58builder.setXid(0x12345678)
59 .setEntries(
60 ImmutableList.<OFBsnGentableEntryStatsEntry>of(
61 factory.bsnGentableEntryStatsEntry(
62 ImmutableList.<OFBsnTlv>of(
63 factory.bsnTlvPort(OFPort.of(5))
64 ),
65 ImmutableList.<OFBsnTlv>of(
66 factory.bsnTlvRxPackets(U64.of(100)),
67 factory.bsnTlvTxPackets(U64.of(101))
68 )
69 ),
70 factory.bsnGentableEntryStatsEntry(
71 ImmutableList.<OFBsnTlv>of(
72 factory.bsnTlvPort(OFPort.of(6))
73 ),
74 ImmutableList.<OFBsnTlv>of(
75 factory.bsnTlvRxPackets(U64.of(100)),
76 factory.bsnTlvTxPackets(U64.of(101))
77 )
78 )
79 )
80 )
81-- c
82obj = of_bsn_gentable_entry_stats_reply_new(OF_VERSION_1_3);
83of_bsn_gentable_entry_stats_reply_xid_set(obj, 0x12345678);
84{
85 of_object_t *list = of_list_bsn_gentable_entry_stats_entry_new(OF_VERSION_1_3);
86 {
87 of_object_t *entry = of_bsn_gentable_entry_stats_entry_new(OF_VERSION_1_3);
88 {
89 of_object_t *tlvs = of_list_bsn_tlv_new(OF_VERSION_1_3);
90 {
91 of_object_t *tlv = of_bsn_tlv_port_new(OF_VERSION_1_3);
92 of_bsn_tlv_port_value_set(tlv, 5);
93 of_list_append(tlvs, tlv);
94 of_object_delete(tlv);
95 }
96 of_bsn_gentable_entry_stats_entry_key_set(entry, tlvs);
97 of_object_delete(tlvs);
98 }
99 {
100 of_object_t *tlvs = of_list_bsn_tlv_new(OF_VERSION_1_3);
101 {
102 of_object_t *tlv = of_bsn_tlv_rx_packets_new(OF_VERSION_1_3);
103 of_bsn_tlv_rx_packets_value_set(tlv, 100);
104 of_list_append(tlvs, tlv);
105 of_object_delete(tlv);
106 }
107 {
108 of_object_t *tlv = of_bsn_tlv_tx_packets_new(OF_VERSION_1_3);
109 of_bsn_tlv_tx_packets_value_set(tlv, 101);
110 of_list_append(tlvs, tlv);
111 of_object_delete(tlv);
112 }
113 of_bsn_gentable_entry_stats_entry_stats_set(entry, tlvs);
114 of_object_delete(tlvs);
115 }
116 of_list_append(list, entry);
117 of_object_delete(entry);
118 }
119 {
120 of_object_t *entry = of_bsn_gentable_entry_stats_entry_new(OF_VERSION_1_3);
121 {
122 of_object_t *tlvs = of_list_bsn_tlv_new(OF_VERSION_1_3);
123 {
124 of_object_t *tlv = of_bsn_tlv_port_new(OF_VERSION_1_3);
125 of_bsn_tlv_port_value_set(tlv, 6);
126 of_list_append(tlvs, tlv);
127 of_object_delete(tlv);
128 }
129 of_bsn_gentable_entry_stats_entry_key_set(entry, tlvs);
130 of_object_delete(tlvs);
131 }
132 {
133 of_object_t *tlvs = of_list_bsn_tlv_new(OF_VERSION_1_3);
134 {
135 of_object_t *tlv = of_bsn_tlv_rx_packets_new(OF_VERSION_1_3);
136 of_bsn_tlv_rx_packets_value_set(tlv, 100);
137 of_list_append(tlvs, tlv);
138 of_object_delete(tlv);
139 }
140 {
141 of_object_t *tlv = of_bsn_tlv_tx_packets_new(OF_VERSION_1_3);
142 of_bsn_tlv_tx_packets_value_set(tlv, 101);
143 of_list_append(tlvs, tlv);
144 of_object_delete(tlv);
145 }
146 of_bsn_gentable_entry_stats_entry_stats_set(entry, tlvs);
147 of_object_delete(tlvs);
148 }
149 of_list_append(list, entry);
150 of_object_delete(entry);
151 }
152 of_bsn_gentable_entry_stats_reply_entries_set(obj, list);
153 of_object_delete(list);
154}