<div dir="ltr">Hello,<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 10, 2014 at 9:07 AM, Leo Liu <span dir="ltr"><<a href="mailto:sdl.web@gmail.com" target="_blank">sdl.web@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><a href="http://www.erlang.org/doc/apps/erts/erl_dist_protocol.html" target="_blank">http://www.erlang.org/doc/apps/erts/erl_dist_protocol.html</a> Mentions<br>
`cookie' in the handshake and also in the messages between connected<br>
nodes.<br>
<br>
Since cookie is not sent in clear text it is odd to see it used in:<br>
<br>
SEND<br>
<br>
{2, Cookie, ToPid}<br>
<br>
REG_SEND<br>
<br>
{6, FromPid, Cookie, ToName}<br></blockquote><div><br></div><div>The cookies in the messages are currently unused and should always be set to the atom ''. It is afaik there for the possibility to use cookie authentication in non-stream based protocols.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Ideas? Also what are the differences between EXIT and EXIT2:<br>
<br>
EXIT<br>
<br>
{3, FromPid, ToPid, Reason}<br>
<br>
EXIT2<br>
<br>
{8, FromPid, ToPid, Reason} </blockquote><div><br></div><div>EXIT is generated when an exit signal is sent because a process that was linked over distribution crashed. EXIT2 is send when the bif exit/2 is used on a remote pid.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
How to instruct an Erlang node to log distribution messages it receives?<br></blockquote><div><br></div><div>There are a bunch of dtrace/systemtap probes available that you can use to inspect the distribution messages. Also there is a define called ERTS_DIST_MSG_DBG in dist.c that you can set to make the code printout any messages that it receive.</div>
<div><br></div><div>Lukas</div></div></div></div>