Class ForwardingActionRule
- java.lang.Object
-
- org.onosproject.net.behaviour.upf.ForwardingActionRule
-
public final class ForwardingActionRule extends Object
A single Forwarding Action Rule (FAR), an entity described in the 3GPP specifications (although that does not mean that this class is 3GPP compliant). An instance of this class will be generated by a logical switch write request to the database-style FAR P4 table, and the resulting instance should contain all the information needed to reproduce that logical switch FAR in the event of a client read request. The instance should also contain sufficient information (or expose the means to retrieve such information) to generate the corresponding dataplane forwarding state that implements the FAR.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ForwardingActionRule.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
actionString()
Return a string representing the dataplane action applied by this FAR.boolean
buffers()
Returns true if this FAR buffers incoming packets, and false otherwise.static ForwardingActionRule.Builder
builder()
boolean
drops()
Returns true if this FAR drops packets, and false otherwise.boolean
encaps()
True if this FAR encapsulates packets in a GTP tunnel, and false otherwise.boolean
equals(Object obj)
int
farId()
Get the PFCP session-local ID of the FAR that should apply to packets that match this PDR.boolean
forwards()
True if this FAR does not drop packets.int
hashCode()
boolean
notifies()
Returns true if this FAR notifies the control plane on receiving a packet, and false otherwise.ImmutableByteSequence
sessionId()
Get the ID of the PFCP Session that produced this FAR.ImmutableByteSequence
teid()
Get the identifier of the GTP tunnel that this FAR will encapsulate packets with.String
toString()
GtpTunnel
tunnel()
A description of the tunnel that this FAR will encapsulate packets with, if it is a downlink FAR.Ip4Address
tunnelDst()
Get the destination IP of the GTP tunnel that this FAR will encapsulate packets with.Ip4Address
tunnelSrc()
Get the source IP of the GTP tunnel that this FAR will encapsulate packets with.Short
tunnelSrcPort()
Get the source UDP port of the GTP tunnel that this FAR will encapsulate packets with.ForwardingActionRule
withoutActionParams()
Return a new instance of this FAR with the action parameters stripped, leaving only the match keys.
-
-
-
Method Detail
-
withoutActionParams
public ForwardingActionRule withoutActionParams()
Return a new instance of this FAR with the action parameters stripped, leaving only the match keys.- Returns:
- a new FAR with only match keys
-
builder
public static ForwardingActionRule.Builder builder()
-
actionString
public String actionString()
Return a string representing the dataplane action applied by this FAR.- Returns:
- a string representing the FAR action
-
sessionId
public ImmutableByteSequence sessionId()
Get the ID of the PFCP Session that produced this FAR.- Returns:
- PFCP session ID
-
farId
public int farId()
Get the PFCP session-local ID of the FAR that should apply to packets that match this PDR.- Returns:
- PFCP session-local FAR ID
-
forwards
public boolean forwards()
True if this FAR does not drop packets.- Returns:
- true if FAR is forwards
-
encaps
public boolean encaps()
True if this FAR encapsulates packets in a GTP tunnel, and false otherwise.- Returns:
- true is FAR encapsulates
-
drops
public boolean drops()
Returns true if this FAR drops packets, and false otherwise.- Returns:
- true if this FAR drops
-
notifies
public boolean notifies()
Returns true if this FAR notifies the control plane on receiving a packet, and false otherwise.- Returns:
- true if this FAR notifies the cp
-
buffers
public boolean buffers()
Returns true if this FAR buffers incoming packets, and false otherwise.- Returns:
- true if this FAR buffers
-
tunnel
public GtpTunnel tunnel()
A description of the tunnel that this FAR will encapsulate packets with, if it is a downlink FAR. If the FAR is uplink, there will be no such tunnel and this method wil return null.- Returns:
- A GtpTunnel instance containing a tunnel sourceIP, destIP, and GTPU TEID, or null if the FAR is uplink.
-
tunnelSrcPort
public Short tunnelSrcPort()
Get the source UDP port of the GTP tunnel that this FAR will encapsulate packets with.- Returns:
- GTP tunnel source UDP port
-
tunnelSrc
public Ip4Address tunnelSrc()
Get the source IP of the GTP tunnel that this FAR will encapsulate packets with.- Returns:
- GTP tunnel source IP
-
tunnelDst
public Ip4Address tunnelDst()
Get the destination IP of the GTP tunnel that this FAR will encapsulate packets with.- Returns:
- GTP tunnel destination IP
-
teid
public ImmutableByteSequence teid()
Get the identifier of the GTP tunnel that this FAR will encapsulate packets with.- Returns:
- GTP tunnel ID
-
-