InetAton (inet_aton v0.2.0)
Converts the IP address from the IPv4 numbers-and-dots notation into a "hostlong" in network byte order
Ported from https://gist.github.com/marcelog/8b5fe7d3aaa83eca2d0f
Link to this section Summary
Functions
iex> InetAton.convert("127.0.0.1") 2130706433
Get the bytes of the given ip address in network byte order
Link to this section Functions
Link to this function
convert(ip_address)
Specs
convert(binary()) :: pos_integer()
iex> InetAton.convert("127.0.0.1") 2130706433
Link to this function
get_bytes_in_network_byte_order(ip_address)
Specs
get_bytes_in_network_byte_order(binary()) :: <<_::32>>
Get the bytes of the given ip address in network byte order
iex> InetAton.get_bytes_in_network_byte_order("127.0.0.1") <<1, 0, 0, 127>>