Package org.onosproject.net.flow
Interface TrafficSelector.Builder
-
- All Known Implementing Classes:
DefaultTrafficSelector.Builder
- Enclosing interface:
- TrafficSelector
public static interface TrafficSelector.BuilderBuilder of traffic selector entities.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TrafficSelector.Builderadd(Criterion criterion)Adds a traffic selection criterion.TrafficSelectorbuild()Builds an immutable traffic selector.TrafficSelector.Builderextension(ExtensionSelector extensionSelector, DeviceId deviceId)Uses an extension selector.TrafficSelector.BuildermatchArpOp(int arpOp)Matches a arp operation type.TrafficSelector.BuildermatchArpSha(MacAddress addr)Matches a arp_eth_src address.TrafficSelector.BuildermatchArpSpa(Ip4Address addr)Matches a arp IPv4 source address.TrafficSelector.BuildermatchArpTha(MacAddress addr)Matches a arp_eth_dst address.TrafficSelector.BuildermatchArpTpa(Ip4Address addr)Matches a arp IPv4 destination address.TrafficSelector.BuildermatchEthDst(MacAddress addr)Matches a l2 dst address.TrafficSelector.BuildermatchEthDstMasked(MacAddress addr, MacAddress mask)Matches a l2 dst address with mask.TrafficSelector.BuildermatchEthSrc(MacAddress addr)Matches a l2 src address.TrafficSelector.BuildermatchEthSrcMasked(MacAddress addr, MacAddress mask)Matches a l2 src address with mask.TrafficSelector.BuildermatchEthType(short ethType)Matches the ethernet type.TrafficSelector.BuildermatchIcmpCode(byte icmpCode)Matches an ICMP code.TrafficSelector.BuildermatchIcmpType(byte icmpType)Matches an ICMP type.TrafficSelector.BuildermatchIcmpv6Code(byte icmpv6Code)Matches an ICMPv6 code.TrafficSelector.BuildermatchIcmpv6Type(byte icmpv6Type)Matches an ICMPv6 type.TrafficSelector.BuildermatchInnerVlanId(VlanId vlanId)Matches the inner vlan id.TrafficSelector.BuildermatchInnerVlanPcp(byte vlanPcp)Matches a vlan priority.TrafficSelector.BuildermatchInPhyPort(PortNumber port)Matches a physical inport.TrafficSelector.BuildermatchInPort(PortNumber port)Matches an inport.TrafficSelector.BuildermatchIPDscp(byte ipDscp)Matches an IP DSCP (6 bits in ToS field).TrafficSelector.BuildermatchIPDst(IpPrefix ip)Matches a l3 IPv4 address.TrafficSelector.BuildermatchIPEcn(byte ipEcn)Matches an IP ECN (2 bits in ToS field).TrafficSelector.BuildermatchIPProtocol(byte proto)Matches the l3 protocol.TrafficSelector.BuildermatchIPSrc(IpPrefix ip)Matches a l3 IPv4 address.TrafficSelector.BuildermatchIPv6Dst(IpPrefix ip)Matches a l3 IPv6 address.TrafficSelector.BuildermatchIPv6ExthdrFlags(short exthdrFlags)Matches on IPv6 Extension Header pseudo-field flags.TrafficSelector.BuildermatchIPv6FlowLabel(int flowLabel)Matches an IPv6 flow label.TrafficSelector.BuildermatchIPv6NDSourceLinkLayerAddress(MacAddress mac)Matches an IPv6 Neighbor Discovery source link-layer address.TrafficSelector.BuildermatchIPv6NDTargetAddress(Ip6Address targetAddress)Matches an IPv6 Neighbor Discovery target address.TrafficSelector.BuildermatchIPv6NDTargetLinkLayerAddress(MacAddress mac)Matches an IPv6 Neighbor Discovery target link-layer address.TrafficSelector.BuildermatchIPv6Src(IpPrefix ip)Matches a l3 IPv6 address.TrafficSelector.BuildermatchMetadata(long metadata)Matches a metadata.TrafficSelector.BuildermatchMplsBos(boolean mplsBos)Matches on a MPLS Bottom-of-Stack indicator bit.TrafficSelector.BuildermatchMplsLabel(MplsLabel mplsLabel)Matches on a MPLS label.TrafficSelector.BuildermatchPi(PiCriterion piCriterion)Matches protocol independent fields.TrafficSelector.BuildermatchSctpDst(TpPort sctpPort)Matches a SCTP destination port number.TrafficSelector.BuildermatchSctpDstMasked(TpPort sctpPort, TpPort mask)Matches a SCTP destination port number with mask.TrafficSelector.BuildermatchSctpSrc(TpPort sctpPort)Matches a SCTP source port number.TrafficSelector.BuildermatchSctpSrcMasked(TpPort sctpPort, TpPort mask)Matches a SCTP source port number with mask.TrafficSelector.BuildermatchTcpDst(TpPort tcpPort)Matches a TCP destination port number.TrafficSelector.BuildermatchTcpDstMasked(TpPort tcpPort, TpPort mask)Matches a TCP destination port number with mask.TrafficSelector.BuildermatchTcpSrc(TpPort tcpPort)Matches a TCP source port number.TrafficSelector.BuildermatchTcpSrcMasked(TpPort tcpPort, TpPort mask)Matches a TCP source port number with mask.TrafficSelector.BuildermatchTunnelId(long tunnelId)Matches a tunnel id.TrafficSelector.BuildermatchUdpDst(TpPort udpPort)Matches an UDP destination port number.TrafficSelector.BuildermatchUdpDstMasked(TpPort udpPort, TpPort mask)Matches a UDP destination port number with mask.TrafficSelector.BuildermatchUdpSrc(TpPort udpPort)Matches an UDP source port number.TrafficSelector.BuildermatchUdpSrcMasked(TpPort udpPort, TpPort mask)Matches a UDP source port number with mask.TrafficSelector.BuildermatchVlanId(VlanId vlanId)Matches the vlan id.TrafficSelector.BuildermatchVlanPcp(byte vlanPcp)Matches a vlan priority.
-
-
-
Method Detail
-
add
TrafficSelector.Builder add(Criterion criterion)
Adds a traffic selection criterion. If a same type criterion has already been added, it will be replaced by this one.- Parameters:
criterion- new criterion- Returns:
- self
-
matchInPort
TrafficSelector.Builder matchInPort(PortNumber port)
Matches an inport.- Parameters:
port- the inport- Returns:
- a selection builder
-
matchInPhyPort
TrafficSelector.Builder matchInPhyPort(PortNumber port)
Matches a physical inport.- Parameters:
port- the physical inport- Returns:
- a selection builder
-
matchMetadata
TrafficSelector.Builder matchMetadata(long metadata)
Matches a metadata.- Parameters:
metadata- the metadata- Returns:
- a selection builder
-
matchEthDst
TrafficSelector.Builder matchEthDst(MacAddress addr)
Matches a l2 dst address.- Parameters:
addr- a l2 address- Returns:
- a selection builder
-
matchEthDstMasked
TrafficSelector.Builder matchEthDstMasked(MacAddress addr, MacAddress mask)
Matches a l2 dst address with mask.- Parameters:
addr- a l2 addressmask- a mask for an l2 address- Returns:
- a selection builder
-
matchEthSrc
TrafficSelector.Builder matchEthSrc(MacAddress addr)
Matches a l2 src address.- Parameters:
addr- a l2 address- Returns:
- a selection builder
-
matchEthSrcMasked
TrafficSelector.Builder matchEthSrcMasked(MacAddress addr, MacAddress mask)
Matches a l2 src address with mask.- Parameters:
addr- a l2 addressmask- a mask for an l2 address- Returns:
- a selection builder
-
matchEthType
TrafficSelector.Builder matchEthType(short ethType)
Matches the ethernet type.- Parameters:
ethType- an ethernet type- Returns:
- a selection builder
-
matchVlanId
TrafficSelector.Builder matchVlanId(VlanId vlanId)
Matches the vlan id.- Parameters:
vlanId- a vlan id- Returns:
- a selection builder
-
matchVlanPcp
TrafficSelector.Builder matchVlanPcp(byte vlanPcp)
Matches a vlan priority.- Parameters:
vlanPcp- a vlan priority- Returns:
- a selection builder
-
matchInnerVlanId
TrafficSelector.Builder matchInnerVlanId(VlanId vlanId)
Matches the inner vlan id.- Parameters:
vlanId- a vlan id- Returns:
- a selection builder
-
matchInnerVlanPcp
TrafficSelector.Builder matchInnerVlanPcp(byte vlanPcp)
Matches a vlan priority.- Parameters:
vlanPcp- a vlan priority- Returns:
- a selection builder
-
matchIPDscp
TrafficSelector.Builder matchIPDscp(byte ipDscp)
Matches an IP DSCP (6 bits in ToS field).- Parameters:
ipDscp- an IP DSCP value- Returns:
- a selection builder
-
matchIPEcn
TrafficSelector.Builder matchIPEcn(byte ipEcn)
Matches an IP ECN (2 bits in ToS field).- Parameters:
ipEcn- an IP ECN value- Returns:
- a selection builder
-
matchIPProtocol
TrafficSelector.Builder matchIPProtocol(byte proto)
Matches the l3 protocol.- Parameters:
proto- a l3 protocol- Returns:
- a selection builder
-
matchIPSrc
TrafficSelector.Builder matchIPSrc(IpPrefix ip)
Matches a l3 IPv4 address.- Parameters:
ip- a l3 address- Returns:
- a selection builder
-
matchIPDst
TrafficSelector.Builder matchIPDst(IpPrefix ip)
Matches a l3 IPv4 address.- Parameters:
ip- a l3 address- Returns:
- a selection builder
-
matchTcpSrc
TrafficSelector.Builder matchTcpSrc(TpPort tcpPort)
Matches a TCP source port number.- Parameters:
tcpPort- a TCP source port number- Returns:
- a selection builder
-
matchTcpSrcMasked
TrafficSelector.Builder matchTcpSrcMasked(TpPort tcpPort, TpPort mask)
Matches a TCP source port number with mask.- Parameters:
tcpPort- a TCP source port numbermask- a mask for a TCP source port number- Returns:
- a selection builder
-
matchTcpDst
TrafficSelector.Builder matchTcpDst(TpPort tcpPort)
Matches a TCP destination port number.- Parameters:
tcpPort- a TCP destination port number- Returns:
- a selection builder
-
matchTcpDstMasked
TrafficSelector.Builder matchTcpDstMasked(TpPort tcpPort, TpPort mask)
Matches a TCP destination port number with mask.- Parameters:
tcpPort- a TCP destination port numbermask- a mask for a TCP destination port number- Returns:
- a selection builder
-
matchUdpSrc
TrafficSelector.Builder matchUdpSrc(TpPort udpPort)
Matches an UDP source port number.- Parameters:
udpPort- an UDP source port number- Returns:
- a selection builder
-
matchUdpSrcMasked
TrafficSelector.Builder matchUdpSrcMasked(TpPort udpPort, TpPort mask)
Matches a UDP source port number with mask.- Parameters:
udpPort- a UDP source port numbermask- a mask for a UDP source port number- Returns:
- a selection builder
-
matchUdpDst
TrafficSelector.Builder matchUdpDst(TpPort udpPort)
Matches an UDP destination port number.- Parameters:
udpPort- an UDP destination port number- Returns:
- a selection builder
-
matchUdpDstMasked
TrafficSelector.Builder matchUdpDstMasked(TpPort udpPort, TpPort mask)
Matches a UDP destination port number with mask.- Parameters:
udpPort- a UDP destination port numbermask- a mask for a UDP destination port number- Returns:
- a selection builder
-
matchSctpSrc
TrafficSelector.Builder matchSctpSrc(TpPort sctpPort)
Matches a SCTP source port number.- Parameters:
sctpPort- a SCTP source port number- Returns:
- a selection builder
-
matchSctpSrcMasked
TrafficSelector.Builder matchSctpSrcMasked(TpPort sctpPort, TpPort mask)
Matches a SCTP source port number with mask.- Parameters:
sctpPort- a SCTP source port numbermask- a mask for a SCTP source port number- Returns:
- a selection builder
-
matchSctpDst
TrafficSelector.Builder matchSctpDst(TpPort sctpPort)
Matches a SCTP destination port number.- Parameters:
sctpPort- a SCTP destination port number- Returns:
- a selection builder
-
matchSctpDstMasked
TrafficSelector.Builder matchSctpDstMasked(TpPort sctpPort, TpPort mask)
Matches a SCTP destination port number with mask.- Parameters:
sctpPort- a SCTP destination port numbermask- a mask for a SCTP destination port number- Returns:
- a selection builder
-
matchIcmpType
TrafficSelector.Builder matchIcmpType(byte icmpType)
Matches an ICMP type.- Parameters:
icmpType- an ICMP type- Returns:
- a selection builder
-
matchIcmpCode
TrafficSelector.Builder matchIcmpCode(byte icmpCode)
Matches an ICMP code.- Parameters:
icmpCode- an ICMP code- Returns:
- a selection builder
-
matchIPv6Src
TrafficSelector.Builder matchIPv6Src(IpPrefix ip)
Matches a l3 IPv6 address.- Parameters:
ip- a l3 IPv6 address- Returns:
- a selection builder
-
matchIPv6Dst
TrafficSelector.Builder matchIPv6Dst(IpPrefix ip)
Matches a l3 IPv6 address.- Parameters:
ip- a l3 IPv6 address- Returns:
- a selection builder
-
matchIPv6FlowLabel
TrafficSelector.Builder matchIPv6FlowLabel(int flowLabel)
Matches an IPv6 flow label.- Parameters:
flowLabel- an IPv6 flow label- Returns:
- a selection builder
-
matchIcmpv6Type
TrafficSelector.Builder matchIcmpv6Type(byte icmpv6Type)
Matches an ICMPv6 type.- Parameters:
icmpv6Type- an ICMPv6 type- Returns:
- a selection builder
-
matchIcmpv6Code
TrafficSelector.Builder matchIcmpv6Code(byte icmpv6Code)
Matches an ICMPv6 code.- Parameters:
icmpv6Code- an ICMPv6 code- Returns:
- a selection builder
-
matchIPv6NDTargetAddress
TrafficSelector.Builder matchIPv6NDTargetAddress(Ip6Address targetAddress)
Matches an IPv6 Neighbor Discovery target address.- Parameters:
targetAddress- an IPv6 Neighbor Discovery target address- Returns:
- a selection builder
-
matchIPv6NDSourceLinkLayerAddress
TrafficSelector.Builder matchIPv6NDSourceLinkLayerAddress(MacAddress mac)
Matches an IPv6 Neighbor Discovery source link-layer address.- Parameters:
mac- an IPv6 Neighbor Discovery source link-layer address- Returns:
- a selection builder
-
matchIPv6NDTargetLinkLayerAddress
TrafficSelector.Builder matchIPv6NDTargetLinkLayerAddress(MacAddress mac)
Matches an IPv6 Neighbor Discovery target link-layer address.- Parameters:
mac- an IPv6 Neighbor Discovery target link-layer address- Returns:
- a selection builder
-
matchMplsLabel
TrafficSelector.Builder matchMplsLabel(MplsLabel mplsLabel)
Matches on a MPLS label.- Parameters:
mplsLabel- a MPLS label.- Returns:
- a selection builder
-
matchMplsBos
TrafficSelector.Builder matchMplsBos(boolean mplsBos)
Matches on a MPLS Bottom-of-Stack indicator bit.- Parameters:
mplsBos- boolean value indicating BOS=1 (true) or BOS=0 (false).- Returns:
- a selection builder
-
matchTunnelId
TrafficSelector.Builder matchTunnelId(long tunnelId)
Matches a tunnel id.- Parameters:
tunnelId- a tunnel id- Returns:
- a selection builder
-
matchIPv6ExthdrFlags
TrafficSelector.Builder matchIPv6ExthdrFlags(short exthdrFlags)
Matches on IPv6 Extension Header pseudo-field flags.- Parameters:
exthdrFlags- the IPv6 Extension Header pseudo-field flags- Returns:
- a selection builder
-
matchArpTpa
TrafficSelector.Builder matchArpTpa(Ip4Address addr)
Matches a arp IPv4 destination address.- Parameters:
addr- a arp IPv4 destination address- Returns:
- a selection builder
-
matchArpSpa
TrafficSelector.Builder matchArpSpa(Ip4Address addr)
Matches a arp IPv4 source address.- Parameters:
addr- a arp IPv4 source address- Returns:
- a selection builder
-
matchArpTha
TrafficSelector.Builder matchArpTha(MacAddress addr)
Matches a arp_eth_dst address.- Parameters:
addr- a arp_eth_dst address- Returns:
- a selection builder
-
matchArpSha
TrafficSelector.Builder matchArpSha(MacAddress addr)
Matches a arp_eth_src address.- Parameters:
addr- a arp_eth_src address- Returns:
- a selection builder
-
matchArpOp
TrafficSelector.Builder matchArpOp(int arpOp)
Matches a arp operation type.- Parameters:
arpOp- a arp operation type- Returns:
- a selection builder
-
matchPi
@Beta TrafficSelector.Builder matchPi(PiCriterion piCriterion)
Matches protocol independent fields.- Parameters:
piCriterion- protocol-independent criterion- Returns:
- a selection builder
-
extension
TrafficSelector.Builder extension(ExtensionSelector extensionSelector, DeviceId deviceId)
Uses an extension selector.- Parameters:
extensionSelector- extension selectordeviceId- device ID- Returns:
- a selection builder
-
build
TrafficSelector build()
Builds an immutable traffic selector.- Returns:
- traffic selector
-
-