Reading Network Packets

I am doing a project in java networking. I am trying to read network packets entering and leaving my computer. Kindly give my guidelines how should i start .
[171 byte] By [akshatag85a] at [2007-11-26 16:41:17]
# 1
I'm very pleased to point you to "Search Forums" functionality in the left side of this page.Thank you.
Michael.Nazarov@sun.coma at 2007-7-8 23:08:18 > top of Java-index,Core,Core APIs...
# 2

you can use jpcap capture network packets,

import jpcap.JpcapHandler;

import jpcap.Jpcap;

import jpcap.Packet;

public class JpcapTip implements JpcapHandler {

public void handlePacket(Packet packet){

System.out.println(packet);

}

public static void main(String[] args) throws java.io.IOException{

String[] devices = Jpcap.getDeviceList();

for (int i = 0; i < devices.length; i++) {

System.out.println(devices);

}

String deviceName = devices[0];

Jpcap jpcap = Jpcap.openDevice(deviceName, 1028, false, 1);

jpcap.loopPacket(-1, new JpcapTip());

}

}

RobertSnooga at 2007-7-8 23:08:18 > top of Java-index,Core,Core APIs...