<div dir="ltr">Hi,<br><br>I think there are a couple of problems with the documentation of the EPMD protocol at <a href="http://erlang.org/doc/apps/erts/erl_dist_protocol.html#9.1">http://erlang.org/doc/apps/erts/erl_dist_protocol.html#9.1</a> (in R12B-3 and R12B-4) as well as erts/emulator/internal_doc/erl_ext_dist.txt (in R12B-3):<br>
<br>* ALIVE2_REQ:<br>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) = ?????."<br><br>* PORT2_RESP:<br>
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.<br>
<br>* NAMES_RESP:<br>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.<br><br>* DUMP_RESP:<br>Same as for NAMES_RESP: different packets are expected.<br>
Furthermore the documentation speficies NodeInfo as expressed in Erlang: <br>io:format("active name     ~s at port ~p, fd = ~p ~n", [NodeName, Port, Fd]).<br>for registered nodes. Correct would be:<br>io:format("active name     <~s> at port ~p, fd = ~p~n", [NodeName, Port, Fd]).<br>
Notice the <> characters!<br><br>For unregistered nodes:<br>io:format("old/unused name ~s at port ~p, fd = ~p~n", [NodeName, Port, Fd]).<br>io:format("old/unused name <~s>, port = ~p, fd = ~p ~n", [NodeName, Port, Fd]).<br>
Notice the <> characters as well as the last space before the new line!<br><br>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.<br>
<br>Thank you!<br><br>Regards,<br>Michael<br></div>