package frenetic

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

Module Frenetic_netkat.SyntaxSource

NetKAT Syntax

The NetKAT language is central to Frenetic, and we factor out the central types here. The big actors on NetKAT structures are Compiler which compiles NetKAT into flow tables, Parser which turns NetKAT strings (e.g "TcpSrcPort(8080); port := 2") into NetKAT, and Json which turns JSON-formatted NetKAT into NetKAT

Sourceexception Non_local

Basics

Sourceval sexp_of_switchId : switchId -> Ppx_sexp_conv_lib.Sexp.t
Sourceval switchId_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> switchId
Sourceval compare_switchId : switchId -> switchId -> int
Sourceval sexp_of_portId : portId -> Ppx_sexp_conv_lib.Sexp.t
Sourceval portId_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> portId
Sourceval compare_portId : portId -> portId -> int
Sourceval sexp_of_payload : payload -> Ppx_sexp_conv_lib.Sexp.t
Sourceval payload_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> payload
Sourcetype vswitchId = int64
Sourceval sexp_of_vswitchId : vswitchId -> Ppx_sexp_conv_lib.Sexp.t
Sourceval vswitchId_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> vswitchId
Sourceval compare_vswitchId : vswitchId -> vswitchId -> int
Sourcetype vportId = int64
Sourceval sexp_of_vportId : vportId -> Ppx_sexp_conv_lib.Sexp.t
Sourceval vportId_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> vportId
Sourceval compare_vportId : vportId -> vportId -> int
Sourcetype vfabricId = int64
Sourceval sexp_of_vfabricId : vfabricId -> Ppx_sexp_conv_lib.Sexp.t
Sourceval vfabricId_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> vfabricId
Sourceval compare_vfabricId : vfabricId -> vfabricId -> int
Sourcetype metaId = string
Sourceval sexp_of_metaId : metaId -> Ppx_sexp_conv_lib.Sexp.t
Sourceval metaId_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> metaId
Sourceval compare_metaId : metaId -> metaId -> int
Sourcetype abstract_location = string
Sourceval sexp_of_abstract_location : abstract_location -> Ppx_sexp_conv_lib.Sexp.t
Sourceval abstract_location_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> abstract_location
Sourceval compare_abstract_location : abstract_location -> abstract_location -> int

Policies

Sourceval string_of_fastfail : int32 list -> string
Sourcetype location =
  1. | Physical of int32
  2. | FastFail of int32 list
  3. | Pipe of string
  4. | Query of string
Sourceval sexp_of_location : location -> Ppx_sexp_conv_lib.Sexp.t
Sourceval location_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> location
Sourceval compare_location : location -> location -> int
Sourcetype header_val =
  1. | Switch of switchId
  2. | Location of location
  3. | EthSrc of Frenetic_kernel.Packet.dlAddr
  4. | EthDst of Frenetic_kernel.Packet.dlAddr
  5. | Vlan of Frenetic_kernel.Packet.int16
  6. | VlanPcp of Frenetic_kernel.Packet.dlVlanPcp
  7. | EthType of Frenetic_kernel.Packet.dlTyp
  8. | IPProto of Frenetic_kernel.Packet.nwProto
  9. | IP4Src of Frenetic_kernel.Packet.nwAddr * int32
  10. | IP4Dst of Frenetic_kernel.Packet.nwAddr * int32
  11. | TCPSrcPort of Frenetic_kernel.Packet.tpPort
  12. | TCPDstPort of Frenetic_kernel.Packet.tpPort
  13. | VSwitch of vswitchId
  14. | VPort of vportId
  15. | VFabric of vfabricId
  16. | Meta of metaId * int64
  17. | From of abstract_location
  18. | AbstractLoc of abstract_location
Sourceval sexp_of_header_val : header_val -> Ppx_sexp_conv_lib.Sexp.t
Sourceval header_val_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> header_val
Sourcetype pred =
  1. | True
  2. | False
  3. | Test of header_val
  4. | And of pred * pred
  5. | Or of pred * pred
  6. | Neg of pred
Sourceval sexp_of_pred : pred -> Ppx_sexp_conv_lib.Sexp.t
Sourceval pred_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pred
Sourcetype meta_init =
  1. | Alias of header_val
  2. | Const of int64
Sourceval sexp_of_meta_init : meta_init -> Ppx_sexp_conv_lib.Sexp.t
Sourceval meta_init_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> meta_init
Sourcetype policy =
  1. | Filter of pred
  2. | Mod of header_val
  3. | Union of policy * policy
  4. | Seq of policy * policy
  5. | Star of policy
  6. | Let of {
    1. id : metaId;
    2. init : meta_init;
    3. mut : bool;
    4. body : policy;
    }
  7. | Dup
Sourceval sexp_of_policy : policy -> Ppx_sexp_conv_lib.Sexp.t
Sourceval policy_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> policy
Sourceval id : policy
Sourceval drop : policy

Applications

Sourcetype switch_port = switchId * portId
Sourceval sexp_of_switch_port : switch_port -> Ppx_sexp_conv_lib.Sexp.t
Sourceval switch_port_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> switch_port
Sourceval sexp_of_host : host -> Ppx_sexp_conv_lib.Sexp.t
Sourceval host_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> host
Sourcetype bufferId = Core.Int32.t
Sourceval sexp_of_bufferId : bufferId -> Ppx_sexp_conv_lib.Sexp.t
Sourceval bufferId_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> bufferId
OCaml

Innovation. Community. Security.