Jpcap a Java library for capturing and sending network packets
  Home
  Download
  Install
  API
  Tutorial
  Samples
  FAQ
  Discussion
  Links

 

FAQ

Q: Which platform/OS is supported by Jpcap?

Jpcap is based on libpcap/winpcap. Therefore, Jpcap should work on any OS that supports libpcap/winpcap. Jpcap has been tested on Microsoft Windows (98/2000/XP/Vista), Linux (Fedora, Mandriva, Ubuntu), Mac OS X (Darwin), FreeBSD, and Solaris .

Q: What types of packets can be captured by Jpcap?

Jpcap can capture any types of packets. 

If Jpcap captures a Ethernet, IPv4, IPv6, ARP/RARP, TCP, UDP, or ICMPv4 packet, it analyzes its packet header and generates a corresponding Java object. For example, if Jpcap captures TCP/IP packet, it generates jpcap.TCPPacket object, which is a subclass of jpcap.IPPacket. If the captured TCP/IP packet is tranferred over Ethernet, Jpcap also generates jpcap.EthernetPacket object and sets it under datalink field of the jpcap.TCPPacket object.

If Jpcap captures any other type of packet, it generates jpcap.Packet object, and you can analyze its data field which contains the header and also datagram of the packet.

Q: When I tried to run a Jpcap-based application, I got java.lang.UnsatisfiedLinkError. What should I do?

This error occurs when Java VM cannot find Jpcap native library, or libpcap/winpcap was not properly installed. Please see Installation Instruction to correctly install Jpcap and libpcap/winpcap.

Q: I cannot obtain the list of network interfaces or cannot capture any packets. Why?

It may be because you don't have administrative privileges, which are required to run Jpcap-based applications.

On Windows 2000/XP, your account should be in the Administrator group.

On Windows Vista, even if your account is in the administrator group, you still need to use "run as administrator" option. To use the option, right-click the application icon, and choose "run as administrator". If your application is command-line based, you need to open Command Prompt by using "run as administrator" option, and run your application within that Command Prompt.

On Linux/UNIX, you need to become a super user by using 'su' command , or use 'sudo' command to run Jpcap-based applications.

Q: Can I block or modify the packets instead of just caputuring them?

No. Jpcap only allows you to capture packets. In other words, the packets you captured by Jpcap are also transmitted to the destination hosts, and Jpcap cannot interfere the transmission.

Q: Can I capture packets from a WiFi (802.11) network interface?

The answer depends on what Operating System you are running and which WiFi devices your system has. On Windows, you may not be able to capture packets from some WiFi devices. Linux or BSD may have higher probability of supporting packet capturing using WiFi devices.

Q: Is this Jpcap related to the Jpcap on sourceforge?

No. They are independently developed, and thus are totally different products.

Some unique features of this Jpcap are:

      • Simpler API
      • Packet sending supported
      • IPv6 supported
      • Still in active development

 (c) Keita Fujii, kfujii@uci.edu