1erl_epmd(3) Erlang Module Definition erl_epmd(3)
2
3
4
6 erl_epmd -
7 Erlang interface towards epmd
8
9
11 This module communicates with the EPMD daemon, see epmd. To implement
12 your own epmd module please see ERTS User's Guide: How to Implement an
13 Alternative Service Discovery for Erlang Distribution
14
16 start_link() -> {ok, pid()} | ignore | {error, term()}
17
18 This function is invoked as this module is added as a child of
19 the erl_distribution supervisor.
20
21 register_node(Name, Port) -> Result
22
23 register_node(Name, Port, Driver) -> Result
24
25 Types:
26
27 Name = string()
28 Port = integer() >= 0
29 Driver = inet_tcp | inet6_tcp | inet | inet6
30 Creation = integer() >= 0
31 Result = {ok, Creation} | {error, already_registered} |
32 term()
33
34 Registers the node with epmd and tells epmd what port will be
35 used for the current node. It returns a creation number. This
36 number is incremented on each register to help with identifying
37 if a node is reconnecting to epmd.
38
39 port_please(Name, Host) -> {ok, Port, Version} | noport
40
41 port_please(Name, Host, Timeout) -> {ok, Port, Version} | noport
42
43 Types:
44
45 Name = atom() | string()
46 Host = atom() | string() | inet:ip_address()
47 Timeout = integer() >= 0 | infinity
48 Port = Version = integer() >= 0
49
50 Requests the distribution port for the given node of an EPMD
51 instance. Together with the port it returns a distribution pro‐
52 tocol version which has been 5 since Erlang/OTP R6.
53
54 address_please(Name, Host, AddressFamily) ->
55 Success | {error, term()}
56
57 Types:
58
59 Name = string()
60 Host = string() | inet:ip_address()
61 AddressFamily = inet | inet6
62 Port = Version = integer() >= 0
63 Success =
64 {ok, inet:ip_address()} |
65 {ok, inet:ip_address(), Port, Version}
66
67 Called by the distribution module. Resolves the Host to an IP
68 address.
69
70 Another epmd module may return port and distribution protocol
71 version as well.
72
73 names(Host) -> {ok, [{Name, Port}]} | {error, Reason}
74
75 Types:
76
77 Host = atom() | string() | inet:ip_address()
78 Name = string()
79 Port = integer() >= 0
80 Reason = address | file:posix()
81
82 Called by net_adm:names/0. Host defaults to the localhost.
83 Returns the names and associated port numbers of the Erlang
84 nodes that epmd registered at the specified host. Returns
85 {error, address} if epmd is not operational.
86
87 Example:
88
89 (arne@dunn)1> erl_epmd:names(localhost).
90 {ok,[{"arne",40262}]}
91
92
93
94Ericsson AB kernel 6.5 erl_epmd(3)