Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Of0x05 #160

Open
wants to merge 17 commits into
base: of0x05
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _oasis
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Library openflow
OpenFlow0x01_Stats,
OpenFlow0x04,
OpenFlow0x04_Core,
OpenFlow0x05,
OpenFlow0x05_Core,
SDN_OpenFlow0x01,
SDN_OpenFlow0x04,
GroupTable0x04,
Expand Down Expand Up @@ -83,6 +85,7 @@ Library quickcheck
Arbitrary_OpenFlow,
Arbitrary_OpenFlow0x01,
Arbitrary_OpenFlow0x04,
Arbitrary_OpenFlow0x05,
Arbitrary_SDN_Types

Executable testtool
Expand Down
6 changes: 6 additions & 0 deletions lib/OpenFlow0x04.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2316,6 +2316,8 @@ end

module Action = struct

type t = action

type sequence = OpenFlow0x04_Core.actionSequence

let sizeof (act : action) : int = match act with
Expand Down Expand Up @@ -2919,6 +2921,8 @@ end

module Instruction = struct

type t = instruction

let to_string ins =
match ins with
| GotoTable t -> Format.sprintf "Go to Table = %u" t
Expand Down Expand Up @@ -3038,6 +3042,8 @@ end

module Instructions = struct

type t = instruction list

let sizeof (inss : instruction list) : int =
sum (map Instruction.sizeof inss)

Expand Down
22 changes: 14 additions & 8 deletions lib/OpenFlow0x04.mli
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ end

module Action : sig

type t = action

type sequence = OpenFlow0x04_Core.actionSequence

val sizeof : action -> int
Expand Down Expand Up @@ -215,25 +217,29 @@ end

module Instruction : sig

val to_string : instruction -> string
type t = instruction

val sizeof : instruction -> int
val to_string : t -> string

val marshal : Cstruct.t -> instruction -> int
val sizeof : t -> int

val marshal : Cstruct.t -> t -> int

val parse : Cstruct.t -> instruction
val parse : Cstruct.t -> t

end

module Instructions : sig

val sizeof : instruction list -> int
type t = instruction list

val marshal : Cstruct.t -> instruction list -> int
val sizeof : t -> int

val to_string : instruction list -> string
val marshal : Cstruct.t -> t -> int

val parse : Cstruct.t -> instruction list
val to_string : t -> string

val parse : Cstruct.t -> t

end

Expand Down
Loading