Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mac.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ func (mac MAC) String() string {
return unsafe.String(unsafe.SliceData(buf), 17)
}

// Address returns the MAC address in the typical (big-endian) format.
func (mac MAC) Address() [6]uint8 {
return [6]uint8{mac[5], mac[4], mac[3], mac[2], mac[1], mac[0]}
}

const hexDigit = "0123456789ABCDEF"

// AppendText appends the textual representation of itself to the end of b
Expand Down
Loading