# Pcap

## Pcap

- [Introduction](https://pcap.ardikars.com/master.md): Pcap provides a packet processing library for rapid development on top of JVM languages.
- [Getting Started](https://pcap.ardikars.com/getting-started.md)
- [Dependency management](https://pcap.ardikars.com/getting-started/dependency-management.md): Pcap dependency management.
- [Installing Libpcap or Npcap](https://pcap.ardikars.com/getting-started/installing-libpcap-or-npcap.md): Installing required third party software.
- [Run as non root user](https://pcap.ardikars.com/getting-started/run-as-non-root.md): Operating System might require the root user to perform some operation.
- [Logging](https://pcap.ardikars.com/getting-started/logging.md): Logging
- [Obtaining the device list](https://pcap.ardikars.com/getting-started/obtaining-the-device-list.md): The following code retrieves the list of network interfaces that can be opened with Pcap.live(Interface, LiveOptions()).
- [Opening an adapter and capturing the packets](https://pcap.ardikars.com/getting-started/opening-an-adapter-and-capturing-the-packets.md): Obtain a packet capture handle (Pcap) with a specific network interface (adapter) to look at packets on the network and process it with Pcap.loop(int, PacketHandler, T args).
- [Capturing the packets without the callback](https://pcap.ardikars.com/getting-started/capturing-the-packets-without-the-callback.md): Handling a callback is sometimes not practical, it often makes the program more complex. So we need an alternative method to capture the packets without a callback.
- [Capture statistics](https://pcap.ardikars.com/getting-started/capture-statistics.md): Getting statistics about packets received and dropped in a live capture.
- [Filtering the traffic](https://pcap.ardikars.com/getting-started/filtering-the-traffic.md): In order to cause only certain packets to be returned when reading packets, a filter can be set on a pcap handle.
- [Write the packets to a capture file](https://pcap.ardikars.com/getting-started/write-the-packets-to-a-capture-file.md): Capture the packets and write them to a capture file.
- [Read packets from a capture file.](https://pcap.ardikars.com/getting-started/read-packet-from-a-capture-file.md): Read packets from the capture file that was created from the previous section.
- [Sending packets](https://pcap.ardikars.com/getting-started/sending-packets.md): Send a hand-crafted packet to the network.
- [I/O Multiplexing](https://pcap.ardikars.com/getting-started/i-o-multiplexing.md): Capturing on multiple interfaces with single thread.
- [Restricted Method](https://pcap.ardikars.com/getting-started/restricted-method.md): Restricted method
- [Developer Guide](https://pcap.ardikars.com/developer-guide.md): Developer guideline.
- [Branches to look](https://pcap.ardikars.com/developer-guide/branches-to-look.md): Git branches.
- [Build from Source](https://pcap.ardikars.com/developer-guide/build-from-source-1.md): Build jars from source
- [Notes](https://pcap.ardikars.com/developer-guide/notes.md): Important notes for developers.
- [Packet Structure](https://pcap.ardikars.com/packet-structure.md)
- [Packet Header](https://pcap.ardikars.com/packet-structure/packet-header.md): Generic per-packet information.
- [Packet Buffer](https://pcap.ardikars.com/packet-structure/packet-buffer.md): Used to wrap low-lavel memory address (native buffer/off-heap buffer).
- [Packet Codec](https://pcap.ardikars.com/packet-codec.md): Crafting packet.
- [Using packet codec](https://pcap.ardikars.com/packet-codec/using-packet-codec.md): How to use packet codec
- [Adding protocol support](https://pcap.ardikars.com/packet-codec/adding-protocol-support.md): Adding protocol support.
- [Thanks to](https://pcap.ardikars.com/thanks-to.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information, you can query the documentation dynamically by asking a question.
Perform an HTTP GET request on a page URL with the `ask` query parameter:
```
GET https://pcap.ardikars.com/master.md?ask=<question>
```
The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.
Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
