CHANGELOG
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[v0.14.1] - 2022-02-20
fixed
- mix iana.specials should write to Pfx's priv/specials, not that of parent project that might have Pfx as a dependency.
[v0.14.1] - 2022-02-20
fixed
- in mix.exs, list
:inets
and:xmerl
as extra application for all modes
[v0.14.0] - 2022-02-19
added
- mix task to update the local snapshot of the IANA IPv4/6 special registries
mix iana.specials
will update the local registry (if needed)
changed
- formatting an IPv6 prefix now uses '::' where appropiate
- Iana special registry entries now include
:termination
date as well- which is usually
:na
and sometimes "yyyy-mm"
- which is usually
[v0.13.0] - 2022-01-23
added
Pfx.invert/1
, as a proxy forPfx.bnot/1
, whose name is somewhat more obscure- has a note saying that using
bnot
directly, actually saves a function call
- has a note saying that using
changed
Pfx.compare/2
, now compares prefixes of mixed types as well (using the maxlen property)Pfx.format/2
, when given a:unit
of0
it reverts to the prefix'smaxlen
fixed
Pfx.minimize/1
- yields results in the same fashion as the first prefix in the list
- needed an pre-sort based on 'first-address' and then on
bit_size
in order to really minimize a list of prefixes
[v0.12.0] - 2022-01-16
added
Pfx.sigil_p/2
, so~p"1.1.1.0/24"
yields%Pfx{bits: <<1, 1, 1>>, maxlen: 32}
- modifiers to get address, mask, first, last, neighbor, parent or trimmed result instead
- additional modifiers to invert the result and/or turn it into a string or tuple format.
Pfx.sigil_p/3
, which allows for piping into~p()
Pfx.iana_special/2
, returns properties for a prefix, based on iana's special IPv4/6 registries.
changed
Pfx.address/1
now properly returns a full address prefix, always without mask- example: address({{1, 1, 1, 1}, 24}) -> {1, 1, 1, 1}
[v0.11.0] - 2022-01-11
fixed
Pfx.contrast/2
1.1.1.0/24 is left-adjacent to 1.1.2.0/25, not disjoint!- added
:left_nc
and:right_nc
=> left/right adjacent and but not combinable - added
:incompatible
for when two prefixes have different maxlen's (not raise ArgumentError) - added
:einvalid
if one of the prefixes is invalid (not raise ArgumentError)
- added
added
Pfx.minimize/1
, minimizes a list of prefixes while covering the same address range(s).- prefixes are grouped and minimized per maxlen property
[v0.10.1] - 2022-01-09
fixed
Pfx.member/3
, checkwidth
argument for validity and raise ArgumentError if invalid- fixed the Enumerable.Pfx.slice/1 implementation, so Enum.take & friends work properly
[v0.10.0] - 2021-12-29
added
Pfx.partition_range/2
which returns a list of prefixes, where range is given by:- a start prefix and a stop prefix, or
- a start prefix and a number of hosts
Pfx.to_tuple/2
to convert (with options) a prefix into an address-tuple- option
:mask
, default true, applies the mask and yields an address,length-tuple - option
:width
default 8 (or 16 in case maxlen is 128) - the width option allows for converting prefixes other than ipv4/6, eui48/64 as well
- option
[v0.9.0] - 2021-12-03
added
Pfx.address/1
, returns the address portion of given prefix without applying a mask.Pfx.type/1
which returns either :ip4, :ip6, :eui48, :eui64 or the prefix.maxlen property
fixed
- typespec for Pfx.new now includes Pfx.t as argument as well
- typespec for some others too
[v0.8.0] - 2021-11-15
added
- tests for
Pfx.pfxlen/1
- added
Pfx.parse/1
- added
Pfx.parse/2
changed
- type spec for
t:Pfx.prefix/t
now usest
instead ofPfx.t()
[v0.7.0] - 2021-07-27
added
Pfx.pfxlen/1
returns the number of bits in the prefix
changed
Pfx.mask/2
now takes 2 options (inv_mask and trim) and trims result by default
[v0.6.0] - 2021-07-22
added
Pfx.trim/1
trims all trailing zero's from given prefixPfx.mask/2
applies mask to prefix (changing its prefix.bits string)
[v0.5.0] - 2021-07-17
changed
- "Pfx.multicast/1" renamed to
Pfx.multicast_decode/1
and updated decoding Pfx.eui64_encode/1
now also accepts EUI-64 (only needs to flip 7th bit)
added
- added
Pfx.first/1
as a more generic version ofPfx.network/1
- added
Pfx.last/1
as a more generic version ofPfx.broadcast/1
- added
Pfx.from_hex/1
to create aPfx.t/0
from any hex string
[v0.4.0] - 2021-07-10
added
Pfx.eui64_encode/1
, which creates a modified EUI-64 from a EUI-48 addressPfx.eui64_decode/1
, which reverses a modified EUI-64 to an EUI-48 addressPfx.flip/2
, which flips a single bit in bitstringPfx.insert/3
, which inserts some bits into bitstringPfx.remove/3
, which removes some bits from bitstring
changed
Pfx.new/1
andPfx.from_mac/1
also parse EUI-64 in Cisco's dot formatPfx.teredo_decode/1
mirrors the representation for server/client to its pfx argument- functions raise their own exceptions when marshalling (instead of leaving that up to
Pfx.new/1
)
[v0.3.0] - 2021-07-08
added
Pfx.keep/2
to keep some msb bitsString.Chars
for MAC addresses with maxlen 64 (w/ hyphens)Pfx.from_mac/1
to support EUI-64 with ":"'s
changed
Pfx.new/1
now parses EUI-48 as wellPfx.new/1
now parses EUI-64 as well, unless using ':' for punctuationString.Chars
for MAC addresses with maxlen 48 uses hyphensString.Chars
no longer accepts invalidPfx.t/0
structsPfx.format/2
withoutopts
, uses same defaults asString.Chars
[v0.2.1] - 2021-07-04
added
Pfx.marshall/2
is now a public function
changed
- renamed
Pfx.teredo
toPfx.teredo_decode/1
[v0.2.0] - 2021-07-03
added
Pfx.teredo_encode/4
Pfx.drop/2
, which drops some lsb bits- improved documentation
[v0.1.1] - 2021-07-03
changed
Pfx.band/2
, result has same number of bits as its first argumentPfx.bor/2
, result has same number of bits as its first argumentPfx.bxor/2
, result has same number of bits as its first argument- IPv6 addresses in lowercase
fixed
Pfx.brot/2
, won't choke on rotating emptypfx.bits
Pfx.contrast/2
, 1.2.3.0/24 is really to the left of 1.2.4.0/24
[v0.1.0] - 2021-06-28
- initial version