gopacket: github.com/google/gopacket/examples

Directories

PathSynopsis
afpacketafpacket provides a simple example of using afpacket with zero-copy to read packet data.
arpscanarpscan implements ARP scanning of all interfaces' local networks using gopacket and its subpackages.
bidirectionalThis binary provides an example of connecting up bidirectional streams from the unidirectional streams provided by gopacket/tcpassembly.
bytediffThis binary shows how to display byte differences to users via the bytediff library.
httpassemblyThis binary provides sample code for using the gopacket TCP assembler and TCP stream reader.
pcapdumpThe pcapdump binary implements a tcpdump-like command line tool with gopacket using pcap as a backend data collection mechanism.
pcaplayThe pcaplay binary load an offline capture (pcap file) and replay it on the select interface, with an emphasis on packet timing
pfdumpThe pfdump binary implements a tcpdump-like command line tool with gopacket using pfring as a backend data collection mechanism.
reassemblydumpThe pcapdump binary implements a tcpdump-like command line tool with gopacket using pcap as a backend data collection mechanism.
snoopreadsnoopread is a example for read a snoop file using gopacket and its subpackages and output the decoded data with a package count
statsassemblyThis binary provides sample code for using the gopacket TCP assembler raw, without the help of the tcpreader library.
synscansynscan implements a TCP syn scanner on top of pcap.
utilPackage util provides shared utilities for all gopacket examples.

Updated 2019-07-08. Refresh now. Tools for package owners.