- Tutorials
- API Examples
- User Guide
- Ch 1 - The Basics
- Ch 2 - libpcap
- 2.1 - The Main libpcap API Overview
- 2.2 - Getting a List of Interfaces
- 2.3 - Opening a Network Interface for Capture
- 2.4 - Opening offline capture
- 2.5 - Setting a packet filter
- 2.6 - Reading one packet at a time
- 2.7 - Reading multiple packets with dispatch loops
- 2.8 - Dumping captured packet to an offline file
- 2.9 - Transmitting packets
- 2.10 - Close Pcap and PcapDumper handles
- Ch 3 - Packet Decoding
- Ch 4 - Internals
- Ch 5 - Protocols
- Ch 6 - Native API
This chapter discusses the main API of the libpcap wrapper itself. The most important class in all of jNetPcap SDK is the Pcap class. This class provides numerous static methods for getting captures started and setting various capture properties such as kernel capture buffer size, timeouts, filters, truncating packets and getting error messages.
You will find almost everything discussed in this chapter in java package org.jnetpcap. The JBuffer class is found in org.jnetpcap.nio and PcapPacket and JPacket classes are found under org.jnetpcap.packet package. Lastly the briefly mentioned ByteBuffer is part of the standard JRE 1.4 and above in package java.nio
»
Printer-friendly- Login or register to post comments
Send via Email
PDF Convert