Module Frenetic_netkat.Fdd.Field

type t =
| Switch
| Location
| From
| AbstractLoc
| VSwitch
| VPort
| Vlan
| VlanPcp
| Meta0
| Meta1
| Meta2
| Meta3
| Meta4
| EthType
| IPProto
| EthSrc
| EthDst
| IP4Src
| IP4Dst
| TCPSrcPort
| TCPDstPort
| VFabric

Fields are analogous to binary variables in a BDD. These are pretty much the same as matchable fields in OpenFlow. To this list, we add VSwitch, VPort and VFabric for the virtual compiler. These are not actual matchable fields in OpenFlow, but are converted to Switch and Port in the compilation process.

The constructors in type t are listed in the default order, which is acceptable for many NetKAT programs.

This module implements the the HashCmp signature from the Vlr package, so it becomes the "V" in VLR.

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 all : t list
val hash_fold_t : Ppx_hash_lib.Std.Hash.state ‑> t ‑> Ppx_hash_lib.Std.Hash.state
val hash : t ‑> Ppx_hash_lib.Std.Hash.hash_value
type field = t
include Vlr.HashCmp with type t := t
val equal : t ‑> t ‑> Ppx_deriving_runtime.bool
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t ‑> t
val sexp_of_t : t ‑> Ppx_sexp_conv_lib.Sexp.t
val compare : t ‑> t ‑> int
val hash_fold_t : Ppx_hash_lib.Std.Hash.state ‑> t ‑> Ppx_hash_lib.Std.Hash.state
val hash : t ‑> Ppx_hash_lib.Std.Hash.hash_value
val to_string : t ‑> string
module Env : sig ... end

environment, mapping meta field identifiers to static FDD fields, and, for convenience, the initializer and mutability of the identifier

val all : t list

all returns the default field field ordering

val compare : t ‑> t ‑> int

compare f1 f2 compares two fields in the current ordering in the usual way.

val equal : t ‑> t ‑> bool
val of_hv : ?⁠env:Env.t ‑> Syntax.header_val ‑> t

of_hv header_value converts a NetKAT header_value pair to a field

val of_string : string ‑> t

of_string str converts a field string to an abstract field. Throws an exception for unrecognized strings.

val to_string : t ‑> string

to_string field returns a human-readable representation

val set_order : t list ‑> unit

set_order field_list sets the field ordering to the given list. Any non-listed fields are given low priority in random order.

val get_order : unit ‑> t list

get_order returns the current field ordering. All fields are returned.

val auto_order : Syntax.policy ‑> unit

auto_order policy heurisitically determines the field ordering given a policy