ejip
Class TcpIp

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

public class TcpIp
extends java.lang.Object

A minimalistic TCP/IP stack (with ICMP). It's enough to handel a HTTP request (and nothing more)!


Constructor Summary
TcpIp()
           
 
Method Summary
static int chkSum(int[] buf, int off, int cnt)
          calc ip header check sum. assume (32 bit) word boundries. rest of buffer is 0. off offset in buffer (in words) cnt length in bytes
static void init()
           
static void receive(Packet p)
          process one ip packet. change buffer and set length to get a packet sent back. called from Eth.process().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TcpIp

public TcpIp()
Method Detail

chkSum

public static int chkSum(int[] buf,
                         int off,
                         int cnt)
calc ip header check sum. assume (32 bit) word boundries. rest of buffer is 0. off offset in buffer (in words) cnt length in bytes

init

public static void init()

receive

public static void receive(Packet p)
process one ip packet. change buffer and set length to get a packet sent back. called from Eth.process().