type addr = tval mask : int -> addrmask n is the pseudo-address of an n bit subnet mask.
network_address cidr addr is the address with prefix cidr and suffix from addr. See <http://tools.ietf.org/html/rfc4291#section-2.3>.
val of_string : string -> (t, [> `Msg of string ]) Stdlib.resultof_string cidr is the subnet prefix represented by the CIDR string, cidr. Returns a human-readable parsing error message if cidr is not a valid representation of a CIDR notation routing prefix.
val of_string_exn : string -> tof_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.
val of_string_raw : string -> int Stdlib.ref -> tSame as of_string_exn but takes as an extra argument the offset into the string for reading.
val to_string : t -> stringto_string cidr is the CIDR notation string representation of cidr, i.e. XXX.XX.X.XXX/XX.
val pp : Stdlib.Format.formatter -> t -> unitpp f cidr outputs a human-readable representation of cidr to the formatter f.
val to_buffer : Stdlib.Buffer.t -> t -> unitto_buffer buf cidr writes the string representation of cidr into the buffer buf.
of_netmask_exn ~netmask ~address is the subnet prefix of address with netmask netmask.
val of_netmask : netmask:addr -> address:addr -> (t, [> `Msg of string ]) Stdlib.resultof_netmask ~netmask ~address is the cidr of address 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 32 ip.
val global : tThe default route, all addresses in IPv4-space, 0.0.0.0/0.
val loopback : tThe host loopback network, 127.0.0.0/8.
val link : tThe local-link network, 169.254.0.0/16.
val relative : tThe relative addressing network, 0.0.0.0/8.
val multicast : tThe multicast network, 224.0.0.0/4.
val private_10 : tThe private subnet with 10 as first octet, 10.0.0.0/8.
val private_172 : tThe private subnet with 172 as first octet, 172.16.0.0/12.
val private_192 : tThe private subnet with 192 as first octet, 192.168.0.0/16.
val private_blocks : t listThe privately addressable networks: loopback, link, private_10, private_172, private_192.
val bits : t -> intbits cidr is the bit size of the cidr prefix.
include Stdlib.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.