|
Please find the links to examples source texts
archves at the end of this page.
Simple example demonstrates the basic features of the Packet Sniffer SDK library.
Please see its source texts to learn:
- How to start working with Packet Sniffer SDK library;
- How to get information about network adapters installed on the system with Packet Sniffer SDK library;
- How to start working with the network adapter;
- How to send a packet synchronously;
- How to send a packet asynchronously;
- How to create a simple BPF filter for IP traffic;
- How to capture and process a packet;
- How to obtain the network adapter statistics;
- How to obtain the BPF user-settable filter statistics.


Ping example shows how to use Packet Sniffer SDK to create a simple administrative utility. Please see its source texts to learn:
- How to create an ARP packet and make an ARP request correctly to get MAC address by the remote host IP;
- How to create a BPF filter for ARP traffic;
- How to create an ICMP packet, and incapsulate it into Ethernet and IP packets;
- How to create a BPF filter for ICMP traffic;
- How to send ICMP requests and process ICMP answers correctly.

Packet dump example is ready-to-use packet sniffer, demonstrates the advanced features
of the Packet Sniffer SDK library. Please see its source texts to learn:
- How to initialize Packet Sniffer SDK library;
- How to create Packet Sniffer SDK library objects;
- How to detect network adapters set on the system;
- How to open and close network adapters;
- How to set MAC filters;
- How to work with BPF filters (create filters, load a filter from a file, set a filter for an adapter, activate a filter on the network adapter);
- How to dump packets into a file.
- Important: How to use asynchronous packets queue (HNQueue component).
We strongly recommend this technique to make the packets processing as fast as possible in highly productive applications for traffic analysis.
Packet dump example control panel.

Packet dump output example console.

PacketStat example demonstrates work of the Packet Sniffer SDK library under extreme load. Please see its source texts to learn:
- How to capture and process a packet;
- How to use the asynchronous packets queue (HNQueue component) to minimize packets loss on Gigabit networks;
- How to access to Ethernet, ARP, ICMP, IP, TCP, and UDP packets headers and data for further analysis and processing.
PacketStat example screenshot

Local traffic monitor example
Local traffic monitor example shows how to use Packet Sniffer SDK to create a simple
administrative utility for capturing of the local TCP/UDP traffic. Also it saves
TCP session data to files. Please see its source texts to learn:
- How to initialize PSSDK;
- How to capture local TCP/UDP traffic;
- How to use asynchronous packets queue (HNQueue component);
- How to display local host TCP sessions binded to local processes;
- How to save captured TCP sessions data to files.
Local traffic monitor example screenshots


PSSDK stress-test example demonstrates high-performance traffic capturing with using of asynchronous queue (HNQueue component). Please see its source texts to learn:
- How to initialize PSSDK;
- How to capture traffic using asynchronous queue (HNQueue component);
- How to get network adapter and BPF filter statistics;
- How to save captured data to a file.

TCPStat example shows how to use Packet Sniffer SDK to create a simple
administrative utility for displaying established TCP sessions and dumping
sessions data to files. Please see its source texts to learn:
- How to initialize PSSDK;
- How to capture traffic using asynchronous queue (HNQueue component);
- How to get network adapter and BPF filter statistics;
- How to use BPF filter;
- How to display existing TCP sessions;
- How to assemble TCP sessions from captured packets in real time;
- How to save assembled TCP sessions in files.

|