package ipaddr
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=39bfbbe2d650c26be7b5581d288eaedd1b47b842cdebaa08d6afd968983fc3b4
md5=471a594563bb9c3dd91ae912b5ffd6ed
doc/ipaddr/Ipaddr/V6/Prefix/index.html
Module V6.Prefix
Source
A module for manipulating IPv6 network prefixes.
Type of a internet protocol subnet
network_address prefix addr
is the address with prefix prefix
and suffix from addr
. See <http://tools.ietf.org/html/rfc4291#section-2.3>.
of_string_exn cidr
is the subnet prefix represented by the CIDR string, cidr
. Raises Parse_error
if cidr
is not a valid representation of a CIDR notation routing prefix.
Same as of_string_exn
but returns a result type instead of raising an exception.
Same as of_string_exn
but takes as an extra argument the offset into the string for reading.
to_string prefix
is the CIDR notation string representation of prefix
, i.e. XXX:XX:X::XXX/XX.
pp f prefix
outputs a human-readable representation of prefix
to the formatter f
.
of_address_string_exn cidr_addr
is the address and prefix represented by cidr_addr
. Raises Parse_error
if cidr_addr
is not a valid representation of a CIDR-scoped address.
Same as of_address_string_exn
but returns an option type instead of raising an exception.
to_address_string prefix addr
is the network address constructed from prefix
and addr
.
to_buffer buf prefix
writes the string representation of prefix
to the buffer buf
.
to_address_buffer buf prefix addr
writes string representation of the network address representing addr
in prefix
to the buffer buf
.
of_netmask netmask addr
is the subnet prefix of addr
with netmask netmask
.
subset ~subnet ~network
checks whether subnet
is contained within network
.
of_addr ip
create a subnet composed of only one address, ip
. It is the same as make 128 ip
.
Global Unicast addresses that don't use Modified EUI64 interface identifiers, ::/3.
include Map.OrderedType with type t := t
A total ordering function over the keys. This is a two-argument function f
such that f e1 e2
is zero if the keys e1
and e2
are equal, f e1 e2
is strictly negative if e1
is smaller than e2
, and f e1 e2
is strictly positive if e1
is greater than e2
. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare
.