Mac.mask
You're seeing just the function
mask
, go back to Mac module for more information.
Specs
mask(0..48, :integer) :: 0..281_474_976_710_655
mask(0..48, :binary) :: <<_::48>>
mask(0..48, :mac) :: t()
generates a mask for the first n bits of the mac address.
iex> Mac.mask(1)
{0x80, 0, 0, 0, 0, 0}
iex> Mac.mask(16)
{0xFF, 0xFF, 0, 0, 0, 0}
you may pass another mode to the second parameter for other formats.
iex> Mac.mask(16, :binary)
<<0xFF, 0xFF, 0, 0, 0, 0>>
iex> Mac.mask(16, :integer)
0xFFFF_0000_0000