473,511 Members | 16,849 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

jpcap

i use jpcap classe for captured packet but i don't arrive to save the
packets in a file with the method jpcapwriter...

how help me?

thanks.

my code is that :

import jpcap.*;

class Tcpdump implements JpcapHandler
{
public void handlePacket(Packet packet){
System.out.println(packet);
}
public static void main(String[] args) throws
java.io.IOException{
String[] lists=Jpcap.getDeviceDescription();
System.out.println("Start capturing on "+lists[0]);
Jpcap jpcap=Jpcap.openDevice(Jpcap.getDeviceList()[0],1000,false,20);
//jpcap.setFilter("host 132.147.47.98",true);
jpcap.loopPacket(-1,new Tcpdump());
}
}
Jul 17 '05 #1
0 3991

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
24009
by: Bob Rivers | last post by:
Hi, I was doing a research looking for Java solutions that are able to do "ping". I found old messages (and not so old ones), telling that Java was not able to do that, because the API...
0
1993
by: Damien Legrand | last post by:
i use jpcap classe for captured packet but i don't arrive to save the packets in a file with the method jpcapwriter... i dont know java. help me ! thanks. class jpcapwriter doc : ...
1
8758
by: amc river | last post by:
Hi, Anyone know of if there is a java class that extract every field of a pcap format file? thanks
1
5525
by: khaled | last post by:
hi i am developing a java program to capture the network traffic (TCP/IP) using the jpcap.jar files and when i intends to run the examples with it i get the follwing error: cannot access...
2
3829
by: missolsr | last post by:
hi, I am using jpcap to capture OLSR topology control (udp) packets. Does anyone know how to extract data (the way ethereal does it) from the olsr packet? There are methods to extract data...
4
1985
by: gll | last post by:
Can anyone tell me, how I can get in java the packet of IP and then modify it? Maybe there is a special library, which could help me? Thank you in advance. Gregory
1
6469
by: visal | last post by:
hi Please help me.i am developing a java pgm to capture network packets using jpcap.i downloded jpcap and wpcap dll files. My pgm is: import jpcap.JpcapHandler; import jpcap.Jpcap; import...
3
3650
by: haribuvanesh | last post by:
Im working with a packet sniffer program and i get following exception on compilation. Plz help me out.... Exception in thread "main" java.lang.Error: Unresolved compilation problem: The method...
4
2328
by: ramyamuthusamy | last post by:
Hi I want to know how to analyse the network traffic using java,,
3
1683
by: mdlleréseau | last post by:
Hello, I need to access to all the osi layer using Java. But java.net has access only to 4 layer but not to the 3 layer . when I did a search in the net ,I found the package JSocketWrench but I...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7355
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7423
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3213
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
447
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.