package frenetic
The Frenetic Programming Language and Runtime System
Install
Dune Dependency
Authors
Maintainers
Sources
5.0.5.tar.gz
md5=baf754df13a759c32f2c86a1b6f328da
sha512=80140900e7009ccab14b25e244fe7edab87d858676f8a4b3799b4fea16825013cf68363fe5faec71dd54ba825bb4ea2f812c2c666390948ab217ffa75d9cbd29
doc/src/frenetic.kernel/Net.ml.html
Source file Net.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
open Core module SDN = OpenFlow type node = | Switch of SDN.switchId | Host of Packet.dlAddr * Packet.nwAddr [@@deriving sexp, compare] module Node = struct type t = node [@@deriving sexp, compare] let to_string t = match t with | Switch(sw_id) -> Printf.sprintf "switch %Lu" sw_id | Host(dlAddr, nwAddr) -> Printf.sprintf "host %s/%s" (Packet.string_of_nwAddr nwAddr) (Packet.string_of_dlAddr dlAddr) let parse_dot _ _ = failwith "NYI: Node.parse_dot" let parse_gml _ = failwith "NYI: Node.parse_dot" let to_dot t = match t with | Switch(sw_id) -> Printf.sprintf "%s [label=SW%Lu]" (to_string t) sw_id | Host(dlAddr, nwAddr) -> Printf.sprintf "%s [label=%s]" (to_string t) (Packet.string_of_nwAddr nwAddr) let to_mininet _ = failwith "NYI: Node.to_mininet" end module Link = struct type t = unit [@@deriving sexp, compare] let to_string () = "()" let default = () let parse_dot _ = failwith "NYI: Link.parse_dot" let parse_gml _ = failwith "NYI: Link.parse_dot" let to_dot = to_string let to_mininet _ = failwith "NYI: Link.to_mininet" end module Net = Network.Make(Node)(Link)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>