From 662f3c7ba50ff8ec13d86171bcfc61fd3da9deed Mon Sep 17 00:00:00 2001 From: Timmo Verlaan Date: Mon, 29 Jan 2018 21:27:22 +0100 Subject: epmd: allow alternative to dns resolving for nodename This makes it possible to create a custom integration with a key-value store for example. The key would then point to the actual address. You would have to write your own epmd module to make use of that feature. --- lib/kernel/doc/src/Makefile | 1 + lib/kernel/doc/src/erl_epmd.xml | 104 ++++++++++++++++++++++++++++++++++++++++ lib/kernel/doc/src/ref_man.xml | 1 + lib/kernel/doc/src/specs.xml | 1 + 4 files changed, 107 insertions(+) create mode 100644 lib/kernel/doc/src/erl_epmd.xml (limited to 'lib/kernel/doc/src') diff --git a/lib/kernel/doc/src/Makefile b/lib/kernel/doc/src/Makefile index 82869d7b15..29dc73a523 100644 --- a/lib/kernel/doc/src/Makefile +++ b/lib/kernel/doc/src/Makefile @@ -42,6 +42,7 @@ XML_REF3_FILES = application.xml \ disk_log.xml \ erl_boot_server.xml \ erl_ddll.xml \ + erl_epmd.xml \ erl_prim_loader_stub.xml \ erlang_stub.xml \ error_handler.xml \ diff --git a/lib/kernel/doc/src/erl_epmd.xml b/lib/kernel/doc/src/erl_epmd.xml new file mode 100644 index 0000000000..8b076cd2d7 --- /dev/null +++ b/lib/kernel/doc/src/erl_epmd.xml @@ -0,0 +1,104 @@ + + + + +
+ + 20182018 + Ericsson AB. All Rights Reserved. + + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + erl_epmd + Timmo Verlaan + 1 + 2018-02-19 + A +
+ erl_epmd + + Erlang interface towards epmd + + +

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 Service Discovery for Erlang Distribution

+
+ + + + + Callback for erl_distribution supervisor. + +

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

+
+
+ + + + + Registers the node with epmd. + +

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.

+
+
+ + + + + Returns the port number for a given node. + +

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.

+
+
+ + + + Returns address and port. + +

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 of Erlang nodes at a host. + +

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}]}
+
+
+
+ +
+ diff --git a/lib/kernel/doc/src/ref_man.xml b/lib/kernel/doc/src/ref_man.xml index c06914d23d..a633ae4832 100644 --- a/lib/kernel/doc/src/ref_man.xml +++ b/lib/kernel/doc/src/ref_man.xml @@ -38,6 +38,7 @@ + diff --git a/lib/kernel/doc/src/specs.xml b/lib/kernel/doc/src/specs.xml index bcc422930e..b8c25ca53b 100644 --- a/lib/kernel/doc/src/specs.xml +++ b/lib/kernel/doc/src/specs.xml @@ -6,6 +6,7 @@ + -- cgit v1.2.3