package frenetic

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

Module Frenetic_netkat.JsonSource

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.

Sourceval pol_of_json : json -> Syntax.policy

Deserialize a Yojson repesentation of a NetKAT policy

Sourceval policy_to_json : Syntax.policy -> json

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

Sourceval from_json_header_val : json -> Syntax.header_val
Sourceval pol_of_json_channel : Core.In_channel.t -> Syntax.policy

Same as pol_of_json, but reads json from input channel

Sourceval event_to_json_string : Frenetic_kernel.OpenFlow.event -> string

Same as event_to_json but returns json string

Sourceval pol_of_json_string : string -> Syntax.policy

Same as pol_of_json, but receives json string

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

Sames as stats_to_json but returns json string

Sourceval port_stat_to_json_string : Frenetic_kernel.OpenFlow.portStats -> string
Sourceval pseudoport_from_json : json -> Frenetic_kernel.OpenFlow.pseudoport
Sourceval pkt_out_from_json : json -> Syntax.switchId * Syntax.portId option * Syntax.payload * Syntax.policy list
OCaml

Innovation. Community. Security.