VintageNet.IP.to_subnet

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

to_subnet(arg, subnet_bits)

View Source

Specs

Utility function to trim an IP address to its subnet

Examples:

iex> VintageNet.IP.to_subnet({192, 168, 1, 50}, 24)
{192, 168, 1, 0}

iex> VintageNet.IP.to_subnet({192, 168, 255, 50}, 22)
{192, 168, 252, 0}

iex> VintageNet.IP.to_subnet({64768, 43690, 0, 0, 4144, 58623, 65276, 33158}, 64)
{64768, 43690, 0, 0, 0, 0, 0, 0}