Class Criteria
- java.lang.Object
- 
- org.onosproject.net.flow.criteria.Criteria
 
- 
 public final class Criteria extends Object Factory class to create various traffic selection criteria.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Criteriondummy()Creates a dummy criterion.static ExtensionCriterionextension(ExtensionSelector extensionSelector, DeviceId deviceId)Creates an extension criterion for the specified extension selector.static CriterionmatchArpOp(int arpOp)Creates a match on arp operation type field using the specified value.static CriterionmatchArpSha(MacAddress mac)Creates a match on MAC source field using the specified value.static CriterionmatchArpSpa(Ip4Address ip)Creates a match on IPv4 source field using the specified value.static CriterionmatchArpTha(MacAddress mac)Creates a match on MAC destination field using the specified value.static CriterionmatchArpTpa(Ip4Address ip)Creates a match on IPv4 destination field using the specified value.static CriterionmatchEthDst(MacAddress mac)Creates a match on ETH_DST field using the specified value.static CriterionmatchEthDstMasked(MacAddress mac, MacAddress mask)Creates a masked match on ETH_DST field using the specified value and mask.static CriterionmatchEthSrc(MacAddress mac)Creates a match on ETH_SRC field using the specified value.static CriterionmatchEthSrcMasked(MacAddress mac, MacAddress mask)Creates a masked match on ETH_SRC field using the specified value and mask.static CriterionmatchEthType(int ethType)Creates a match on ETH_TYPE field using the specified value.static CriterionmatchEthType(EthType ethType)Creates a match on ETH_TYPE field using the specified value.static CriterionmatchIcmpCode(short icmpCode)Creates a match on ICMP code field using the specified value.static CriterionmatchIcmpType(short icmpType)Creates a match on ICMP type field using the specified value.static CriterionmatchIcmpv6Code(short icmpv6Code)Creates a match on ICMPv6 code field using the specified value.static CriterionmatchIcmpv6Type(short icmpv6Type)Creates a match on ICMPv6 type field using the specified value.static CriterionmatchInnerVlanId(VlanId vlanId)Creates a match on the inner VLAN ID field using the specified value.static CriterionmatchInnerVlanPcp(byte vlanPcp)Creates a match on the inner VLAN PCP field using the specified value.static CriterionmatchInPhyPort(PortNumber port)Creates a match on IN_PHY_PORT field using the specified value.static CriterionmatchInPort(PortNumber port)Creates a match on IN_PORT field using the specified value.static CriterionmatchIPDscp(byte ipDscp)Creates a match on IP DSCP field using the specified value.static CriterionmatchIPDst(IpPrefix ip)Creates a match on IPv4 destination field using the specified value.static CriterionmatchIPEcn(byte ipEcn)Creates a match on IP ECN field using the specified value.static CriterionmatchIPProtocol(short proto)Creates a match on IP proto field using the specified value.static CriterionmatchIPSrc(IpPrefix ip)Creates a match on IPv4 source field using the specified value.static CriterionmatchIPv6Dst(IpPrefix ip)Creates a match on IPv6 destination field using the specified value.static CriterionmatchIPv6ExthdrFlags(int exthdrFlags)Creates a match on IPv6 Extension Header pseudo-field fiags.static CriterionmatchIPv6FlowLabel(int flowLabel)Creates a match on IPv6 flow label field using the specified value.static CriterionmatchIPv6NDSourceLinkLayerAddress(MacAddress mac)Creates a match on IPv6 Neighbor Discovery source link-layer address using the specified value.static CriterionmatchIPv6NDTargetAddress(Ip6Address targetAddress)Creates a match on IPv6 Neighbor Discovery target address using the specified value.static CriterionmatchIPv6NDTargetLinkLayerAddress(MacAddress mac)Creates a match on IPv6 Neighbor Discovery target link-layer address using the specified value.static CriterionmatchIPv6Src(IpPrefix ip)Creates a match on IPv6 source field using the specified value.static CriterionmatchLambda(Lambda lambda)Creates a match on lambda using the specified value.static CriterionmatchMetadata(long metadata)Creates a match on METADATA field using the specified value.static CriterionmatchMplsBos(boolean mplsBos)Creates a match on MPLS Bottom-of-Stack indicator bit.static CriterionmatchMplsLabel(MplsLabel mplsLabel)Creates a match on MPLS label.static CriterionmatchMplsTc(byte mplsTc)Creates a match on MPLS TC.static CriterionmatchOchSignalType(OchSignalType signalType)Create a match on OCh (Optical Channel) signal type.static CriterionmatchOduSignalId(OduSignalId oduSignalId)Creates a match on ODU (Optical channel Data Unit) signal ID using the specified value.static CriterionmatchOduSignalType(OduSignalType signalType)Creates a match on ODU (Optical channel Data Unit) signal Type using the specified value.static CriterionmatchPbbIsid(int pbbIsid)Creates a match on PBB I-SID field using the specific value.static CriterionmatchSctpDst(TpPort sctpPort)Creates a match on SCTP destination port field using the specified value.static CriterionmatchSctpDstMasked(TpPort sctpPort, TpPort mask)Creates a masked match on SCTP destination port field using the specified value and mask.static CriterionmatchSctpSrc(TpPort sctpPort)Creates a match on SCTP source port field using the specified value.static CriterionmatchSctpSrcMasked(TpPort sctpPort, TpPort mask)Creates a masked match on SCTP source port field using the specified value and mask.static CriterionmatchTcpDst(TpPort tcpPort)Creates a match on TCP destination port field using the specified value.static CriterionmatchTcpDstMasked(TpPort tcpPort, TpPort mask)Creates a masked match on TCP destination port field using the specified value and mask.static CriterionmatchTcpFlags(int flags)Creates a match on TCP flags using the specified value.static CriterionmatchTcpSrc(TpPort tcpPort)Creates a match on TCP source port field using the specified value.static CriterionmatchTcpSrcMasked(TpPort tcpPort, TpPort mask)Creates a masked match on TCP source port field using the specified value and mask.static CriterionmatchTunnelId(long tunnelId)Creates a match on Tunnel ID.static CriterionmatchUdpDst(TpPort udpPort)Creates a match on UDP destination port field using the specified value.static CriterionmatchUdpDstMasked(TpPort udpPort, TpPort mask)Creates a masked match on UDP destination port field using the specified value and mask.static CriterionmatchUdpSrc(TpPort udpPort)Creates a match on UDP source port field using the specified value.static CriterionmatchUdpSrcMasked(TpPort udpPort, TpPort mask)Creates a masked match on UDP source port field using the specified value and mask.static CriterionmatchVlanId(VlanId vlanId)Creates a match on VLAN ID field using the specified value.static CriterionmatchVlanPcp(byte vlanPcp)Creates a match on VLAN PCP field using the specified value.
 
- 
- 
- 
Method Detail- 
matchInPortpublic static Criterion matchInPort(PortNumber port) Creates a match on IN_PORT field using the specified value.- Parameters:
- port- inport value
- Returns:
- match criterion
 
 - 
matchInPhyPortpublic static Criterion matchInPhyPort(PortNumber port) Creates a match on IN_PHY_PORT field using the specified value.- Parameters:
- port- inport value
- Returns:
- match criterion
 
 - 
matchMetadatapublic static Criterion matchMetadata(long metadata) Creates a match on METADATA field using the specified value.- Parameters:
- metadata- metadata value (64 bits data)
- Returns:
- match criterion
 
 - 
matchEthDstpublic static Criterion matchEthDst(MacAddress mac) Creates a match on ETH_DST field using the specified value. This value may be a wildcard mask.- Parameters:
- mac- MAC address value or wildcard mask
- Returns:
- match criterion
 
 - 
matchEthDstMaskedpublic static Criterion matchEthDstMasked(MacAddress mac, MacAddress mask) Creates a masked match on ETH_DST field using the specified value and mask.- Parameters:
- mac- MAC address value
- mask- MAC address masking
- Returns:
- match criterion
 
 - 
matchEthSrcpublic static Criterion matchEthSrc(MacAddress mac) Creates a match on ETH_SRC field using the specified value. This value may be a wildcard mask.- Parameters:
- mac- MAC address value or wildcard mask
- Returns:
- match criterion
 
 - 
matchEthSrcMaskedpublic static Criterion matchEthSrcMasked(MacAddress mac, MacAddress mask) Creates a masked match on ETH_SRC field using the specified value and mask.- Parameters:
- mac- MAC address value
- mask- MAC address masking
- Returns:
- match criterion
 
 - 
matchEthTypepublic static Criterion matchEthType(int ethType) Creates a match on ETH_TYPE field using the specified value.- Parameters:
- ethType- eth type value (16 bits unsigned integer)
- Returns:
- match criterion
 
 - 
matchEthTypepublic static Criterion matchEthType(EthType ethType) Creates a match on ETH_TYPE field using the specified value.- Parameters:
- ethType- eth type value
- Returns:
- match criterion
 
 - 
matchVlanIdpublic static Criterion matchVlanId(VlanId vlanId) Creates a match on VLAN ID field using the specified value.- Parameters:
- vlanId- vlan id value
- Returns:
- match criterion
 
 - 
matchInnerVlanIdpublic static Criterion matchInnerVlanId(VlanId vlanId) Creates a match on the inner VLAN ID field using the specified value.- Parameters:
- vlanId- vlan id value
- Returns:
- match criterion
 
 - 
matchVlanPcppublic static Criterion matchVlanPcp(byte vlanPcp) Creates a match on VLAN PCP field using the specified value.- Parameters:
- vlanPcp- vlan pcp value (3 bits)
- Returns:
- match criterion
 
 - 
matchInnerVlanPcppublic static Criterion matchInnerVlanPcp(byte vlanPcp) Creates a match on the inner VLAN PCP field using the specified value.- Parameters:
- vlanPcp- vlan pcp value (3 bits)
- Returns:
- match criterion
 
 - 
matchIPDscppublic static Criterion matchIPDscp(byte ipDscp) Creates a match on IP DSCP field using the specified value.- Parameters:
- ipDscp- ip dscp value (6 bits)
- Returns:
- match criterion
 
 - 
matchIPEcnpublic static Criterion matchIPEcn(byte ipEcn) Creates a match on IP ECN field using the specified value.- Parameters:
- ipEcn- ip ecn value (2 bits)
- Returns:
- match criterion
 
 - 
matchIPProtocolpublic static Criterion matchIPProtocol(short proto) Creates a match on IP proto field using the specified value.- Parameters:
- proto- ip protocol value (8 bits unsigned integer)
- Returns:
- match criterion
 
 - 
matchIPSrcpublic static Criterion matchIPSrc(IpPrefix ip) Creates a match on IPv4 source field using the specified value.- Parameters:
- ip- ipv4 source value
- Returns:
- match criterion
 
 - 
matchIPDstpublic static Criterion matchIPDst(IpPrefix ip) Creates a match on IPv4 destination field using the specified value.- Parameters:
- ip- ipv4 source value
- Returns:
- match criterion
 
 - 
matchTcpSrcpublic static Criterion matchTcpSrc(TpPort tcpPort) Creates a match on TCP source port field using the specified value.- Parameters:
- tcpPort- TCP source port
- Returns:
- match criterion
 
 - 
matchTcpSrcMaskedpublic static Criterion matchTcpSrcMasked(TpPort tcpPort, TpPort mask) Creates a masked match on TCP source port field using the specified value and mask.- Parameters:
- tcpPort- TCP source port
- mask- TCP source port masking
- Returns:
- match criterion
 
 - 
matchTcpDstpublic static Criterion matchTcpDst(TpPort tcpPort) Creates a match on TCP destination port field using the specified value.- Parameters:
- tcpPort- TCP destination port
- Returns:
- match criterion
 
 - 
matchTcpDstMaskedpublic static Criterion matchTcpDstMasked(TpPort tcpPort, TpPort mask) Creates a masked match on TCP destination port field using the specified value and mask.- Parameters:
- tcpPort- TCP destination port
- mask- TCP destination port masking
- Returns:
- match criterion
 
 - 
matchTcpFlagspublic static Criterion matchTcpFlags(int flags) Creates a match on TCP flags using the specified value.- Parameters:
- flags- TCP flags
- Returns:
- match criterion
 
 - 
matchUdpSrcpublic static Criterion matchUdpSrc(TpPort udpPort) Creates a match on UDP source port field using the specified value.- Parameters:
- udpPort- UDP source port
- Returns:
- match criterion
 
 - 
matchUdpSrcMaskedpublic static Criterion matchUdpSrcMasked(TpPort udpPort, TpPort mask) Creates a masked match on UDP source port field using the specified value and mask.- Parameters:
- udpPort- UDP source port
- mask- UDP source port masking
- Returns:
- match criterion
 
 - 
matchUdpDstpublic static Criterion matchUdpDst(TpPort udpPort) Creates a match on UDP destination port field using the specified value.- Parameters:
- udpPort- UDP destination port
- Returns:
- match criterion
 
 - 
matchUdpDstMaskedpublic static Criterion matchUdpDstMasked(TpPort udpPort, TpPort mask) Creates a masked match on UDP destination port field using the specified value and mask.- Parameters:
- udpPort- UDP destination port
- mask- UDP destination port masking
- Returns:
- match criterion
 
 - 
matchSctpSrcpublic static Criterion matchSctpSrc(TpPort sctpPort) Creates a match on SCTP source port field using the specified value.- Parameters:
- sctpPort- SCTP source port
- Returns:
- match criterion
 
 - 
matchSctpSrcMaskedpublic static Criterion matchSctpSrcMasked(TpPort sctpPort, TpPort mask) Creates a masked match on SCTP source port field using the specified value and mask.- Parameters:
- sctpPort- SCTP source port
- mask- SCTP source port masking
- Returns:
- match criterion
 
 - 
matchSctpDstpublic static Criterion matchSctpDst(TpPort sctpPort) Creates a match on SCTP destination port field using the specified value.- Parameters:
- sctpPort- SCTP destination port
- Returns:
- match criterion
 
 - 
matchSctpDstMaskedpublic static Criterion matchSctpDstMasked(TpPort sctpPort, TpPort mask) Creates a masked match on SCTP destination port field using the specified value and mask.- Parameters:
- sctpPort- SCTP destination port
- mask- SCTP destination port masking
- Returns:
- match criterion
 
 - 
matchIcmpTypepublic static Criterion matchIcmpType(short icmpType) Creates a match on ICMP type field using the specified value.- Parameters:
- icmpType- ICMP type (8 bits unsigned integer)
- Returns:
- match criterion
 
 - 
matchIcmpCodepublic static Criterion matchIcmpCode(short icmpCode) Creates a match on ICMP code field using the specified value.- Parameters:
- icmpCode- ICMP code (8 bits unsigned integer)
- Returns:
- match criterion
 
 - 
matchIPv6Srcpublic static Criterion matchIPv6Src(IpPrefix ip) Creates a match on IPv6 source field using the specified value.- Parameters:
- ip- ipv6 source value
- Returns:
- match criterion
 
 - 
matchIPv6Dstpublic static Criterion matchIPv6Dst(IpPrefix ip) Creates a match on IPv6 destination field using the specified value.- Parameters:
- ip- ipv6 destination value
- Returns:
- match criterion
 
 - 
matchIPv6FlowLabelpublic static Criterion matchIPv6FlowLabel(int flowLabel) Creates a match on IPv6 flow label field using the specified value.- Parameters:
- flowLabel- IPv6 flow label (20 bits)
- Returns:
- match criterion
 
 - 
matchIcmpv6Typepublic static Criterion matchIcmpv6Type(short icmpv6Type) Creates a match on ICMPv6 type field using the specified value.- Parameters:
- icmpv6Type- ICMPv6 type (8 bits unsigned integer)
- Returns:
- match criterion
 
 - 
matchIcmpv6Codepublic static Criterion matchIcmpv6Code(short icmpv6Code) Creates a match on ICMPv6 code field using the specified value.- Parameters:
- icmpv6Code- ICMPv6 code (8 bits unsigned integer)
- Returns:
- match criterion
 
 - 
matchIPv6NDTargetAddresspublic static Criterion matchIPv6NDTargetAddress(Ip6Address targetAddress) Creates a match on IPv6 Neighbor Discovery target address using the specified value.- Parameters:
- targetAddress- IPv6 Neighbor Discovery target address
- Returns:
- match criterion
 
 - 
matchIPv6NDSourceLinkLayerAddresspublic static Criterion matchIPv6NDSourceLinkLayerAddress(MacAddress mac) Creates a match on IPv6 Neighbor Discovery source link-layer address using the specified value.- Parameters:
- mac- IPv6 Neighbor Discovery source link-layer address
- Returns:
- match criterion
 
 - 
matchIPv6NDTargetLinkLayerAddresspublic static Criterion matchIPv6NDTargetLinkLayerAddress(MacAddress mac) Creates a match on IPv6 Neighbor Discovery target link-layer address using the specified value.- Parameters:
- mac- IPv6 Neighbor Discovery target link-layer address
- Returns:
- match criterion
 
 - 
matchMplsLabelpublic static Criterion matchMplsLabel(MplsLabel mplsLabel) Creates a match on MPLS label.- Parameters:
- mplsLabel- MPLS label (20 bits)
- Returns:
- match criterion
 
 - 
matchMplsBospublic static Criterion matchMplsBos(boolean mplsBos) Creates a match on MPLS Bottom-of-Stack indicator bit.- Parameters:
- mplsBos- boolean value indicating true (BOS=1) or false (BOS=0)
- Returns:
- match criterion
 
 - 
matchMplsTcpublic static Criterion matchMplsTc(byte mplsTc) Creates a match on MPLS TC.- Parameters:
- mplsTc- MPLS TC (3 bits)
- Returns:
- match criterion
 
 - 
matchTunnelIdpublic static Criterion matchTunnelId(long tunnelId) Creates a match on Tunnel ID.- Parameters:
- tunnelId- Tunnel ID (64 bits)
- Returns:
- match criterion
 
 - 
matchIPv6ExthdrFlagspublic static Criterion matchIPv6ExthdrFlags(int exthdrFlags) Creates a match on IPv6 Extension Header pseudo-field fiags. Those are defined in Criterion.IPv6ExthdrFlags.- Parameters:
- exthdrFlags- IPv6 Extension Header pseudo-field flags (16 bits)
- Returns:
- match criterion
 
 - 
matchLambdapublic static Criterion matchLambda(Lambda lambda) Creates a match on lambda using the specified value.- Parameters:
- lambda- lambda
- Returns:
- match criterion
 
 - 
matchOchSignalTypepublic static Criterion matchOchSignalType(OchSignalType signalType) Create a match on OCh (Optical Channel) signal type.- Parameters:
- signalType- OCh signal type
- Returns:
- match criterion
 
 - 
matchOduSignalIdpublic static Criterion matchOduSignalId(OduSignalId oduSignalId) Creates a match on ODU (Optical channel Data Unit) signal ID using the specified value.- Parameters:
- oduSignalId- ODU Signal Id
- Returns:
- match criterion
 
 - 
matchOduSignalTypepublic static Criterion matchOduSignalType(OduSignalType signalType) Creates a match on ODU (Optical channel Data Unit) signal Type using the specified value.- Parameters:
- signalType- ODU Signal Type
- Returns:
- match criterion
 
 - 
matchArpTpapublic static Criterion matchArpTpa(Ip4Address ip) Creates a match on IPv4 destination field using the specified value.- Parameters:
- ip- ipv4 destination value
- Returns:
- match criterion
 
 - 
matchArpSpapublic static Criterion matchArpSpa(Ip4Address ip) Creates a match on IPv4 source field using the specified value.- Parameters:
- ip- ipv4 source value
- Returns:
- match criterion
 
 - 
matchArpThapublic static Criterion matchArpTha(MacAddress mac) Creates a match on MAC destination field using the specified value.- Parameters:
- mac- MAC destination value
- Returns:
- match criterion
 
 - 
matchArpShapublic static Criterion matchArpSha(MacAddress mac) Creates a match on MAC source field using the specified value.- Parameters:
- mac- MAC source value
- Returns:
- match criterion
 
 - 
matchArpOppublic static Criterion matchArpOp(int arpOp) Creates a match on arp operation type field using the specified value.- Parameters:
- arpOp- arp operation type value
- Returns:
- match criterion
 
 - 
matchPbbIsidpublic static Criterion matchPbbIsid(int pbbIsid) Creates a match on PBB I-SID field using the specific value.- Parameters:
- pbbIsid- PBB I-SID
- Returns:
- match criterion
 
 - 
extensionpublic static ExtensionCriterion extension(ExtensionSelector extensionSelector, DeviceId deviceId) Creates an extension criterion for the specified extension selector.- Parameters:
- extensionSelector- extension selector
- deviceId- device ID
- Returns:
- match extension criterion
 
 - 
dummypublic static Criterion dummy() Creates a dummy criterion.- Returns:
- match criterion
 
 
- 
 
-