erl_epmd

Module

erl_epmd

Module Summary

Erlang interface towards epmd

Since

Module erl_epmd was introduced in OTP R14B.

Description

This module communicates with the EPMD daemon, see epmd. To implement your own epmd module please see ERTS User's Guide: How to Implement an Alternative Node Discovery for Erlang Distribution

Exports

This function is invoked as this module is added as a child of the erl_distribution supervisor.

register_node(Name, Port) -> Result
OTP 21.0
register_node(Name, Port, Driver) -> Result
OTP 21.0

Types

Registers the node with epmd and tells epmd what port will be used for the current node. It returns a creation number. This number is incremented on each register to help with identifying if a node is reconnecting to epmd.

port_please(Name, Host) -> {ok, Port, Version} | noport
OTP 21.0
port_please(Name, Host, Timeout) -> {ok, Port, Version} | noport
OTP 21.0

Types

Requests the distribution port for the given node of an EPMD instance. Together with the port it returns a distribution protocol version which has been 5 since Erlang/OTP R6.

address_please(Name, Host, AddressFamily) ->
Success | {error, term()}
OTP 21.0

Types

Called by the distribution module. Resolves the Host to an IP address.

Another epmd module may return port and distribution protocol version as well.

names(Host) -> {ok, [{Name, Port}]} | {error, Reason}
OTP 21.0

Types

Called by net_adm:names/0. Host defaults to the localhost. Returns the names and associated port numbers of the Erlang nodes that epmd registered at the specified host. Returns {error, address} if epmd is not operational.

Example:

(arne@dunn)1> erl_epmd:names(localhost).
{ok,[{"arne",40262}]}

© 2010–2020 Ericsson AB
Licensed under the Apache License, Version 2.0.