package openflow

  1. Overview
  2. Docs
type !'a mask = {
  1. m_value : 'a;
  2. m_mask : 'a option;
}
type xid = int32
type int12 = Packet.int16
type payload =
  1. | Buffered of int32 * Packet.bytes
  2. | NotBuffered of Packet.bytes
val val_to_mask : 'a1 -> 'a1 mask
type switchId = int64
type groupId = int32
type portId = int32
type tableId = Packet.int8
type bufferId = int32
type oxm =
  1. | OxmInPort of portId
  2. | OxmInPhyPort of portId
  3. | OxmMetadata of int64 mask
  4. | OxmEthType of Packet.int16
  5. | OxmEthDst of Packet.int48 mask
  6. | OxmEthSrc of Packet.int48 mask
  7. | OxmVlanVId of int12 mask
  8. | OxmVlanPcp of Packet.int8
  9. | OxmIPProto of Packet.int8
  10. | OxmIPDscp of Packet.int8
  11. | OxmIPEcn of Packet.int8
  12. | OxmIP4Src of int32 mask
  13. | OxmIP4Dst of int32 mask
  14. | OxmTCPSrc of Packet.int16 mask
  15. | OxmTCPDst of Packet.int16 mask
  16. | OxmARPOp of Packet.int16
  17. | OxmARPSpa of int32 mask
  18. | OxmARPTpa of int32 mask
  19. | OxmARPSha of Packet.int48 mask
  20. | OxmARPTha of Packet.int48 mask
  21. | OxmICMPType of Packet.int8
  22. | OxmICMPCode of Packet.int8
  23. | OxmMPLSLabel of int32
  24. | OxmMPLSTc of Packet.int8
  25. | OxmTunnelId of int64 mask
type oxmMatch = oxm list
val match_all : oxmMatch
type pseudoPort =
  1. | PhysicalPort of portId
  2. | InPort
  3. | Flood
  4. | AllPorts
  5. | Controller of Packet.int16
  6. | Any
type action =
  1. | Output of pseudoPort
  2. | Group of groupId
  3. | PopVlan
  4. | PushVlan
  5. | PopMpls
  6. | PushMpls
  7. | SetField of oxm
type actionSequence = action list
type instruction =
  1. | GotoTable of tableId
  2. | ApplyActions of actionSequence
  3. | WriteActions of actionSequence
type bucket = {
  1. bu_weight : Packet.int16;
  2. bu_watch_port : portId option;
  3. bu_watch_group : groupId option;
  4. bu_actions : actionSequence;
}
type groupType =
  1. | All
  2. | Select
  3. | Indirect
  4. | FF
type groupMod =
  1. | AddGroup of groupType * groupId * bucket list
  2. | DeleteGroup of groupType * groupId
type timeout =
  1. | Permanent
  2. | ExpiresAfter of Packet.int16
type flowModCommand =
  1. | AddFlow
  2. | ModFlow
  3. | ModStrictFlow
  4. | DeleteFlow
  5. | DeleteStrictFlow
type flowModFlags = {
  1. fmf_send_flow_rem : bool;
  2. fmf_check_overlap : bool;
  3. fmf_reset_counts : bool;
  4. fmf_no_pkt_counts : bool;
  5. fmf_no_byt_counts : bool;
}
type flowMod = {
  1. mfCookie : int64 mask;
  2. mfTable_id : tableId;
  3. mfCommand : flowModCommand;
  4. mfIdle_timeout : timeout;
  5. mfHard_timeout : timeout;
  6. mfPriority : Packet.int16;
  7. mfBuffer_id : bufferId option;
  8. mfOut_port : pseudoPort option;
  9. mfOut_group : groupId option;
  10. mfFlags : flowModFlags;
  11. mfOfp_match : oxmMatch;
  12. mfInstructions : instruction list;
}
val add_flow : Packet.int16 -> oxmMatch -> instruction list -> flowMod
val delete_all_flows : flowMod
type packetInReason =
  1. | NoMatch
  2. | ExplicitSend
type packetIn = {
  1. pi_total_len : Packet.int16;
  2. pi_reason : packetInReason;
  3. pi_table_id : tableId;
  4. pi_ofp_match : oxmMatch;
  5. pi_payload : payload;
}
type capabilities = {
  1. flow_stats : bool;
  2. table_stats : bool;
  3. port_stats : bool;
  4. group_stats : bool;
  5. ip_reasm : bool;
  6. queue_stats : bool;
  7. port_blocked : bool;
}
type portState = {
  1. blocked : bool;
  2. live : bool;
}
type portDesc = {
  1. port_no : portId;
  2. state : portState;
}
type portReason =
  1. | PortAdd
  2. | PortDelete
  3. | PortModify
type portStatus = {
  1. reason : portReason;
  2. desc : portDesc;
}
type packetOut = {
  1. po_in_port : pseudoPort;
  2. po_actions : actionSequence;
  3. po_payload : payload;
}
type multipartRequest =
  1. | SwitchDescReq
  2. | PortsDescReq
type multipartReply =
  1. | PortsDescReply of portDesc list