Skip to content
Ron Hashimoto edited this page Aug 3, 2016 · 5 revisions

MACAddress represents an IEEE 802 media access control address.

Usage

import MACAddress from 'dripcap/mac';

let mac = new MACAddress('00:00:00:00:00:00');

Reference

Methods

#constructor (String addr) -> MACAddress

Constructs a MACAddress from a String.

#constructor (Buffer addr) -> MACAddress

Constructs a MACAddress from a Buffer. addr.length must be 6.

#equals (MACAddress addr) -> Boolean

Returns true if this and the given MACAddress has the same address.

#toString () -> String

Returns a string representing the address.

#toJSON () -> String

JSON serializer interface.

#toMsgpack () -> Array

MessagePack serializer interface.

Clone this wiki locally