aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/inet.erl
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-11-20 10:07:11 +0100
committerFredrik Gustafsson <[email protected]>2012-11-20 10:07:11 +0100
commite082a9bd5b08c5b8b95a3592c7bf2b449655bcb2 (patch)
treeba11ce7bc7d8e8fb7a5488d56efa0f0ef47e51c8 /lib/kernel/src/inet.erl
parente367eb44969b00cac910c8eb14e7b3ce3ee0cc91 (diff)
downloadotp-e082a9bd5b08c5b8b95a3592c7bf2b449655bcb2.tar.gz
otp-e082a9bd5b08c5b8b95a3592c7bf2b449655bcb2.tar.bz2
otp-e082a9bd5b08c5b8b95a3592c7bf2b449655bcb2.zip
Added specs and doc
Diffstat (limited to 'lib/kernel/src/inet.erl')
-rw-r--r--lib/kernel/src/inet.erl24
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).