Module z_ip_address

Misc utility URL functions for zotonic.

Copyright © 2012-2022 Marc Worrell

Authors: Marc Worrell.

Description

Misc utility URL functions for zotonic

Function Index

ip_match/2Check if an IP address matches a list of addresses and masks like "127.0.0.0/8,10.0.0.0/8,fe80::/10".
is_local/1An IP address is local if it matches "127.0.0.0/8,10.0.0.0/8,192.168.0.0/16,172.16.0.0/12,169.254.0.0/16,::1,fd00::/8,fe80::/10,100.64.0.0/10".
is_local_name/1Check if the host name resolves to a local IP address.

Function Details

ip_match/2

ip_match(IP::undefined | string() | binary() | tuple(), IPs::local | any | none | list() | string() | binary()) -> boolean()

Check if an IP address matches a list of addresses and masks like "127.0.0.0/8,10.0.0.0/8,fe80::/10"

is_local/1

is_local(X1::inet:ip_address()) -> boolean()

An IP address is local if it matches "127.0.0.0/8,10.0.0.0/8,192.168.0.0/16,172.16.0.0/12,169.254.0.0/16,::1,fd00::/8,fe80::/10,100.64.0.0/10"

is_local_name/1

is_local_name(Name::string() | binary()) -> boolean()

Check if the host name resolves to a local IP address.


Generated by EDoc