捕获IP数据包的Java类Jpcap

Jpcap是为JAVA编写的类包,提供很多类和接口,能够获得IP数据包。

 

 

*Description

 

 

Jpcap is a Java class package which enables to capture and send IP packets from Java application.

 

This package uses libpcap and Raw Socket API.

 

Currently, Jpcap is tested on FreeBSD 3.x, Linux RedHat 6.1, Solaris, and Microsoft Windows 2000/XP.

 

Ethernet, IPv4, IPv6, ARP/RARP, TCP, UDP, ICMPv4 are supported.

 

 

 

*Download

 

 

http://netresearch.ics.uci.edu/kfujii/jpcap/doc/download.html

 

 

 

*Installation

 

 

<Windows 9x, NT, 2000>

 

 

1 Download and install Javatm2 Platform, Standard Edition (J2SEtm) JRE or SDK.

 

2 Download and install the latest WinPcap.

 

3 Download and extract the latest Jpcap.

 

4 Copy "lib/Jpcap.dll" into "[JRE directory]/bin" or "[JRE directory]/lib/ext/x86"

 

5 Copy "lib/jpcap.jar" into "[JRE directory]/lib/ext"

 

6 If you installed J2SE SDK, you also need to copy "lib/jpcap.jar" into "[SDK directory]/jre/lib/ext".

 

  Note: [JRE directory] is usually "C:/Program Files/Java/j2re*".

 

           [SDK directory] is usually "C:/j2sdk*".

 

 

  <UNIX>

 

 

1 Download and install Javatm2 Platform, Standard Edition (J2SEtm) JRE or SDK

 

2 Download and install libpcap if not installed.

 

3 Download and extract the latest Jpcap

 

4 Go to "src/c" directory, and edit Makefile

 

5 Run "make".

 

  If you get an error "structure has no member named `sa_len'",

 

  comment out the line "#define HAVE_SA_LEN" in Jpcap_sub.h.

 

6 Copy libjpcap.so to [Java directory]/jre/lib/<arch>. <arch> is either "i386" or "sparc"

 

7 Copy "lib/jpcap.jar" into [Java directory]/jre/lib/ext.

 

 

 

*Documents

 

 

Readme

 

   Instruction of how to install and other information.

 

Changes

 

  History of version up.

 

API Manual

 

  API manual of all classes in package jpcap, generated by javadoc.

 

Sample program

 

  tcpdump-like sample program.

 

http://netresearch.ics.uci.edu/kfujii/jpcap/doc/document.html

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值