package frenetic

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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

type t =
  1. | Hello of Cstruct.t
  2. | ErrorMsg of Error.t
  3. | EchoRequest of Cstruct.t
  4. | EchoReply of Cstruct.t
  5. | VendorMsg of Vendor.t
  6. | SwitchFeaturesRequest
  7. | SwitchFeaturesReply of SwitchFeatures.t
  8. | FlowModMsg of FlowMod.t
  9. | PacketInMsg of packetIn
  10. | FlowRemovedMsg of flowRemoved
  11. | PortStatusMsg of PortStatus.t
  12. | PacketOutMsg of packetOut
  13. | BarrierRequest
  14. | BarrierReply
  15. | StatsRequestMsg of StatsRequest.t
  16. | StatsReplyMsg of StatsReply.t
  17. | SetConfig of SwitchConfig.t
  18. | ConfigRequestMsg
  19. | ConfigReplyMsg of SwitchConfig.t
include Ppx_sexp_conv_lib.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
val size_of : t -> int

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

val parse : Frenetic_kernel.OpenFlow_Header.t -> string -> xid * t

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

  • parameter hdr

    Header of the message to be parsed from bits.

  • parameter bits

    string containing a serialized message body.

  • returns

    (xid, message) where xid is the transaction ID.

  • raises Ignored

    if bits contains a valid OpenFlow message that the parser does not yet handle.

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.

OCaml

Innovation. Community. Security.