Class 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.
    • 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
      • actionString

        public String actionString()
        Return a string representing the dataplane action applied by this FAR.
        Returns:
        a string representing the FAR action
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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