package devkit

  1. Overview
  2. Docs
Development kit - general purpose library

Install

Dune Dependency

Authors

Maintainers

Sources

devkit-1.3.tbz
sha256=dae965685dceed47ad8e9844f12fe707dafdf2c3bdd46d0431d5b4d1e7754b23
sha512=b94ade804d751db87434042bbaa821fa8e82e233820a76806f910e2da040094b137e88a3579911a1626930912622b064c776ddbcb6991fb7111021ebf6553fdc

doc/devkit.core/Devkit_core/Network/index.html

Module Devkit_core.NetworkSource

Manipulating network addresses

Sourcetype ipv4
Sourcetype ipv4_cidr
Sourceval ipv4_null : ipv4
Sourceval bytes_of_ipv4 : ipv4 -> int * int * int * int
Sourceval string_of_ipv4 : ipv4 -> string
Sourceval ipv4_of_string_exn : string -> ipv4
Sourceval ipv4_of_string_null : string -> ipv4
Sourceval ipv4_of_int32 : int32 -> ipv4
Sourceval int32_of_ipv4 : ipv4 -> int32
Sourceval is_ipv4_slow : string -> bool
Sourceval is_ipv4 : string -> bool
Sourceval ipv4_of_int : int -> ipv4
Sourceval int_of_ipv4 : ipv4 -> int
Sourceval class_c : ipv4 -> ipv4
Sourceval ipv4_to_yojson : ipv4 -> Yojson.Safe.t
Sourceval ipv4_of_yojson : Yojson.Safe.t -> (ipv4, string) result
Sourcemodule IPv4 : sig ... end
Sourceval cidr_of_string_exn : string -> ipv4_cidr

accepts addr/n notation or single ip

Sourceval range_of_cidr : ipv4_cidr -> ipv4 * ipv4
Sourceval prefix_of_cidr : ipv4_cidr -> ipv4
Sourceval ipv4_matches : ipv4 -> ipv4_cidr -> bool
Sourceval is_ipv4_special : ipv4 -> bool
Sourceval special_cidr : ipv4_cidr list
Sourceval private_network_ip : unit -> Unix.inet_addr
  • returns

    ip address of this machine on private network, with 127.0.0.1 as a fallback

Sourceval public_network_ips : unit -> (string * Unix.inet_addr) list
  • returns

    interfaces and associated ip addresses of this machine on public network

Sourceval private_network_ips : unit -> (string * Unix.inet_addr) list
  • returns

    interfaces and associated ip addresses of this machine on private network

OCaml

Innovation. Community. Security.