Module Ip.Cidr

module Cidr: sig .. end
CIDR addresses are a concise way to write network addresses, with network IP then netmask length, like: 192.168.0.0/16.

include struct ... end
val of_string : string -> t
val random : ?mask:int -> unit -> t
val single : Ip.Addr.t -> t
Build a CIDR from a single address
val mem : t -> Ip.Addr.t -> bool
val to_enum : t -> Ip.Addr.t BatEnum.t
val zero_addr : t -> Ip.Addr.t
Returns the subnet-zero address of a CIDR
val all1s_addr : t -> Ip.Addr.t
Returns the all-ones address of a CIDR
val local_addrs : t -> Ip.Addr.t Batteries.Enum.t
Returns the set (as an Enum) of all IP addresses in the given CIDR range (that is, all minus subnet zero and all-ones subnet). For /32, returns the /32 singleton. For /31, return the empty enum.
val random_addrs : t -> int -> Ip.Addr.t BatEnum.t