se.sics.jipv6.core
Class Packet

java.lang.Object
  extended by se.sics.jipv6.core.Packet
Direct Known Subclasses:
IPv6Packet

public class Packet
extends Object


Field Summary
protected  Hashtable attributes
           
static String LL_DESTINATION
           
static String LL_SOURCE
           
protected  byte[] packetData
           
 
Constructor Summary
Packet()
           
 
Method Summary
 void appendBytes(byte[] data)
           
 void copy(int pos, byte[] dst, int dstPos, int len)
           
 int get16(int pos)
           
 int get24(int pos)
           
 int get32(int pos)
           
 Object getAttribute(String name)
           
 int getAttributeAsInt(String attr)
           
 byte[] getBytes()
           
 byte getData(int pos)
           
 byte[] getLinkDestination()
           
 byte[] getLinkSource()
           
 byte[] getPayload()
           
 int getPayloadLength()
           
 int getTotalLength()
           
 void incPos(int delta)
           
 void prependBytes(byte[] data)
           
 void setAttribute(String name, int data)
           
 void setAttribute(String name, Object object)
           
 void setBytes(byte[] data)
           
 void setBytes(byte[] data, int startPos, int len)
           
 void setData(int pos, byte val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LL_SOURCE

public static final String LL_SOURCE
See Also:
Constant Field Values

LL_DESTINATION

public static final String LL_DESTINATION
See Also:
Constant Field Values

attributes

protected Hashtable attributes

packetData

protected byte[] packetData
Constructor Detail

Packet

public Packet()
Method Detail

setBytes

public void setBytes(byte[] data)

setBytes

public void setBytes(byte[] data,
                     int startPos,
                     int len)

appendBytes

public void appendBytes(byte[] data)

prependBytes

public void prependBytes(byte[] data)

getBytes

public byte[] getBytes()

getTotalLength

public int getTotalLength()

getPayloadLength

public int getPayloadLength()

setAttribute

public void setAttribute(String name,
                         Object object)

setAttribute

public void setAttribute(String name,
                         int data)

getAttribute

public Object getAttribute(String name)

getLinkSource

public byte[] getLinkSource()

getLinkDestination

public byte[] getLinkDestination()

get32

public int get32(int pos)

get24

public int get24(int pos)

get16

public int get16(int pos)

getData

public byte getData(int pos)

incPos

public void incPos(int delta)

getPayload

public byte[] getPayload()

getAttributeAsInt

public int getAttributeAsInt(String attr)

copy

public void copy(int pos,
                 byte[] dst,
                 int dstPos,
                 int len)

setData

public void setData(int pos,
                    byte val)