package frenetic

  1. Overview
  2. Docs
The Frenetic Programming Language and Runtime System

Install

Dune Dependency

Authors

Maintainers

Sources

5.0.5.tar.gz
md5=baf754df13a759c32f2c86a1b6f328da
sha512=80140900e7009ccab14b25e244fe7edab87d858676f8a4b3799b4fea16825013cf68363fe5faec71dd54ba825bb4ea2f812c2c666390948ab217ffa75d9cbd29

doc/frenetic.kernel/Frenetic_kernel/OpenFlow_Header/index.html

Module Frenetic_kernel.OpenFlow_HeaderSource

The first fields of every OpenFlow message, no matter what the version, have the same shape. This is unlikely to change in subsequent OpenFlow versions because there needs to be some standard way to determine the version of each message. So we define that here.

Types and exceptions
Sourcetype xid = Core.Int32.t
Sourceval sexp_of_xid : xid -> Ppx_sexp_conv_lib.Sexp.t
Sourceval xid_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> xid
Sourcetype t = {
  1. version : int;
  2. type_code : int;
  3. length : int;
  4. xid : xid;
}
include Ppx_sexp_conv_lib.Sexpable.S with type t := t
Sourceval t_of_sexp : Sexplib0__.Sexp.t -> t
Sourceval sexp_of_t : t -> Sexplib0__.Sexp.t
Accessors
Sourceval size : int

size returns size of standard OpenFlow header in bytes

Conversion
Sourceval parse : Cstruct.t -> t

parse pkt takes a message buffer and returns a OpenFlow_Header.t. The message buffer can be a complete OpenFlow raw message yanked from the wire - not just the header.

Sourceval marshal : Cstruct.t -> t -> unit

marshal pkt hdr fills a message buffer with the header fields of a OpenFlow_Header.t. The message buffer can be a complete OpenFlow raw message, with the other stuff possibly filled in.

Sourceval to_string : t -> string

to_string hdr gives a human-readable, printable rep of a OpenFlow_Header.t

OCaml

Innovation. Community. Security.