ejip
Class Packet

java.lang.Object
  |
  +--ejip.Packet

public class Packet
extends java.lang.Object

Packet buffer handling for a minimalistic TCP/IP stack.


Field Summary
static int ALLOC
           
 int[] buf
          ip datagram
static int FREE
           
 int len
          length in bytes
 int[] llh
          place for link layer data
static int MAX
           
static int MAXLLH
           
static int MAXW
           
static int RCV
           
static int SND
           
 
Method Summary
static Packet getPacket(int type, int newType)
          Request a packet of a given type from the pool and set new type.
static Packet getPacket(int type, int newType, LinkLayer s)
          Request a packet of a given type from the pool and set new type and source.
static Packet getPacket(LinkLayer s, int type, int newType)
          Request a packet of a given type and source from the pool and set new type.
static void init()
           
 void setStatus(int v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX

public static final int MAX

MAXW

public static final int MAXW

MAXLLH

public static final int MAXLLH

llh

public int[] llh
place for link layer data

buf

public int[] buf
ip datagram

len

public int len
length in bytes

FREE

public static final int FREE

ALLOC

public static final int ALLOC

SND

public static final int SND

RCV

public static final int RCV
Method Detail

init

public static void init()

getPacket

public static Packet getPacket(int type,
                               int newType)
Request a packet of a given type from the pool and set new type.

getPacket

public static Packet getPacket(int type,
                               int newType,
                               LinkLayer s)
Request a packet of a given type from the pool and set new type and source.

getPacket

public static Packet getPacket(LinkLayer s,
                               int type,
                               int newType)
Request a packet of a given type and source from the pool and set new type.

setStatus

public void setStatus(int v)