Rich Lane | b1f347d | 2013-05-16 16:39:12 -0700 | [diff] [blame] | 1 | -- binary |
| 2 | 01 15 # version / type |
| 3 | 00 50 # length |
| 4 | 12 34 56 78 # xid |
| 5 | ff fe # port |
| 6 | 00 00 00 00 00 00 # pad |
| 7 | 00 00 00 01 # queues[0].queue_id |
| 8 | 00 18 # queues[0].len |
| 9 | 00 00 # queues[0].pad |
| 10 | 00 01 # queues[0].properties[0].type |
| 11 | 00 10 # queues[0].properties[0].length |
| 12 | 00 00 00 00 # queues[0].properties[0].pad |
| 13 | 00 05 # queues[0].properties[0].rate |
| 14 | 00 00 00 00 00 00 # queues[0].properties[0].pad2 |
| 15 | 00 00 00 02 # queues[1].queue_id |
| 16 | 00 28 # queues[1].len |
| 17 | 00 00 # queues[1].pad |
| 18 | 00 01 # queues[1].properties[0].type |
| 19 | 00 10 # queues[1].properties[0].length |
| 20 | 00 00 00 00 # queues[1].properties[0].pad |
| 21 | 00 06 # queues[1].properties[0].rate |
| 22 | 00 00 00 00 00 00 # queues[1].properties[0].pad2 |
| 23 | 00 01 # queues[1].properties[1].type |
| 24 | 00 10 # queues[1].properties[1].length |
| 25 | 00 00 00 00 # queues[1].properties[1].pad |
| 26 | 00 07 # queues[1].properties[1].rate |
| 27 | 00 00 00 00 00 00 # queues[1].properties[1].pad2 |
| 28 | -- python |
| 29 | ofp.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 Lane | ccae031 | 2013-07-21 23:34:13 -0700 | [diff] [blame] | 38 | -- c |
| 39 | obj = of_queue_get_config_reply_new(OF_VERSION_1_0); |
| 40 | of_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 | } |
| 83 | of_queue_get_config_reply_xid_set(obj, 305419896); |