[erlang-bugs] EPMD protocol documentation

Michael Regen michael.regen@REDACTED
Fri Sep 12 15:14:46 CEST 2008


Hi,

I think there are a couple of problems with the documentation of the EPMD
protocol at http://erlang.org/doc/apps/erts/erl_dist_protocol.html#9.1 (in
R12B-3 and R12B-4) as well as erts/emulator/internal_doc/erl_ext_dist.txt
(in R12B-3):

* ALIVE2_REQ:
DistrvsnRange is 4 bytes, not 2. "Four bytes where MSB (2 bytes) =
Highestvsn and LSB (2 bytes) = Lowestvsn. For erts-4.6.x (OTP-R3)the vsn = 0
For erts-4.7.x (OTP-R4) = ?????."

* PORT2_RESP:
Elen is described as 2 byte field. But at least if during ALIVE2_REQ no
extra field was provided (as I think erts usually does) then PORT2_RESP just
returns Elen as one byte = 0. And erts does not seem to work correctly if we
send back a packet as specified.

* NAMES_RESP:
In the documentation it looks like one packet should be sent back containing
the whole answer whereas in reality EPMDPortNo and each answer are sent back
in different packets.

* DUMP_RESP:
Same as for NAMES_RESP: different packets are expected.
Furthermore the documentation speficies NodeInfo as expressed in Erlang:
io:format("active name     ~s at port ~p, fd = ~p ~n", [NodeName, Port,
Fd]).
for registered nodes. Correct would be:
io:format("active name     <~s> at port ~p, fd = ~p~n", [NodeName, Port,
Fd]).
Notice the <> characters!

For unregistered nodes:
io:format("old/unused name ~s at port ~p, fd = ~p~n", [NodeName, Port, Fd]).
io:format("old/unused name <~s>, port = ~p, fd = ~p ~n", [NodeName, Port,
Fd]).
Notice the <> characters as well as the last space before the new line!

Furthermore it might be good to mention that all answers are followed by a
close of the socket except for ALIVE2_RESP. Might also be good to mention
that all integers are in big-endian format.

Thank you!

Regards,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20080912/a00a3745/attachment.htm>


More information about the erlang-bugs mailing list