Class PacketDetectionRule
- java.lang.Object
-
- org.onosproject.net.behaviour.upf.PacketDetectionRule
-
public final class PacketDetectionRule extends Object
A single Packet Detection Rule (PDR), 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 PDR P4 table, and the resulting instance should contain all the information needed to reproduce that logical switch PDR 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 PDR.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PacketDetectionRule.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PacketDetectionRule.Builder
builder()
int
counterId()
Get the dataplane PDR counter cell ID that this PDR is assigned.boolean
equals(Object obj)
int
farId()
Get the PFCP session-local ID of the far that should apply to packets that this PDR matches.boolean
hasActionParameters()
Instances created as a result of DELETE write requests will not have action parameters, only match keys.int
hashCode()
boolean
hasSchedulingPriority()
This method is used to differentiate between prioritized and non-prioritized flows.boolean
matchesEncapped()
True if this PDR matches on packets received with a GTP header, and false otherwise.boolean
matchesUnencapped()
True if this PDR matches on packets received without a GTP header, and false otherwise.String
matchString()
Return a string representing the match conditions of this PDR.int
schedulingPriority()
Get the scheduling priority that this PDR is assigned.ImmutableByteSequence
sessionId()
Get the ID of the PFCP session that produced this PDR.ImmutableByteSequence
teid()
Get the identifier of the GTP tunnel that this PDR matches on.String
toString()
Ip4Address
tunnelDest()
Get the destination IP of the GTP tunnel that this PDR matches on.Ip4Address
ueAddress()
Get the UE IP address that this PDR matches on.PacketDetectionRule
withoutActionParams()
Return a new instance of this PDR with the action parameters stripped, leaving only the match keys.
-
-
-
Method Detail
-
builder
public static PacketDetectionRule.Builder builder()
-
matchString
public String matchString()
Return a string representing the match conditions of this PDR.- Returns:
- a string representing the PDR match conditions
-
hasActionParameters
public boolean hasActionParameters()
Instances created as a result of DELETE write requests will not have action parameters, only match keys. This method should be used to avoid null pointer exceptions in those instances.- Returns:
- true if this instance has PDR action parameters, false otherwise.
-
withoutActionParams
public PacketDetectionRule withoutActionParams()
Return a new instance of this PDR with the action parameters stripped, leaving only the match keys.- Returns:
- a new PDR with only match keys
-
matchesEncapped
public boolean matchesEncapped()
True if this PDR matches on packets received with a GTP header, and false otherwise.- Returns:
- true if the PDR matches only encapsulated packets
-
matchesUnencapped
public boolean matchesUnencapped()
True if this PDR matches on packets received without a GTP header, and false otherwise.- Returns:
- true if the PDR matches only un-encapsulated packets
-
sessionId
public ImmutableByteSequence sessionId()
Get the ID of the PFCP session that produced this PDR.- Returns:
- PFCP session ID
-
ueAddress
public Ip4Address ueAddress()
Get the UE IP address that this PDR matches on.- Returns:
- UE IP address
-
teid
public ImmutableByteSequence teid()
Get the identifier of the GTP tunnel that this PDR matches on.- Returns:
- GTP tunnel ID
-
tunnelDest
public Ip4Address tunnelDest()
Get the destination IP of the GTP tunnel that this PDR matches on.- Returns:
- GTP tunnel destination IP
-
counterId
public int counterId()
Get the dataplane PDR counter cell ID that this PDR is assigned.- Returns:
- PDR counter cell ID
-
farId
public int farId()
Get the PFCP session-local ID of the far that should apply to packets that this PDR matches.- Returns:
- PFCP session-local FAR ID
-
schedulingPriority
public int schedulingPriority()
Get the scheduling priority that this PDR is assigned.- Returns:
- scheduling priority
-
hasSchedulingPriority
public boolean hasSchedulingPriority()
This method is used to differentiate between prioritized and non-prioritized flows.- Returns:
- true if scheduling priority is assigned.
-
-