Registry / networking / tsg-gopacket

tsg-gopacket

JSON →
library0.0.0-20200626092518-2ab8e397a786gogounverified

A Go library for packet decoding and crafting, supporting multiple network protocols.

go get github.com/tsg/gopacket
INSTALL
IMPORT
SIG · TSG-GOPACKET
T
tsg-gopacket
networkinggov0.0.0-20200626092518-2ab8e397a786
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gopacket
github.com/tsg/gopacket

Decode an Ethernet packet from raw bytes.

package main import ( "fmt" "github.com/tsg/gopacket" "github.com/tsg/gopacket/layers" ) func main() { packet := gopacket.NewPacket( []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, 0x00, 0x1c, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x40, 0x06, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x01, 0x7f, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, layers.LayerTypeEthernet, gopacket.Default, ) fmt.Println(packet) }
Debug
Known issues
gotchaThis is a fork of google/gopacket; API may differ slightly.
fix
Check documentation for any differences from the original.
affects: all
Upgrade
Version history
0.0.0-20200626092518-2ab8e397a786latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
18
OpenAI (training)
1
Resources
tsg-gopacket — go get tsg-gopacket · libregistry