mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Updated transport constants and renamed some test classes.
This commit is contained in:
@@ -8,9 +8,9 @@ public interface Segment {
|
||||
|
||||
int getLength();
|
||||
|
||||
long getTransmissionNumber();
|
||||
long getSegmentNumber();
|
||||
|
||||
void setLength(int length);
|
||||
|
||||
void setTransmissionNumber(int transmission);
|
||||
void setSegmentNumber(long segmentNumber);
|
||||
}
|
||||
|
||||
@@ -2,19 +2,20 @@ package net.sf.briar.api.transport;
|
||||
|
||||
public interface TransportConstants {
|
||||
|
||||
/**
|
||||
* The maximum length of a frame in bytes, including the header and footer.
|
||||
*/
|
||||
static final int MAX_FRAME_LENGTH = 65536; // 2^16, 64 KiB
|
||||
/** The maximum length of a segment in bytes, including the tag. */
|
||||
static final int MAX_SEGMENT_LENGTH = 65536; // 2^16, 64 KiB
|
||||
|
||||
/** The length of the segment tag in bytes. */
|
||||
static final int TAG_LENGTH = 16;
|
||||
|
||||
/** The maximum length of a frame in bytes, including the header and MAC. */
|
||||
static final int MAX_FRAME_LENGTH = MAX_SEGMENT_LENGTH - TAG_LENGTH;
|
||||
|
||||
/** The length of the frame header in bytes. */
|
||||
static final int FRAME_HEADER_LENGTH = 8;
|
||||
|
||||
/**
|
||||
* The length in bytes of the pseudo-random tag that uniquely identifies a
|
||||
* connection.
|
||||
*/
|
||||
static final int TAG_LENGTH = 16;
|
||||
/** The length of the MAC in bytes. */
|
||||
static final int MAC_LENGTH = 32;
|
||||
|
||||
/**
|
||||
* The minimum connection length in bytes that all transport plugins must
|
||||
|
||||
Reference in New Issue
Block a user