Tidy up documentation.
This commit is contained in:
parent
5e258e11ad
commit
9fe8c49296
5 changed files with 6 additions and 14 deletions
|
@ -1,7 +1,5 @@
|
||||||
defmodule IP.Address.Helpers do
|
defmodule IP.Address.Helpers do
|
||||||
@moduledoc """
|
@moduledoc false
|
||||||
Helpful macros related to IP addresses.
|
|
||||||
"""
|
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Guard clause macro for "between 0 and 0xffffffff"
|
Guard clause macro for "between 0 and 0xffffffff"
|
||||||
|
|
|
@ -3,15 +3,13 @@ defmodule IP.Address.ULA do
|
||||||
alias IP.Prefix.EUI64
|
alias IP.Prefix.EUI64
|
||||||
use Bitwise
|
use Bitwise
|
||||||
|
|
||||||
@moduledoc """
|
@moduledoc false
|
||||||
Used to generate Unique Local Addresses
|
|
||||||
"""
|
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Generates an IPv6 Unique Local Address
|
Generates an IPv6 Unique Local Address
|
||||||
"""
|
"""
|
||||||
@spec generate(binary, non_neg_integer, true | false) :: \
|
@spec generate(binary, non_neg_integer, true | false) :: \
|
||||||
{:ok, Address.ipv4} | {:error, term}
|
{:ok, Address.ipv6} | {:error, term}
|
||||||
def generate(mac, subnet_id, locally_assigned)
|
def generate(mac, subnet_id, locally_assigned)
|
||||||
when is_binary(mac)
|
when is_binary(mac)
|
||||||
and is_integer(subnet_id) and subnet_id >= 0 and subnet_id <= 0xffff
|
and is_integer(subnet_id) and subnet_id >= 0 and subnet_id <= 0xffff
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
defmodule IP.Prefix.EUI64 do
|
defmodule IP.Prefix.EUI64 do
|
||||||
use Bitwise
|
use Bitwise
|
||||||
|
|
||||||
@moduledoc """
|
@moduledoc false
|
||||||
Handles functions related to EUI64 addresses.
|
|
||||||
"""
|
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Parse a mac address into an integer.
|
Parse a mac address into an integer.
|
||||||
|
|
|
@ -2,9 +2,7 @@ defmodule IP.Prefix.Parser do
|
||||||
alias IP.{Prefix, Address}
|
alias IP.{Prefix, Address}
|
||||||
import IP.Prefix.Helpers
|
import IP.Prefix.Helpers
|
||||||
|
|
||||||
@moduledoc """
|
@moduledoc false
|
||||||
Used internally by `IP.Prefix.from_string` to parse IP prefixes.
|
|
||||||
"""
|
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Attempts to parse a `prefix` of unknown IP version.
|
Attempts to parse a `prefix` of unknown IP version.
|
||||||
|
|
|
@ -47,7 +47,7 @@ defmodule IP.Scope do
|
||||||
]
|
]
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Return the scope of `address``
|
Return the scope of `address`
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue