To focus the search input from anywhere on the page, press the 'S' key.
in-package search v0.1.0
Library
Module
Module type
Parameter
Class
Class type
A library for manipulation of IP address representations.
2.9.0 - homepage
include sig ... end
Type of ordered address scope classifications
include sig ... end
val scope_of_sexp : Sexplib.Sexp.t -> scope
val sexp_of_scope : scope -> Sexplib.Sexp.t
module V4 : sig ... end
A collection of functions for IPv4 addresses.
module V6 : sig ... end
A collection of functions for IPv6 addresses.
include sig ... end
val v4v6_of_sexp :
(Sexplib.Sexp.t -> 'v4) ->
(Sexplib.Sexp.t -> 'v6) ->
Sexplib.Sexp.t ->
('v4, 'v6) v4v6
val sexp_of_v4v6 :
('v4 -> Sexplib.Sexp.t) ->
('v6 -> Sexplib.Sexp.t) ->
('v4, 'v6) v4v6 ->
Sexplib.Sexp.t
val to_string : t -> string
to_string addr
is the text string representation of addr
.
to_buffer buf addr
writes the text string representation of addr
into buf
.
val pp : Format.formatter -> t -> unit
pp f ip
outputs a human-readable representation of ip
to the formatter f
.
val pp_hum : Format.formatter -> t -> unit
pp_hum f ip
outputs a human-readable representation of ip
to the formatter f
.
val of_string_exn : string -> t
of_string_exn s
parses s
as an IPv4 or IPv6 address. Raises Parse_error
if s
is not a valid string representation of an IP address.
val of_string : string -> t option
Same as of_string_exn
but returns an option type instead of raising an exception.
val of_string_raw : string -> int Pervasives.ref -> t
Same as of_string_exn
but takes as an extra argument the offset into the string for reading.
v4_of_v6 ipv6
is the IPv4 representation of the IPv6 address ipv6
. If ipv6
is not an IPv4-mapped address, None is returned.
val is_global : t -> bool
is_global addr
is a predicate indicating whether addr
globally addresses a node.
val is_multicast : t -> bool
is_multicast addr
is a predicate indicating whether addr
is a multicast address.
val is_private : t -> bool
is_private addr
is a predicate indicating whether addr
privately addresses a node.
multicast_to_mac addr
is the MAC address corresponding to the multicast address addr
. See V4.multicast_to_mac
and V6.multicast_to_mac
.
val to_domain_name : t -> string list
to_domain_name addr
is the domain name label list for reverse lookups of addr
. This includes the .arpa.
suffix.
module Prefix : sig ... end
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 Pervasives.compare
.