| Modifier and Type | Field and Description |
|---|---|
static int | IV_SIZESize of initialization vector in bytes. |
static int | MAC_SIZESize of MAC (Message Authentication Code) in bytes. |
(package private) static int | MAX_PACKET_SIZEMaximum SSU packet size in bytes. |
static int | MAX_PAYLOAD_TYPELargest payload type value. |
static int | PAYLOAD_TYPE_DATAPacket type: data. |
static int | PAYLOAD_TYPE_RELAY_INTROPacket type: relay intro. |
static int | PAYLOAD_TYPE_RELAY_REQUESTPacket type: relay request. |
static int | PAYLOAD_TYPE_RELAY_RESPONSEPacket type: relay response. |
static int | PAYLOAD_TYPE_SESSION_CONFIRMEDPacket type: session confirmed. |
static int | PAYLOAD_TYPE_SESSION_CREATEDPacket type: session created. |
static int | PAYLOAD_TYPE_SESSION_DESTROYPacket type: session destroy. |
static int | PAYLOAD_TYPE_SESSION_REQUESTPacket type: session request. |
static int | PAYLOAD_TYPE_TESTPacket type: test. |
| Modifier and Type | Method and Description |
|---|---|
static UDPPacket | acquire(RouterContext ctx,
boolean inbound)Inbound flag. |
static void | clearCache()Clear cache. |
void | drop()Discard the packet and release it back to the cache. |
FIFOBandwidthLimiter.Request | getBandwidthRequest()Bandwidth request. |
long | getBegin()Initialization time. |
long | getEnqueueTime()Enqueue time. |
(package private) int | getFragmentCount()Fragment count |
long | getLifetime()Packet lifetime. |
int | getMarkedType()Marked type. |
(package private) int | getMessageType()Message type |
DatagramPacket | getPacket()Underlying packet. |
int | getPriority()Send priority. |
(package private) RemoteHostId | getRemoteHost()Lazily obtains the RemoteHostId representing the sender's address and port. |
long | getSeqNum()Packet sequence number. |
(package private) long | getTimeSinceReceived()Returns the amount of time elapsed since the packet was received. |
void | markType(int type)Mark type. |
static String | payloadTypeToString(int type)Packet type enumeration. |
(package private) void | received()Marks the packet as received, recording the current time. |
static void | reduceCacheSize()Reduce cache size. |
void | release()Return the packet to the object pool for reuse. |
void | requestOutboundBandwidth()Request outbound bandwidth. |
void | resetBegin()Reset initialization time. |
void | setEnqueueTime(long now)Enqueue timestamp. |
(package private) void | setFragmentCount(int count)Fragment count |
(package private) void | setMessageType(int type)Message type |
void | setPriority(int pri)Priority level. |
void | setSeqNum(long num)Packet sequence number. |
String | toString()Returns a detailed string representation of this packet, including address, size,
priority, message and mark types, fragment counts, and timing information. |
public static final int IV_SIZE
public static final int MAC_SIZE
static final int MAX_PACKET_SIZE
public static final int MAX_PAYLOAD_TYPE
public static final int PAYLOAD_TYPE_DATA
public static final int PAYLOAD_TYPE_RELAY_INTRO
public static final int PAYLOAD_TYPE_RELAY_REQUEST
public static final int PAYLOAD_TYPE_RELAY_RESPONSE
public static final int PAYLOAD_TYPE_SESSION_CONFIRMED
public static final int PAYLOAD_TYPE_SESSION_CREATED
public static final int PAYLOAD_TYPE_SESSION_DESTROY
public static final int PAYLOAD_TYPE_SESSION_REQUEST
public static final int PAYLOAD_TYPE_TEST
public static UDPPacket acquire(RouterContext ctx, boolean inbound)
public static void clearCache()
public void drop()
public FIFOBandwidthLimiter.Request getBandwidthRequest()
public long getBegin()
public long getEnqueueTime()
getEnqueueTime in interface CDQEntryint getFragmentCount()
public long getLifetime()
public int getMarkedType()
int getMessageType()
public DatagramPacket getPacket()
public int getPriority()
getPriority in interface PQEntryRemoteHostId getRemoteHost()
RemoteHostId representing the sender's address and port.
This is initialized once per packet and cached thereafter.public long getSeqNum()
long getTimeSinceReceived()
public void markType(int type)
public static String payloadTypeToString(int type)
void received()
public static void reduceCacheSize()
public void release()
public void requestOutboundBandwidth()
public void resetBegin()
public void setEnqueueTime(long now)
setEnqueueTime in interface CDQEntrynow - the enqueue timestampvoid setFragmentCount(int count)
void setMessageType(int type)
public void setPriority(int pri)
public void setSeqNum(long num)