Registry / networking / mdlayher-packet

mdlayher-packet

JSON →
library1.1.2gogounverified

Package packet provides access to Linux packet sockets (AF_PACKET).

go get github.com/mdlayher/packet
INSTALL
IMPORT
SIG · MDLAYHER-PACKET
M
mdlayher-packet
networkinggov1.1.2
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.

packet
github.com/mdlayher/packet

Opens a raw packet socket for low-level network access.

package main import ( "fmt" "github.com/mdlayher/packet" ) func main() { conn, _ := packet.Listen(nil, packet.Raw) defer conn.Close() fmt.Println("Listening on raw socket") }
Debug
Known issues
gotchaRequires Linux and root/CAP_NET_RAW capabilities.
fix
Run as root or grant CAP_NET_RAW capability.
affects: all
Upgrade
Version history
1.1.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
mdlayher-packet — go get mdlayher-packet · libregistry