Module Frenetic_kernel.OpenFlow0x01.Message

A subset of the OpenFlow 1.0 messages defined in Section 5.1 of the specification.

type t =
| Hello of Cstruct.t
| ErrorMsg of Error.t
| EchoRequest of Cstruct.t
| EchoReply of Cstruct.t
| VendorMsg of Vendor.t
| SwitchFeaturesRequest
| SwitchFeaturesReply of SwitchFeatures.t
| FlowModMsg of FlowMod.t
| PacketInMsg of packetIn
| FlowRemovedMsg of flowRemoved
| PortStatusMsg of PortStatus.t
| PacketOutMsg of packetOut
| BarrierRequest
| BarrierReply
| StatsRequestMsg of StatsRequest.t
| StatsReplyMsg of StatsReply.t
| SetConfig of SwitchConfig.t
| ConfigRequestMsg
| ConfigReplyMsg of SwitchConfig.t
include sig ... end
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t ‑> t
val sexp_of_t : t ‑> Ppx_sexp_conv_lib.Sexp.t
val size_of : t ‑> int

size_of msg returns the size of msg in bytes when serialized.

val header_of : xid ‑> t ‑> OpenFlow_Header.t
val parse : OpenFlow_Header.t ‑> string ‑> xid * t

parse hdr bits parses the body of a message with header hdr from buffer bits.

val marshal_body : t ‑> Cstruct.t ‑> unit
val marshal : xid ‑> t ‑> string

marshal xid msg serializes msg, giving it a transaction ID xid.

val to_string : t ‑> string

to_string msg pretty-prints msg.