VintageNet.IP.prefix_length_to_subnet_mask

You're seeing just the function prefix_length_to_subnet_mask, go back to VintageNet.IP module for more information.
Link to this function

prefix_length_to_subnet_mask(atom, len)

View Source

Specs

prefix_length_to_subnet_mask(:inet | :inet6, VintageNet.prefix_length()) ::
  :inet.ip_address()

Convert an IPv4 or IPv6 prefix length to a subnet mask.

Examples:

iex> VintageNet.IP.prefix_length_to_subnet_mask(:inet, 24)
{255, 255, 255, 0}

iex> VintageNet.IP.prefix_length_to_subnet_mask(:inet, 28)
{255, 255, 255, 240}

iex> VintageNet.IP.prefix_length_to_subnet_mask(:inet6, 64)
{65535, 65535, 65535, 65535, 0, 0, 0, 0}