File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ module OpenFlow0x01 : sig
201
201
202
202
val send_pkt_out : t -> Client_id .t -> OpenFlow0x01_Core .packetOut -> (unit , exn ) Deferred.Result .t
203
203
val barrier : t -> Client_id .t -> (unit , exn ) Result .t Deferred .t
204
+ val stats : t -> Client_id .t -> OpenFlow0x01_Core .pattern -> (OpenFlow0x01_Stats .aggregateStats , exn ) Deferred.Result .t
204
205
end
205
206
206
207
end
@@ -225,7 +226,6 @@ module OpenFlow0x04 : sig
225
226
226
227
val send_pkt_out : t -> Client_id .t -> OpenFlow0x04_Core .packetOut -> (unit , exn ) Deferred.Result .t
227
228
val barrier : t -> Client_id .t -> (unit , exn ) Result .t Deferred .t
228
-
229
229
end
230
230
231
231
end
Original file line number Diff line number Diff line change @@ -224,4 +224,15 @@ module Controller = struct
224
224
send_txn_with t sw_id M. BarrierRequest (function
225
225
| M. BarrierReply -> Result. Ok ()
226
226
| _ -> assert false )
227
+
228
+ let stats t sw_id pattern =
229
+ let open OpenFlow0x01_Stats in
230
+ let msg = AggregateRequest
231
+ { as_of_match = pattern
232
+ ; as_table_id = 0xff
233
+ ; as_out_port = None }
234
+ in
235
+ send_txn_with t sw_id (M. StatsRequestMsg msg) (function
236
+ | M. StatsReplyMsg (AggregateFlowRep r ) -> Result. Ok r
237
+ | _ -> assert false )
227
238
end
You can’t perform that action at this time.
0 commit comments