Created
February 20, 2011 23:41
-
-
Save l1x/836426 to your computer and use it in GitHub Desktop.
inet in erlang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -type hostname() :: atom() | string(). | |
| -type ip4_address() :: {0..255,0..255,0..255,0..255}. | |
| -type ip6_address() :: {0..65535,0..65535,0..65535,0..65535, | |
| 0..65535,0..65535,0..65535,0..65535}. | |
| -type ip_address() :: ip4_address() | ip6_address(). | |
| -type ip_port() :: 0..65535. | |
| -record(hostent, | |
| { | |
| h_name :: hostname(), %% offical name of host | |
| h_aliases = [] :: [hostname()], %% alias list | |
| h_addrtype :: 'inet' | 'inet6', %% host address type | |
| h_length :: non_neg_integer(), %% length of address | |
| h_addr_list = [] :: [ip_address()] %% list of addresses from name server | |
| }). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment