Registry / networking / mdlayher-ethernet

mdlayher-ethernet

JSON →
library0.0.0-20220221185849-529eae5b6118gogounverified

Package ethernet implements marshaling and unmarshaling of IEEE 802.3 Ethernet II frames and IEEE 802.1Q VLAN tags.

go get github.com/mdlayher/ethernet
INSTALL
IMPORT
SIG · MDLAYHER-ETHERNET
M
mdlayher-ethernet
networkinggov0.0.0-20220221185849-529eae5b6118
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.

ethernet
github.com/mdlayher/ethernet

Marshals an Ethernet frame to binary.

package main import ( "fmt" "github.com/mdlayher/ethernet" ) func main() { frame := &ethernet.Frame{ Destination: ethernet.Broadcast, Source: ethernet.Broadcast, EtherType: ethernet.EtherTypeIPv4, Payload: []byte{0x00}, } b, _ := frame.MarshalBinary() fmt.Printf("Frame bytes: %x\n", b) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20220221185849-529eae5b6118latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

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