MCPcopy
hub / github.com/google/gopacket

github.com/google/gopacket @v1.1.19 sqlite

repository ↗ · DeepWiki ↗ · release v1.1.19 ↗
3,124 symbols 8,635 edges 209 files 1,394 documented · 45%
README

GoPacket

This library provides packet decoding capabilities for Go. See godoc for more details.

Build Status GoDoc

Minimum Go version required is 1.5 except for pcapgo/EthernetHandle, afpacket, and bsdbpf which need at least 1.9 due to x/sys/unix dependencies.

Originally forked from the gopcap project written by Andreas Krennmair ak@synflood.at (http://github.com/akrennmair/gopcap).

Extension points exported contracts — how you extend this code

ApplicationLayer (Interface)
ApplicationLayer is the packet layer corresponding to the TCP/IP layer 4 (OSI layer 7), also known as the packet payload [13 …
base.go
Dumper (Interface)
Dumper dumps verbose information on a value. If a layer type implements Dumper, then its LayerDump() string will includ [6 …
packet.go
SerializableLayer (Interface)
SerializableLayer allows its implementations to be written out as a set of bytes, so those bytes may be sent on the wire [65 …
writer.go
StreamFactory (Interface)
StreamFactory is used by assembly to create a new stream for each new TCP session. [12 implementers]
reassembly/tcpassembly.go
StreamFactory (Interface)
StreamFactory is used by assembly to create a new stream for each new TCP session. [12 implementers]
tcpassembly/assembly.go
PacketSourceResolution (Interface)
PacketSourceResolution is an interface for packet data sources that support reporting the timestamp resolution of the aq [4 …
time.go
DecodeFeedback (Interface)
DecodeFeedback is used by DecodingLayer layers to provide decoding metadata. [3 implementers]
decode.go
DecodingLayer (Interface)
DecodingLayer is an interface for packet layers that can decode themselves. The important part of DecodingLayer is that [1 …
parser.go

Core symbols most depended-on inside this repo

Error
called by 388
base.go
ErrorLayer
called by 235
packet.go
NewPacket
called by 231
packet.go
New
called by 218
tcpassembly/assembly.go
Printf
called by 166
ip4defrag/defrag.go
RegisterLayerType
called by 142
layertype.go
Layer
called by 123
packet.go
SetTruncated
called by 101
decode.go

Shape

Method 1,535
Function 897
Struct 430
TypeAlias 225
Interface 33
Class 2
FuncType 2

Languages

Go100%
Python1%

Modules by API surface

layers/dot11.go264 symbols
layers/radiotap.go113 symbols
layers/sflow.go111 symbols
reassembly/tcpassembly.go102 symbols
layers/lldp.go84 symbols
packet.go80 symbols
layers/enums_generated.go78 symbols
layers/decode_test.go76 symbols
reassembly/tcpassembly_test.go71 symbols
pcap/pcap_windows.go71 symbols
pcap/pcap_unix.go66 symbols
pcap/pcap.go65 symbols

Dependencies from manifests, versioned

golang.org/x/lintv0.0.0-2020030220585 · 1×
golang.org/x/netv0.0.0-2019062020020 · 1×
golang.org/x/sysv0.0.0-2019041221310 · 1×

For agents

$ claude mcp add gopacket \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact