package frenetic

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

JSON serialization/deserialization of NetKAT messages.

NetKAT comes in two syntaxes: "regular" which is handled by Parser/Lexer and "json" which is handled here. We translate most things to the Syntax.policy type

This module also serializes/deserializes switch-to-controller OpenFlow messages for net apps.

type json = Yojson.Basic.t
val pol_of_json : json -> Frenetic_netkat.Syntax.policy

Deserialize a Yojson repesentation of a NetKAT policy

val policy_to_json : Frenetic_netkat.Syntax.policy -> json

Serialize a NetKAT policy to Yojson format. Note: errors may occur when converting between 64-bit values and JSON-representable integers.

val from_json_header_val : json -> Frenetic_netkat.Syntax.header_val

Same as pol_of_json, but reads json from input channel

val event_to_json_string : Frenetic_kernel.OpenFlow.event -> string

Same as event_to_json but returns json string

val pol_of_json_string : string -> Frenetic_netkat.Syntax.policy

Same as pol_of_json, but receives json string

val policy_to_json_string : Frenetic_netkat.Syntax.policy -> string
val stats_to_json_string : (Core.Int64.t * Core.Int64.t) -> string

Sames as stats_to_json but returns json string

val port_stat_to_json_string : Frenetic_kernel.OpenFlow.portStats -> string
val pseudoport_to_json : Frenetic_kernel.OpenFlow.pseudoport -> json
val pseudoport_from_json : json -> Frenetic_kernel.OpenFlow.pseudoport
val flowTable_to_json : Frenetic_kernel.OpenFlow.flowTable -> json