~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to erts/doc/src/erl_dist_protocol.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1" ?>
 
2
<!DOCTYPE chapter SYSTEM "chapter.dtd">
 
3
 
 
4
<chapter>
 
5
  <header>
 
6
    <copyright>
 
7
      <year>2007</year>
 
8
      <year>2007</year>
 
9
      <holder>Ericsson AB, All Rights Reserved</holder>
 
10
    </copyright>
 
11
    <legalnotice>
 
12
  The contents of this file are subject to the Erlang Public License,
 
13
  Version 1.1, (the "License"); you may not use this file except in
 
14
  compliance with the License. You should have received a copy of the
 
15
  Erlang Public License along with this software. If not, it can be
 
16
  retrieved online at http://www.erlang.org/.
 
17
 
 
18
  Software distributed under the License is distributed on an "AS IS"
 
19
  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
20
  the License for the specific language governing rights and limitations
 
21
  under the License.
 
22
 
 
23
  The Initial Developer of the Original Code is Ericsson AB.
 
24
    </legalnotice>
 
25
 
 
26
    <title>Distribution Protocol</title>
 
27
    <prepared></prepared>
 
28
    <docno></docno>
 
29
    <date>2007-09-21</date>
 
30
    <rev>PA1</rev>
 
31
  </header>
 
32
 
 
33
<p>
 
34
The description here is far from complete and will therefore be further
 
35
refined in upcoming releases.
 
36
 
 
37
The protocols both from Erlang nodes towards
 
38
EPMD (Erlang Port Mapper Daemon) and between Erlang nodes, however, are
 
39
stable since many years.
 
40
</p>
 
41
 
 
42
<p>The distribution protocol can be divided into four (4) parts:</p>
 
43
<list>
 
44
  <item>
 
45
    <p>
 
46
      1. Low level socket connection.
 
47
    </p>
 
48
  </item>
 
49
  <item>
 
50
    2. Handshake, interchange node name and authenticate.
 
51
  </item>
 
52
  <item>
 
53
    3. Authentication (done by net_kernel).
 
54
  </item>
 
55
  <item>
 
56
    4. Connected. 
 
57
  </item>
 
58
</list>
 
59
<p>
 
60
  A node fetches the Port number of another node through the EPMD (at the
 
61
  other host) in order to initiate a connection request.
 
62
</p>
 
63
<p>
 
64
For each host where a distributed Erlang node is running there should also
 
65
be an EPMD running. The EPMD can be started explicitly or automatically
 
66
as a result of the Erlang node startup.
 
67
</p>
 
68
<p>
 
69
By default EPMD listens on port 4369.
 
70
</p>
 
71
<p>
 
72
  3 and 4 are performed at the same level but the net_kernel disconnects the
 
73
  other node if it communicates using an invalid cookie (after one (1) second).
 
74
</p>
 
75
 
 
76
<p>The integers in all multi-byte fields are in big-endian order.</p>
 
77
 
 
78
  <section>
 
79
    <title>EPMD Protocol</title>
 
80
    <p>
 
81
      The requests served by the EPMD (Erlang Port Mapper Daemon) are 
 
82
      summarized in the figure below.
 
83
    </p>
 
84
 
 
85
      <image file="erl_ext_fig">
 
86
        <icaption>
 
87
          Summary of EPMD requests. 
 
88
        </icaption>
 
89
      </image>
 
90
      <p>
 
91
        Each request <c>*_REQ</c> is preceeded by a two-byte length field. 
 
92
        Thus, the overall request format is:
 
93
      </p>
 
94
 
 
95
      <table align="left">
 
96
        <row>
 
97
          <cell align="center">2</cell>
 
98
          <cell align="center">n</cell>
 
99
        </row>
 
100
        <row>
 
101
          <cell align="center">Length</cell>
 
102
          <cell align="center">Request</cell>
 
103
        </row>
 
104
      <tcaption></tcaption></table>
 
105
 
 
106
      <section>
 
107
        <title>Register a node in the EPMD</title>
 
108
        <p>
 
109
          When a distributed node is started it registers itself in EPMD.
 
110
          The message ALIVE2_REQ described below is sent from the node towards
 
111
          EPMD. The response from EPMD is ALIVE2_RESP.
 
112
        </p>
 
113
        <table align="left">
 
114
          <row>
 
115
            <cell align="center">1</cell>
 
116
            <cell align="center">2</cell>
 
117
            <cell align="center">1</cell>
 
118
            <cell align="center">1</cell>
 
119
            <cell align="center">2</cell>
 
120
            <cell align="center">2</cell>
 
121
            <cell align="center">2</cell>
 
122
            <cell align="center">Nlen</cell>
 
123
            <cell align="center">2</cell>
 
124
            <cell align="center">Elen</cell>
 
125
          </row>
 
126
          <row>
 
127
            <cell align="center">120</cell>
 
128
            <cell align="center">PortNo</cell>
 
129
            <cell align="center">NodeType</cell>
 
130
            <cell align="center">Protocol</cell>
 
131
            <cell align="center">LowestVersion</cell>
 
132
            <cell align="center">HighestVersion</cell>
 
133
            <cell align="center">Nlen</cell>
 
134
            <cell align="center">NodeName</cell>
 
135
            <cell align="center">Elen</cell>
 
136
            <cell align="center">Extra</cell>
 
137
          </row>
 
138
        <tcaption>ALIVE2_REQ (120)</tcaption></table>
 
139
          <taglist>
 
140
            <tag><c>PortNo</c></tag>
 
141
            <item>
 
142
              The port number on which the node accept connection requests.
 
143
            </item>
 
144
            <tag><c>NodeType</c></tag>
 
145
            <item>
 
146
              77 = normal Erlang node, 72 = hidden node (C-node),...
 
147
            </item>
 
148
            <tag><c>Protocol</c></tag>
 
149
            <item>
 
150
              0 = tcp/ip-v4, ...
 
151
            </item>
 
152
            <tag><c>LowestVersion</c></tag>
 
153
            <item>
 
154
              The lowest distribution version that this node can handle.
 
155
              See the next field for possible values.
 
156
            </item>
 
157
            <tag><c>HighestVersion</c></tag>
 
158
            <item>
 
159
              The highest distribution version that this node can handle.
 
160
              The value in R6B and later is 5.
 
161
            </item>
 
162
            <tag><c>Nlen</c></tag>
 
163
            <item>
 
164
              The length of the <c>NodeName</c>.
 
165
            </item>
 
166
            <tag><c>NodeName</c></tag>
 
167
            <item>
 
168
              The NodeName as a string of length <c>Nlen</c>.
 
169
            </item>
 
170
            <tag><c>Elen</c></tag>
 
171
            <item>
 
172
              The length of the <c>Extra</c> field.
 
173
            </item>
 
174
            <tag><c>Extra</c></tag>
 
175
            <item>
 
176
              Extra field of <c>Elen</c> bytes.
 
177
            </item>
 
178
          </taglist>
 
179
        <p>
 
180
          The connection created to the EPMD must be kept as long as the
 
181
          node is a distributed node. When the connection is closed
 
182
          the node is automatically unregistered from the EPMD.
 
183
        </p>
 
184
        <p>
 
185
          The response message ALIVE2_RESP is described below.
 
186
        </p>
 
187
 
 
188
        <table align="left">
 
189
          <row>
 
190
            <cell align="center">1</cell>
 
191
            <cell align="center">1</cell>
 
192
            <cell align="center">2</cell>
 
193
          </row>
 
194
          <row>
 
195
            <cell align="center">121</cell>
 
196
            <cell align="center">Result</cell>
 
197
            <cell align="center">Creation</cell>
 
198
          </row>
 
199
        <tcaption>ALIVE2_RESP (121)</tcaption></table>
 
200
        <p>
 
201
          Result = 0 -> ok, Result > 0 -> error
 
202
        </p>
 
203
      </section>
 
204
 
 
205
      <section>
 
206
        <title>Unregister a node from the EPMD</title>
 
207
        <p>
 
208
          A node unregister itself from the EPMD by simply closing the
 
209
          TCP connection towards EPMD established when the node was registered.
 
210
        </p>
 
211
      </section>
 
212
 
 
213
      <section>
 
214
        <title>Get the distribution port of another node</title>
 
215
        <p>
 
216
          When one node wants to connect to another node it starts with
 
217
          a PORT_PLEASE2_REQ request towards EPMD on the host where the 
 
218
          node resides in order to get the distribution port that the node 
 
219
          listens to.
 
220
        </p>
 
221
 
 
222
        <table align="left">
 
223
        <row>
 
224
          <cell align="center">1</cell>
 
225
          <cell align="center">N</cell>
 
226
        </row>
 
227
        <row>
 
228
          <cell align="center">122</cell>
 
229
          <cell align="center">NodeName</cell>
 
230
        </row>
 
231
      <tcaption>PORT_PLEASE2_REQ (122)</tcaption></table>
 
232
      <p>
 
233
        where N = Length - 1
 
234
      </p>
 
235
 
 
236
      <p>
 
237
      </p>
 
238
      <table align="left">
 
239
        <row>
 
240
          <cell align="center">1</cell>
 
241
          <cell align="center">1</cell>
 
242
        </row>
 
243
        <row>
 
244
          <cell align="center">119</cell>
 
245
          <cell align="center">Result</cell>
 
246
        </row>
 
247
        <tcaption>
 
248
          PORT2_RESP (119) response indicating error, Result > 0.
 
249
        </tcaption>
 
250
      </table>
 
251
      <p>Or</p>
 
252
      <table align="left">
 
253
        <row>
 
254
          <cell align="center">1</cell>
 
255
          <cell align="center">1</cell>
 
256
          <cell align="center">2</cell>
 
257
          <cell align="center">1</cell>
 
258
          <cell align="center">1</cell>
 
259
          <cell align="center">2</cell>
 
260
          <cell align="center">2</cell>
 
261
          <cell align="center">2</cell>
 
262
          <cell align="center">Nlen</cell>
 
263
          <cell align="center">2</cell>
 
264
          <cell align="center">Elen</cell>
 
265
        </row>
 
266
        <row>
 
267
          <cell align="center">119</cell>
 
268
          <cell align="center">Result</cell>
 
269
          <cell align="center">PortNo</cell>
 
270
          <cell align="center">NodeType</cell>
 
271
          <cell align="center">Protocol</cell>
 
272
          <cell align="center">HighestVersion</cell>
 
273
          <cell align="center">LowestVersion</cell>
 
274
          <cell align="center">Nlen</cell>
 
275
          <cell align="center">NodeName</cell>
 
276
          <cell align="center">Elen</cell>
 
277
          <cell align="center">Extra</cell>
 
278
        </row>
 
279
      <tcaption>PORT2_RESP when Result = 0.</tcaption></table>
 
280
<p>
 
281
If Result > 0, the packet only consists of [119, Result].
 
282
</p>
 
283
 
 
284
        <p>EPMD will close the socket as soon as it has sent the information.</p>
 
285
      </section>
 
286
 
 
287
      <section>
 
288
        <title>Get all registered names from EPMD</title>
 
289
        <p>
 
290
          This request is used via the Erlang function 
 
291
          <c>net_adm:names/1,2</c>. A TCP connection is opened
 
292
          towards EPMD and this request is sent.
 
293
        </p>
 
294
        <table align="left">
 
295
          <row>
 
296
            <cell align="center">1</cell>
 
297
          </row>
 
298
          <row>
 
299
            <cell align="center">110</cell>
 
300
          </row>
 
301
        <tcaption>NAMES_REQ (110)</tcaption></table>
 
302
        
 
303
 
 
304
        <p>The response for a <c>NAMES_REQ</c> looks like this:</p>
 
305
        <table align="left">
 
306
          <row>
 
307
            <cell align="center">4</cell>
 
308
            <cell align="center">&nbsp;</cell>
 
309
          </row>
 
310
          <row>
 
311
            <cell align="center">EPMDPortNo</cell>
 
312
            <cell align="center">NodeInfo*</cell>
 
313
          </row>
 
314
        <tcaption>NAMES_RESP</tcaption></table>
 
315
        <p>
 
316
          NodeInfo is a string written for each active node.
 
317
          When all NodeInfo has been written the connection is
 
318
          closed by EPMD.
 
319
        </p>
 
320
        <p>
 
321
          NodeInfo is, as expressed in Erlang:
 
322
        </p>
 
323
        <code>
 
324
        io:format("name ~s at port ~p~n", [NodeName, Port]).
 
325
        </code>
 
326
      </section>
 
327
 
 
328
 
 
329
      <section>
 
330
        <title>Dump all data from EPMD</title>
 
331
        <p>
 
332
          This request is not really used, it should be regarded as a debug
 
333
          feature.
 
334
        </p>
 
335
        <table align="left">
 
336
          <row>
 
337
          <cell align="center">1</cell>
 
338
          </row>
 
339
          <row>
 
340
            <cell align="center">100</cell>
 
341
          </row>
 
342
        <tcaption>DUMP_REQ</tcaption></table>
 
343
 
 
344
        <p>The response for a <c>DUMP_REQ</c> looks like this:</p>
 
345
        <table align="left">
 
346
          <row>
 
347
            <cell align="center">4</cell>
 
348
            <cell align="center">&nbsp;</cell>
 
349
          </row>
 
350
          <row>
 
351
            <cell align="center">EPMDPortNo</cell>
 
352
            <cell align="center">NodeInfo*</cell>
 
353
          </row>
 
354
        <tcaption>DUMP_RESP</tcaption></table>
 
355
        <p>
 
356
          NodeInfo is a string written for each node kept in EPMD.
 
357
          When all NodeInfo has been written the connection is
 
358
          closed by EPMD.
 
359
        </p>
 
360
        <p>
 
361
          NodeInfo is, as expressed in Erlang:
 
362
        </p>
 
363
        <code>
 
364
        io:format("active name     ~s at port ~p, fd = ~p ~n",
 
365
                  [NodeName, Port, Fd]).
 
366
        </code>
 
367
        <p>
 
368
          or
 
369
        </p>
 
370
        <code>
 
371
        io:format("old/unused name ~s at port ~p, fd = ~p~n",
 
372
                  [NodeName, Port, Fd]).
 
373
        </code>
 
374
 
 
375
      </section>
 
376
 
 
377
      <section>
 
378
        <title>Kill the EPMD</title>
 
379
        <p>
 
380
          This request will kill the running EPMD. It is almost never used.
 
381
        </p>
 
382
        <table align="left">
 
383
          <row>
 
384
          <cell align="center">1</cell>
 
385
          </row>
 
386
          <row>
 
387
            <cell align="center">107</cell>
 
388
          </row>
 
389
        <tcaption>KILL_REQ</tcaption></table>
 
390
 
 
391
        <p>The response fo a <c>KILL_REQ</c> looks like this:</p>
 
392
        <table align="left">
 
393
          <row>
 
394
            <cell align="center">2</cell>
 
395
          </row>
 
396
          <row>
 
397
            <cell align="center">OKString</cell>
 
398
          </row>
 
399
        <tcaption>KILL_RESP</tcaption></table>
 
400
        <p>
 
401
          where <c>OKString</c> is "OK".
 
402
        </p>
 
403
      </section>
 
404
 
 
405
      <section>
 
406
        <title>STOP_REQ  (Not Used)</title>
 
407
        <p></p>
 
408
        <table align="left">
 
409
          <row>
 
410
            <cell align="center">1</cell>
 
411
            <cell align="center">n</cell>
 
412
          </row>
 
413
          <row>
 
414
            <cell align="center">115</cell>
 
415
            <cell align="center">NodeName</cell>
 
416
          </row>
 
417
        <tcaption>STOP_REQ</tcaption></table>
 
418
        <p>
 
419
          where n = Length - 1
 
420
        </p>
 
421
        <p>
 
422
          The current implementation of Erlang does not care if the connection
 
423
          to the EPMD is broken.
 
424
        </p>
 
425
        <p>The response for a <c>STOP_REQ</c> looks like this.</p>
 
426
        <table align="left">
 
427
          <row>
 
428
            <cell align="center">7</cell>
 
429
          </row>
 
430
          <row>
 
431
            <cell align="center">OKString</cell>
 
432
          </row>
 
433
        <tcaption>STOP_RESP</tcaption></table>
 
434
        <p>
 
435
          where OKString is "STOPPED".
 
436
        </p>
 
437
        <p>A negative response can look like this.</p>
 
438
        <table align="left">
 
439
          <row>
 
440
            <cell align="center">7</cell>
 
441
          </row>
 
442
          <row>
 
443
            <cell align="center">NOKString</cell>
 
444
          </row>
 
445
        <tcaption>STOP_NOTOK_RESP</tcaption></table>
 
446
        <p>
 
447
          where NOKString is "NOEXIST".
 
448
        </p>
 
449
      </section>
 
450
<!--
 
451
      <section>
 
452
        <title>ALIVE_REQ (97)</title>
 
453
        <p></p>
 
454
 
 
455
        <table align="left">
 
456
          <row>
 
457
            <cell align="center">1</cell>
 
458
            <cell align="center">2</cell>
 
459
            <cell align="center">n</cell>
 
460
          </row>
 
461
          <row>
 
462
            <cell align="center">97</cell>
 
463
            <cell align="center">PortNo</cell>
 
464
            <cell align="center">NodeName</cell>
 
465
          </row>
 
466
        <tcaption></tcaption></table>
 
467
 
 
468
        <p>
 
469
          where n = Length - 3
 
470
        </p>
 
471
        <p>
 
472
          The connection created to the EPMD must be kept until the node is
 
473
          not a distributed node any longer.
 
474
        </p>
 
475
      </section>
 
476
 
 
477
      <section>
 
478
        <title>ALIVE_OK_RESP (89)</title>
 
479
        <p></p>
 
480
        <table align="left">
 
481
          <row>
 
482
            <cell align="center">1</cell>
 
483
            <cell align="center">2</cell>
 
484
          </row>
 
485
          <row>
 
486
            <cell align="center">89</cell>
 
487
            <cell align="center">Creation</cell>
 
488
          </row>
 
489
        <tcaption></tcaption></table>
 
490
      </section>
 
491
 
 
492
 
 
493
      <section>
 
494
        <title>ALIVE_NOTOK_RESP  ()</title>
 
495
        <p>
 
496
          EPMD closed the connection.
 
497
        </p>
 
498
      </section>
 
499
 
 
500
      <section>
 
501
        <title>PORT_PLEASE_REQ   (112)</title>
 
502
        <p></p>
 
503
      <table align="left">
 
504
        <row>
 
505
          <cell align="center">1</cell>
 
506
          <cell align="center">n</cell>
 
507
        </row>
 
508
        <row>
 
509
          <cell align="center">112</cell>
 
510
          <cell align="center">NodeName</cell>
 
511
        </row>
 
512
      <tcaption></tcaption></table>
 
513
      <p>
 
514
        where n = Length - 1
 
515
      </p>
 
516
      </section>
 
517
 
 
518
      <section>
 
519
        <title>PORT_OK_RESP ()</title>
 
520
        <p></p>
 
521
        <table align="left">
 
522
          <row>
 
523
            <cell align="center">2</cell>
 
524
          </row>
 
525
          <row>
 
526
            <cell align="center">PortNo</cell>
 
527
          </row>
 
528
        <tcaption></tcaption></table>
 
529
 
 
530
      </section>
 
531
 
 
532
      <section>
 
533
        <title>PORT_NOTOK_RESP ()</title>
 
534
        <p>
 
535
          EPMD closed the connection.
 
536
        </p>
 
537
      </section>
 
538
 
 
539
 
 
540
      <section>
 
541
        <title>PORT_NOTOK_RESP ()</title>
 
542
        <p>
 
543
          EPMD closed the connection.
 
544
        </p>
 
545
      </section>
 
546
-->
 
547
 
 
548
    </section>
 
549
 
 
550
      <section>
 
551
        <title>Handshake</title>
 
552
        <p>
 
553
          The handshake is discussed in detail in the internal documentation for 
 
554
          the kernel (Erlang) application.
 
555
        </p>
 
556
      </section>
 
557
 
 
558
      <section>
 
559
        <title>Protocol between connected nodes</title>
 
560
        <table align="left">
 
561
          <row>
 
562
            <cell align="center">4</cell>
 
563
            <cell align="center">1</cell>
 
564
            <cell align="center">n</cell>
 
565
            <cell align="center">m</cell>
 
566
          </row>
 
567
          <row>
 
568
            <cell align="center">Length</cell>
 
569
            <cell align="center">Type</cell>
 
570
            <cell align="center">ControlMsg</cell>
 
571
            <cell align="center">Message</cell>
 
572
          </row>
 
573
        <tcaption></tcaption></table>
 
574
        <p>
 
575
          where:
 
576
        </p>
 
577
        <p>
 
578
          Length is equal to 1 + n + m
 
579
          
 
580
          Type is: 112 - pass through
 
581
          
 
582
          ControlMsg is a tuple passed using the external format of
 
583
          Erlang.
 
584
          
 
585
          Message is the message sent to another node using the '!'
 
586
          (in external format).
 
587
          But, Message is only passed in combination with a ControlMsg
 
588
          encoding a send ('!').
 
589
        </p>
 
590
        
 
591
        <p>
 
592
          The control message is a tuple, where the first element indicates
 
593
          which distributed operation it encodes.
 
594
        </p>
 
595
        <taglist>
 
596
          <tag><c>LINK</c></tag>
 
597
          <item>
 
598
            <p>
 
599
              {1, FromPid, ToPid}
 
600
            </p>
 
601
          </item>
 
602
          
 
603
          <tag>SEND</tag>
 
604
          <item>
 
605
            <p>
 
606
              {2, Cookie, ToPid}
 
607
              
 
608
            </p>
 
609
          </item>
 
610
        </taglist>
 
611
        
 
612
        <note><p>Message is sent as well.</p></note>
 
613
        
 
614
        <taglist>
 
615
          <tag>EXIT</tag>
 
616
          <item>
 
617
            <p>
 
618
              {3, FromPid, ToPid, Reason}
 
619
            </p>
 
620
          </item>
 
621
          
 
622
          <tag>UNLINK</tag>
 
623
          <item>
 
624
            <p>
 
625
              {4, FromPid, ToPid}
 
626
            </p>
 
627
          </item>
 
628
          
 
629
          <tag>NODE_LINK</tag>
 
630
          <item>
 
631
            <p>
 
632
              {5}
 
633
            </p>
 
634
          </item>
 
635
          
 
636
          <tag>REG_SEND</tag>
 
637
          <item>
 
638
            <p>
 
639
              {6, FromPid, Cookie, ToName}
 
640
            </p>
 
641
          </item>
 
642
        </taglist>
 
643
        <note><p>Message is sent as well.</p></note>
 
644
        
 
645
        <taglist>
 
646
          <tag>GROUP_LEADER</tag>
 
647
          <item>
 
648
            <p>
 
649
              {7, FromPid, ToPid}
 
650
            </p>
 
651
          </item>
 
652
        
 
653
          <tag>EXIT2</tag>
 
654
          <item>
 
655
            <p>
 
656
              {8, FromPid, ToPid, Reason}
 
657
            </p>
 
658
          </item>
 
659
        </taglist>
 
660
      </section>
 
661
 
 
662
  
 
663
    <section>
 
664
      <title>New Ctrlmessages for distrvsn = 1 (OTP R4)</title>
 
665
      <section>
 
666
        <title>SEND_TT</title>
 
667
        <p>
 
668
          {12, Cookie, ToPid, TraceToken}
 
669
          
 
670
        </p>
 
671
        <note><p>Message is sent as well.</p></note>
 
672
      </section>
 
673
      
 
674
      <section>
 
675
        <title>EXIT_TT</title>
 
676
        <p>
 
677
          {13, FromPid, ToPid, TraceToken, Reason}
 
678
          
 
679
        </p>
 
680
      </section>
 
681
      
 
682
      <section>
 
683
        <title>REG_SEND_TT</title>
 
684
        <p>
 
685
          {16, FromPid, Cookie, ToName, TraceToken}
 
686
          
 
687
        </p>
 
688
        <note><p>Message is sent as well.</p></note>
 
689
      </section>
 
690
      
 
691
      <section>
 
692
        <title>EXIT2_TT</title>
 
693
        <p>
 
694
          {18, FromPid, ToPid, TraceToken, Reason}
 
695
        </p>
 
696
      </section>
 
697
    </section>
 
698
    
 
699
    <section>
 
700
      <title>New Ctrlmessages for distrvsn = 2</title>
 
701
      <p>
 
702
        distrvsn 2 was never used.
 
703
      </p>
 
704
    </section>
 
705
    
 
706
    <section>
 
707
      <title>New Ctrlmessages for distrvsn = 3 (OTP R5C)</title>
 
708
      <p>
 
709
        None, but the version number was increased anyway.
 
710
      </p>
 
711
    </section>
 
712
 
 
713
    <section>
 
714
      <title>New Ctrlmessages for distrvsn = 4 (OTP R6)</title>
 
715
      <p>
 
716
        These are only recognized by Erlang nodes, not by hidden nodes.
 
717
      </p>
 
718
      <section>
 
719
        <title>MONITOR_P</title>
 
720
        <p>
 
721
          {19, FromPid, ToProc, Ref}
 
722
          
 
723
          FromPid = monitoring process
 
724
          ToProc = monitored process pid or name (atom)
 
725
        </p>
 
726
      </section>
 
727
      
 
728
      <section>
 
729
        <title>DEMONITOR_P</title>
 
730
        <p>
 
731
          {20, FromPid, ToProc, Ref}
 
732
          We include the FromPid just in case we want to trace this.
 
733
          
 
734
          FromPid = monitoring process
 
735
          ToProc = monitored process pid or name (atom)
 
736
        </p>
 
737
      </section>
 
738
      
 
739
      <section>
 
740
        <title>MONITOR_P_EXIT</title>
 
741
        <p>
 
742
          {21, FromProc, ToPid, Ref, Reason}
 
743
          
 
744
          FromProc = monitored process pid or name (atom)
 
745
          ToPid = monitoring process
 
746
          Reason = exit reason for the monitored process
 
747
        </p>
 
748
      </section>
 
749
    </section>
 
750
  </chapter>
 
751
  
 
752