package core

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = {
  1. name : string;
  2. aliases : string array;
  3. family : [ `Unix | `Inet | `Inet6 ];
  4. addresses : Unix.inet_addr array;
}

Structure of entries in the hosts database.

include sig ... end
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val getbyname : string -> t option

Find an entry in hosts with the given name.

NOTE: This function is not thread safe with certain versions of winbind using "wins" name resolution.

val getbyname_exn : string -> t
val getbyaddr : Unix.inet_addr -> t option

Find an entry in hosts with the given address.

val getbyaddr_exn : Unix.inet_addr -> t
val have_address_in_common : t -> t -> bool
OCaml

Innovation. Community. Security.