package openflow

  1. Overview
  2. Docs
type switchId = int64
type portId = Packet.int16
type queueId = int32
type xid = int32
type pattern = {
  1. dlSrc : Packet.dlAddr option;
  2. dlDst : Packet.dlAddr option;
  3. dlTyp : Packet.dlTyp option;
  4. dlVlan : Packet.dlVlan option;
  5. dlVlanPcp : Packet.dlVlanPcp option;
  6. nwSrc : Packet.nwAddr option;
  7. nwDst : Packet.nwAddr option;
  8. nwProto : Packet.nwProto option;
  9. nwTos : Packet.nwTos option;
  10. tpSrc : Packet.tpPort option;
  11. tpDst : Packet.tpPort option;
  12. inPort : portId option;
}
type pseudoPort =
  1. | PhysicalPort of portId
  2. | AllPorts
  3. | InPort
  4. | Flood
  5. | Controller of int
type action =
  1. | Output of pseudoPort
  2. | SetDlVlan of Packet.dlVlan
  3. | SetDlVlanPcp of Packet.dlVlanPcp
  4. | SetDlSrc of Packet.dlAddr
  5. | SetDlDst of Packet.dlAddr
  6. | SetNwSrc of Packet.nwAddr
  7. | SetNwDst of Packet.nwAddr
  8. | SetNwTos of Packet.nwTos
  9. | SetTpSrc of Packet.tpPort
  10. | SetTpDst of Packet.tpPort
type timeout =
  1. | Permanent
  2. | ExpiresAfter of Packet.int16
type flowModCommand =
  1. | AddFlow
  2. | ModFlow
  3. | ModStrictFlow
  4. | DeleteFlow
  5. | DeleteStrictFlow
type flowMod = {
  1. command : flowModCommand;
  2. pattern : pattern;
  3. priority : Packet.int16;
  4. actions : action list;
  5. cookie : int64;
  6. idle_timeout : timeout;
  7. hard_timeout : timeout;
  8. notify_when_removed : bool;
  9. apply_to_packet : int32 option;
  10. out_port : pseudoPort option;
  11. check_overlap : bool;
}
type payload =
  1. | Buffered of int32 * Packet.bytes
  2. | NotBuffered of Packet.bytes
type packetInReason =
  1. | NoMatch
  2. | ExplicitSend
type packetIn = {
  1. input_payload : payload;
  2. total_len : Packet.int16;
  3. port : portId;
  4. reason : packetInReason;
}
type packetOut = {
  1. output_payload : payload;
  2. port_id : portId option;
  3. apply_actions : action list;
}
val parse_payload : payload -> Packet.packet
val marshal_payload : int32 option -> Packet.packet -> payload
val match_all : pattern
val add_flow : Packet.int16 -> pattern -> action list -> flowMod
val delete_all_flows : flowMod
val packetIn_to_string : packetIn -> string
OCaml

Innovation. Community. Security.