diff options
author | Fredrik Gustafsson <[email protected]> | 2012-11-20 10:07:11 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2012-11-20 10:07:11 +0100 |
commit | e082a9bd5b08c5b8b95a3592c7bf2b449655bcb2 (patch) | |
tree | ba11ce7bc7d8e8fb7a5488d56efa0f0ef47e51c8 /lib/kernel/src | |
parent | e367eb44969b00cac910c8eb14e7b3ce3ee0cc91 (diff) | |
download | otp-e082a9bd5b08c5b8b95a3592c7bf2b449655bcb2.tar.gz otp-e082a9bd5b08c5b8b95a3592c7bf2b449655bcb2.tar.bz2 otp-e082a9bd5b08c5b8b95a3592c7bf2b449655bcb2.zip |
Added specs and doc
Diffstat (limited to 'lib/kernel/src')
-rw-r--r-- | lib/kernel/src/inet.erl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl index 133cc523fa..e6f6a28896 100644 --- a/lib/kernel/src/inet.erl +++ b/lib/kernel/src/inet.erl @@ -529,21 +529,45 @@ getservbyname(Name, Protocol) when is_atom(Name) -> Error -> Error end. +-spec ipv4_address(Address) -> + {ok, IPv4Address} | {error, einval} when + Address :: string(), + IPv4Address :: ip_address(). ipv4_address(Addr) -> inet_parse:ipv4_address(Addr). +-spec ipv6_address(Address) -> + {ok, IPv6Address} | {error, einval} when + Address :: string(), + IPv6Address :: ip_address(). ipv6_address(Addr) -> inet_parse:ipv6_address(Addr). +-spec ipv4strict_address(Address) -> + {ok, IPv4Address} | {error, einval} when + Address :: string(), + IPv4Address :: ip_address(). ipv4strict_address(Addr) -> inet_parse:ipv4strict_address(Addr). +-spec ipv6strict_address(Address) -> + {ok, IPv6Address} | {error, einval} when + Address :: string(), + IPv6Address :: ip_address(). ipv6strict_address(Addr) -> inet_parse:ipv6strict_address(Addr). +-spec parse_address(Address) -> + {ok, IPAddress} | {error, einval} when + Address :: string(), + IPAddress :: ip_address(). parse_address(Addr) -> inet_parse:address(Addr). +-spec parse_strict_address(Address) -> + {ok, IPAddress} | {error, einval} when + Address :: string(), + IPAddress :: ip_address(). parse_strict_address(Addr) -> inet_parse:strict_address(Addr). |