Skip to content

Commit 3e31cce

Browse files
committed
get_switches
1 parent 4d8f945 commit 3e31cce

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

async/Async_OpenFlow.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ module OpenFlow0x01 : sig
184184
open OpenFlow0x01_Core
185185
open OpenFlow0x01_Stats
186186

187+
val get_switches : t -> SDN_Types.switchId list
188+
187189
val clear_flows
188190
: ?pattern:pattern -> t -> Client_id.t
189191
-> (unit, exn) Deferred.Result.t

async/Async_OpenFlow0x01.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ module Controller = struct
8484
let c_id = client_id_of_switch_exn t sw_id in
8585
ChunkController.has_client_id t.sub c_id
8686

87+
let get_switches t = SwitchMap.keys t.s2c
88+
8789
let send t sw_id msg =
8890
let c_id = client_id_of_switch_exn t sw_id in
8991
ChunkController.send t.sub c_id (Message.marshal' msg)

0 commit comments

Comments
 (0)