blob: 1016cad4197d9c6cba1abe51ec548d978f5c0a49 [file] [log] [blame]
Rich Laneb1f347d2013-05-16 16:39:12 -07001-- binary
201 15 # version / type
300 50 # length
412 34 56 78 # xid
5ff fe # port
600 00 00 00 00 00 # pad
700 00 00 01 # queues[0].queue_id
800 18 # queues[0].len
900 00 # queues[0].pad
1000 01 # queues[0].properties[0].type
1100 10 # queues[0].properties[0].length
1200 00 00 00 # queues[0].properties[0].pad
1300 05 # queues[0].properties[0].rate
1400 00 00 00 00 00 # queues[0].properties[0].pad2
1500 00 00 02 # queues[1].queue_id
1600 28 # queues[1].len
1700 00 # queues[1].pad
1800 01 # queues[1].properties[0].type
1900 10 # queues[1].properties[0].length
2000 00 00 00 # queues[1].properties[0].pad
2100 06 # queues[1].properties[0].rate
2200 00 00 00 00 00 # queues[1].properties[0].pad2
2300 01 # queues[1].properties[1].type
2400 10 # queues[1].properties[1].length
2500 00 00 00 # queues[1].properties[1].pad
2600 07 # queues[1].properties[1].rate
2700 00 00 00 00 00 # queues[1].properties[1].pad2
28-- python
29ofp.message.queue_get_config_reply(
30 xid=0x12345678,
31 port=ofp.OFPP_LOCAL,
32 queues=[
33 ofp.packet_queue(queue_id=1, properties=[
34 ofp.queue_prop_min_rate(rate=5)]),
35 ofp.packet_queue(queue_id=2, properties=[
36 ofp.queue_prop_min_rate(rate=6),
37 ofp.queue_prop_min_rate(rate=7)])])
Rich Laneccae0312013-07-21 23:34:13 -070038-- c
39obj = of_queue_get_config_reply_new(OF_VERSION_1_0);
40of_queue_get_config_reply_port_set(obj, 65534);
41{
42 of_object_t list;
43 of_queue_get_config_reply_queues_bind(obj, &list);
44 {
45 of_object_t *obj = of_packet_queue_new(OF_VERSION_1_0);
46 {
47 of_object_t list;
48 of_packet_queue_properties_bind(obj, &list);
49 {
50 of_object_t *obj = of_queue_prop_min_rate_new(OF_VERSION_1_0);
51 of_queue_prop_min_rate_rate_set(obj, 5);
52 of_list_append(&list, obj);
53 of_object_delete(obj);
54 }
55 }
56 of_packet_queue_queue_id_set(obj, 1);
57 of_list_append(&list, obj);
58 of_object_delete(obj);
59 }
60 {
61 of_object_t *obj = of_packet_queue_new(OF_VERSION_1_0);
62 {
63 of_object_t list;
64 of_packet_queue_properties_bind(obj, &list);
65 {
66 of_object_t *obj = of_queue_prop_min_rate_new(OF_VERSION_1_0);
67 of_queue_prop_min_rate_rate_set(obj, 6);
68 of_list_append(&list, obj);
69 of_object_delete(obj);
70 }
71 {
72 of_object_t *obj = of_queue_prop_min_rate_new(OF_VERSION_1_0);
73 of_queue_prop_min_rate_rate_set(obj, 7);
74 of_list_append(&list, obj);
75 of_object_delete(obj);
76 }
77 }
78 of_packet_queue_queue_id_set(obj, 2);
79 of_list_append(&list, obj);
80 of_object_delete(obj);
81 }
82}
83of_queue_get_config_reply_xid_set(obj, 305419896);