Package org.drasyl.channel.tun
Class Tun6Packet
- java.lang.Object
-
- io.netty.buffer.DefaultByteBufHolder
-
- org.drasyl.channel.tun.TunPacket
-
- org.drasyl.channel.tun.Tun6Packet
-
-
Field Summary
Fields Modifier and Type Field Description static int
INET6_DESTINATION_ADDRESS
static int
INET6_DESTINATION_ADDRESS_LENGTH
static int
INET6_FLOW_LABEL
static int
INET6_HEADER_LENGTH
static int
INET6_HOP_LIMIT
static int
INET6_NEXT_HEADER
static int
INET6_PAYLOAD_LENGTH
static int
INET6_SOURCE_ADDRESS
static int
INET6_SOURCE_ADDRESS_LENGTH
static int
INET6_VERSION_AND_TRAFFIC_CLASS
-
Constructor Summary
Constructors Constructor Description Tun6Packet(io.netty.buffer.ByteBuf data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
data()
InetAddress
destinationAddress()
Returns the destination address.long
flowLabel()
int
hopLimit()
int
nextHeader()
long
payloadLength()
InetAddress
sourceAddress()
Returns the source address.String
toString()
int
trafficClass()
int
version()
Returns the IP version.
-
-
-
Field Detail
-
INET6_HEADER_LENGTH
public static final int INET6_HEADER_LENGTH
- See Also:
- Constant Field Values
-
INET6_VERSION_AND_TRAFFIC_CLASS
public static final int INET6_VERSION_AND_TRAFFIC_CLASS
- See Also:
- Constant Field Values
-
INET6_FLOW_LABEL
public static final int INET6_FLOW_LABEL
- See Also:
- Constant Field Values
-
INET6_PAYLOAD_LENGTH
public static final int INET6_PAYLOAD_LENGTH
- See Also:
- Constant Field Values
-
INET6_NEXT_HEADER
public static final int INET6_NEXT_HEADER
- See Also:
- Constant Field Values
-
INET6_HOP_LIMIT
public static final int INET6_HOP_LIMIT
- See Also:
- Constant Field Values
-
INET6_SOURCE_ADDRESS
public static final int INET6_SOURCE_ADDRESS
- See Also:
- Constant Field Values
-
INET6_SOURCE_ADDRESS_LENGTH
public static final int INET6_SOURCE_ADDRESS_LENGTH
- See Also:
- Constant Field Values
-
INET6_DESTINATION_ADDRESS
public static final int INET6_DESTINATION_ADDRESS
- See Also:
- Constant Field Values
-
INET6_DESTINATION_ADDRESS_LENGTH
public static final int INET6_DESTINATION_ADDRESS_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
version
public int version()
Description copied from class:TunPacket
Returns the IP version.
-
trafficClass
public int trafficClass()
-
flowLabel
public long flowLabel()
-
payloadLength
public long payloadLength()
-
nextHeader
public int nextHeader()
-
hopLimit
public int hopLimit()
-
sourceAddress
public InetAddress sourceAddress()
Description copied from class:TunPacket
Returns the source address.- Specified by:
sourceAddress
in classTunPacket
- Returns:
- the source address.
-
destinationAddress
public InetAddress destinationAddress()
Description copied from class:TunPacket
Returns the destination address.- Specified by:
destinationAddress
in classTunPacket
- Returns:
- the destination address.
-
data
public byte[] data()
-
toString
public String toString()
- Overrides:
toString
in classio.netty.buffer.DefaultByteBufHolder
-
-