public class ScionHeaderParser extends Object
| Modifier and Type | Method and Description |
|---|---|
static InetSocketAddress |
extractDestinationSocketAddress(ByteBuffer data) |
static int |
extractHeaderLength(ByteBuffer data)
Extract the header length without changing the buffer's position.
|
static InternalConstants.HdrTypes |
extractNextHeader(ByteBuffer data)
Extract the next header type without changing the buffer's position.
|
static int |
extractPacketLength(ByteBuffer data)
Extract the total packet length without changing the buffer's position.
|
static int |
extractPathHeaderPosition(ByteBuffer data)
Extract the position of the path header.
|
static ResponsePath |
extractResponsePath(ByteBuffer data,
InetSocketAddress firstHopAddress)
Extract the remote socket address and path without changing the buffer's position.
|
static void |
extractUserPayload(ByteBuffer data,
ByteBuffer userBuffer)
Extract the user payload data without changing the buffer's position.
|
static void |
reversePathInPlace(ByteBuffer data) |
static String |
validate(ByteBuffer data) |
static void |
write(ByteBuffer data,
int userPacketLength,
int pathHeaderLength,
long srcIsdAs,
byte[] srcAddress,
long dstIsdAs,
byte[] dstAddress,
InternalConstants.HdrTypes hdrType,
int trafficClass) |
static void |
writePath(ByteBuffer data,
byte[] path) |
static void |
writeUdpOverlayHeader(ByteBuffer data,
int packetLength,
int srcPort,
int dstPort) |
public static void extractUserPayload(ByteBuffer data, ByteBuffer userBuffer)
data - The datagram to read from.userBuffer - Buffer in which to write the user payload.public static int extractPacketLength(ByteBuffer data)
data - The datagram to read from.public static ResponsePath extractResponsePath(ByteBuffer data, InetSocketAddress firstHopAddress)
data - The datagram to read from.public static InternalConstants.HdrTypes extractNextHeader(ByteBuffer data)
data - The datagram to read from.public static InetSocketAddress extractDestinationSocketAddress(ByteBuffer data) throws UnknownHostException
UnknownHostExceptionpublic static int extractHeaderLength(ByteBuffer data)
data - The packet bufferpublic static int extractPathHeaderPosition(ByteBuffer data)
data - The packet bufferpublic static String validate(ByteBuffer data)
public static void write(ByteBuffer data, int userPacketLength, int pathHeaderLength, long srcIsdAs, byte[] srcAddress, long dstIsdAs, byte[] dstAddress, InternalConstants.HdrTypes hdrType, int trafficClass)
public static void reversePathInPlace(ByteBuffer data)
public static void writePath(ByteBuffer data, byte[] path)
public static void writeUdpOverlayHeader(ByteBuffer data, int packetLength, int srcPort, int dstPort)
Copyright © 2024. All rights reserved.