Skip to content

Commit 6761813

Browse files
committed
multi: expose send_flow_mods in versioned controllers
1 parent 5f4296f commit 6761813

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

async/Async_OpenFlow.mli

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,15 @@ module OpenFlow0x01 : sig
196196
include Platform.CTL
197197
with type t := t
198198

199-
(* val clear_flows : t -> SDN.Pattern.t -> Client_id.t -> (unit, exn) Deferred.Result.t *)
199+
open OpenFlow0x01_Core
200+
open OpenFlow0x01_Stats
201+
200202
val clear_table : t -> Client_id.t -> (unit, exn) Deferred.Result.t
203+
val send_flow_mods : ?clear:bool -> t -> Client_id.t -> flowMod list -> (unit, exn) Deferred.Result.t
201204

202-
val send_pkt_out : t -> Client_id.t -> OpenFlow0x01_Core.packetOut -> (unit, exn) Deferred.Result.t
205+
val send_pkt_out : t -> Client_id.t -> packetOut -> (unit, exn) Deferred.Result.t
203206
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
207+
val stats : t -> Client_id.t -> pattern -> (aggregateStats, exn) Deferred.Result.t
205208
end
206209

207210
end
@@ -220,11 +223,12 @@ module OpenFlow0x04 : sig
220223
include Platform.CTL
221224
with type t := t
222225

226+
open OpenFlow0x04_Core
223227

224-
(* val clear_flows : t -> Pattern.t -> Client_id.t -> (unit, exn) Deferred.Result.t *)
225228
val clear_table : t -> Client_id.t -> (unit, exn) Deferred.Result.t
229+
val send_flow_mods : ?clear:bool -> t -> Client_id.t -> flowMod list -> (unit, exn) Deferred.Result.t
226230

227-
val send_pkt_out : t -> Client_id.t -> OpenFlow0x04_Core.packetOut -> (unit, exn) Deferred.Result.t
231+
val send_pkt_out : t -> Client_id.t -> packetOut -> (unit, exn) Deferred.Result.t
228232
val barrier : t -> Client_id.t -> (unit, exn) Result.t Deferred.t
229233
end
230234

async/Async_OpenFlow0x01.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,6 @@ module Controller = struct
201201
let open ChunkController in
202202
listen_pipe t (run (handshake 0x01) t.sub (listen t.sub))
203203

204-
let clear_flows (t : t) (pattern : SDN_Types.Pattern.t) (sw_id : Client_id.t) =
205-
failwith "NYI: OF0x01.clear_flows"
206-
207204
let clear_table (t : t) (sw_id : Client_id.t) =
208205
send_result t sw_id (0l, M.FlowModMsg (C.delete_all_flows))
209206

async/Async_OpenFlow0x04.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,6 @@ module Controller = struct
233233
let open ChunkController in
234234
listen_pipe t (run (handshake 0x04) t.sub (listen t.sub))
235235

236-
let clear_flows (t : t) (pattern : SDN_Types.Pattern.t) (sw_id : Client_id.t) =
237-
failwith "NYI: OF0x04.clear_flows"
238-
239236
let clear_table (t : t) (sw_id : Client_id.t) =
240237
let flows = send_result t sw_id (0l, M.FlowModMsg C.delete_all_flows) in
241238
let groups = send_result t sw_id (0l, M.GroupModMsg C.delete_all_groups) in

0 commit comments

Comments
 (0)