public class Routing extends BasePacket implements IExtensionHeader
Modifier and Type | Field and Description |
---|---|
static byte |
FIXED_HEADER_LENGTH |
static byte |
FIXED_ROUTING_DATA_LENGTH |
protected byte |
headerExtLength |
static byte |
LENGTH_UNIT |
protected byte |
nextHeader |
protected byte[] |
routingData |
protected byte |
routingType |
protected byte |
segmentsLeft |
parent, payload
Constructor and Description |
---|
Routing() |
Modifier and Type | Method and Description |
---|---|
static Deserializer<Routing> |
deserializer()
Deserializer function for routing headers.
|
boolean |
equals(java.lang.Object obj) |
byte |
getHeaderExtLength()
Gets the extension length of this header.
|
byte |
getNextHeader()
Gets the type of next header.
|
byte[] |
getRoutingData()
Gets the routing data.
|
byte |
getRoutingType()
Gets the routing type of this header.
|
byte |
getSegmentsLeft()
Gets the number of remaining route segments of this header.
|
int |
hashCode() |
byte[] |
serialize()
Sets all payloads parent packet if applicable, then serializes this
packet and all payloads.
|
Routing |
setHeaderExtLength(byte headerExtLength)
Sets the extension length of this header.
|
Routing |
setNextHeader(byte nextHeader)
Sets the type of next header.
|
Routing |
setRoutingData(byte[] routingData)
Sets the routing data.
|
Routing |
setRoutingType(byte routingType)
Sets the routing type of this header.
|
Routing |
setSegmntsLeft(byte segmentsLeft)
Sets the number of remaining route segments of this header.
|
java.lang.String |
toString() |
clone, getParent, getPayload, resetChecksum, setParent, setPayload
public static final byte FIXED_HEADER_LENGTH
public static final byte FIXED_ROUTING_DATA_LENGTH
public static final byte LENGTH_UNIT
protected byte nextHeader
protected byte headerExtLength
protected byte routingType
protected byte segmentsLeft
protected byte[] routingData
public byte getNextHeader()
IExtensionHeader
getNextHeader
in interface IExtensionHeader
public Routing setNextHeader(byte nextHeader)
IExtensionHeader
setNextHeader
in interface IExtensionHeader
nextHeader
- the next header to setpublic byte getHeaderExtLength()
public Routing setHeaderExtLength(byte headerExtLength)
headerExtLength
- the header length to setpublic byte getRoutingType()
public Routing setRoutingType(byte routingType)
routingType
- the routing type to setpublic byte getSegmentsLeft()
public Routing setSegmntsLeft(byte segmentsLeft)
segmentsLeft
- the number of remaining route segments to setpublic byte[] getRoutingData()
public Routing setRoutingData(byte[] routingData)
routingData
- the routing data to setpublic byte[] serialize()
IPacket
public int hashCode()
hashCode
in class BasePacket
public boolean equals(java.lang.Object obj)
equals
in class BasePacket
public static Deserializer<Routing> deserializer()
public java.lang.String toString()
toString
in class java.lang.Object