aboutsummaryrefslogblamecommitdiffstats
path: root/erts/doc/src/erl_dist_protocol.xml
blob: 9a203289e93c6cf52f8ac607afb43f183f0fa380 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802

































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                 
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">

<chapter>
  <header>
    <copyright>
      <year>2007</year>
      <year>2007</year>
      <holder>Ericsson AB, All Rights Reserved</holder>
    </copyright>
    <legalnotice>
  The contents of this file are subject to the Erlang Public License,
  Version 1.1, (the "License"); you may not use this file except in
  compliance with the License. You should have received a copy of the
  Erlang Public License along with this software. If not, it can be
  retrieved online at http://www.erlang.org/.

  Software distributed under the License is distributed on an "AS IS"
  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
  the License for the specific language governing rights and limitations
  under the License.

  The Initial Developer of the Original Code is Ericsson AB.
    </legalnotice>

    <title>Distribution Protocol</title>
    <prepared></prepared>
    <docno></docno>
    <date>2007-09-21</date>
    <rev>PA1</rev>
    <file>erl_dist_protocol.xml</file>
  </header>

<p>
The description here is far from complete and will therefore be further
refined in upcoming releases.

The protocols both from Erlang nodes towards
EPMD (Erlang Port Mapper Daemon) and between Erlang nodes, however, are
stable since many years.
</p>

<p>The distribution protocol can be divided into four (4) parts:</p>
<list>
  <item>
    <p>
      1. Low level socket connection.
    </p>
  </item>
  <item>
    2. Handshake, interchange node name and authenticate.
  </item>
  <item>
    3. Authentication (done by net_kernel).
  </item>
  <item>
    4. Connected. 
  </item>
</list>
<p>
  A node fetches the Port number of another node through the EPMD (at the
  other host) in order to initiate a connection request.
</p>
<p>
For each host where a distributed Erlang node is running there should also
be an EPMD running. The EPMD can be started explicitly or automatically
as a result of the Erlang node startup.
</p>
<p>
By default EPMD listens on port 4369.
</p>
<p>
  3 and 4 are performed at the same level but the net_kernel disconnects the
  other node if it communicates using an invalid cookie (after one (1) second).
</p>

<p>The integers in all multi-byte fields are in big-endian order.</p>

  <section>
    <title>EPMD Protocol</title>
    <p>
      The requests served by the EPMD (Erlang Port Mapper Daemon) are 
      summarized in the figure below.
    </p>

      <image file="erl_ext_fig.gif">
	<icaption>
	  Summary of EPMD requests. 
	</icaption>
      </image>
      <p>
	Each request <c>*_REQ</c> is preceded by a two-byte length field. 
	Thus, the overall request format is:
      </p>

      <table align="left">
	<row>
	  <cell align="center">2</cell>
	  <cell align="center">n</cell>
	</row>
	<row>
	  <cell align="center">Length</cell>
	  <cell align="center">Request</cell>
	</row>
      <tcaption></tcaption></table>

      <section>
	<title>Register a node in the EPMD</title>
	<p>
	  When a distributed node is started it registers itself in EPMD.
	  The message ALIVE2_REQ described below is sent from the node towards
	  EPMD. The response from EPMD is ALIVE2_RESP.
	</p>
	<table align="left">
	  <row>
	    <cell align="center">1</cell>
	    <cell align="center">2</cell>
	    <cell align="center">1</cell>
	    <cell align="center">1</cell>
	    <cell align="center">2</cell>
	    <cell align="center">2</cell>
	    <cell align="center">2</cell>
	    <cell align="center">Nlen</cell>
	    <cell align="center">2</cell>
	    <cell align="center">Elen</cell>
	  </row>
	  <row>
	    <cell align="center">120</cell>
	    <cell align="center">PortNo</cell>
	    <cell align="center">NodeType</cell>
	    <cell align="center">Protocol</cell>
	    <cell align="center">LowestVersion</cell>
	    <cell align="center">HighestVersion</cell>
	    <cell align="center">Nlen</cell>
	    <cell align="center">NodeName</cell>
	    <cell align="center">Elen</cell>
	    <cell align="center">Extra</cell>
	  </row>
	<tcaption>ALIVE2_REQ (120)</tcaption></table>
	  <taglist>
	    <tag><c>PortNo</c></tag>
	    <item>
	      The port number on which the node accept connection requests.
	    </item>
	    <tag><c>NodeType</c></tag>
	    <item>
	      77 = normal Erlang node, 72 = hidden node (C-node),...
	    </item>
	    <tag><c>Protocol</c></tag>
	    <item>
	      0 = tcp/ip-v4, ...
	    </item>
	    <tag><c>LowestVersion</c></tag>
	    <item>
	      The lowest distribution version that this node can handle.
	      See the next field for possible values.
	    </item>
	    <tag><c>HighestVersion</c></tag>
	    <item>
	      The highest distribution version that this node can handle.
	      The value in R6B and later is 5.
	    </item>
	    <tag><c>Nlen</c></tag>
	    <item>
	      The length of the <c>NodeName</c>.
	    </item>
	    <tag><c>NodeName</c></tag>
	    <item>
	      The NodeName as a string of length <c>Nlen</c>.
	    </item>
	    <tag><c>Elen</c></tag>
	    <item>
	      The length of the <c>Extra</c> field.
	    </item>
	    <tag><c>Extra</c></tag>
	    <item>
	      Extra field of <c>Elen</c> bytes.
	    </item>
	  </taglist>
	<p>
	  The connection created to the EPMD must be kept as long as the
	  node is a distributed node. When the connection is closed
	  the node is automatically unregistered from the EPMD.
	</p>
	<p>
	  The response message ALIVE2_RESP is described below.
	</p>

	<table align="left">
	  <row>
	    <cell align="center">1</cell>
	    <cell align="center">1</cell>
	    <cell align="center">2</cell>
	  </row>
	  <row>
	    <cell align="center">121</cell>
	    <cell align="center">Result</cell>
	    <cell align="center">Creation</cell>
	  </row>
	<tcaption>ALIVE2_RESP (121)</tcaption></table>
	<p>
	  Result = 0 -> ok, Result > 0 -> error
	</p>
      </section>

      <section>
	<title>Unregister a node from the EPMD</title>
	<p>
	  A node unregister itself from the EPMD by simply closing the
	  TCP connection towards EPMD established when the node was registered.
	</p>
      </section>

      <section>
	<title>Get the distribution port of another node</title>
	<p>
	  When one node wants to connect to another node it starts with
	  a PORT_PLEASE2_REQ request towards EPMD on the host where the 
	  node resides in order to get the distribution port that the node 
	  listens to.
	</p>

	<table align="left">
	<row>
	  <cell align="center">1</cell>
	  <cell align="center">N</cell>
	</row>
	<row>
	  <cell align="center">122</cell>
	  <cell align="center">NodeName</cell>
	</row>
      <tcaption>PORT_PLEASE2_REQ (122)</tcaption></table>
      <p>
	where N = Length - 1
      </p>

      <p>
      </p>
      <table align="left">
	<row>
	  <cell align="center">1</cell>
	  <cell align="center">1</cell>
	</row>
	<row>
	  <cell align="center">119</cell>
	  <cell align="center">Result</cell>
	</row>
	<tcaption>
	  PORT2_RESP (119) response indicating error, Result > 0.
	</tcaption>
      </table>
      <p>Or</p>
      <table align="left">
	<row>
	  <cell align="center">1</cell>
	  <cell align="center">1</cell>
	  <cell align="center">2</cell>
	  <cell align="center">1</cell>
	  <cell align="center">1</cell>
	  <cell align="center">2</cell>
	  <cell align="center">2</cell>
	  <cell align="center">2</cell>
	  <cell align="center">Nlen</cell>
	  <cell align="center">2</cell>
	  <cell align="center">Elen</cell>
	</row>
	<row>
	  <cell align="center">119</cell>
	  <cell align="center">Result</cell>
	  <cell align="center">PortNo</cell>
	  <cell align="center">NodeType</cell>
	  <cell align="center">Protocol</cell>
	  <cell align="center">HighestVersion</cell>
	  <cell align="center">LowestVersion</cell>
	  <cell align="center">Nlen</cell>
	  <cell align="center">NodeName</cell>
	  <cell align="center">Elen</cell>
	  <cell align="center">Extra</cell>
	</row>
      <tcaption>PORT2_RESP when Result = 0.</tcaption></table>
<p>
If Result > 0, the packet only consists of [119, Result].
</p>

        <p>EPMD will close the socket as soon as it has sent the information.</p>
      </section>

      <section>
	<title>Get all registered names from EPMD</title>
	<p>
	  This request is used via the Erlang function 
	  <c>net_adm:names/1,2</c>. A TCP connection is opened
	  towards EPMD and this request is sent.
	</p>
	<table align="left">
	  <row>
	    <cell align="center">1</cell>
	  </row>
	  <row>
	    <cell align="center">110</cell>
	  </row>
	<tcaption>NAMES_REQ (110)</tcaption></table>
	

	<p>The response for a <c>NAMES_REQ</c> looks like this:</p>
	<table align="left">
	  <row>
	    <cell align="center">4</cell>
	    <cell align="center">&nbsp;</cell>
	  </row>
	  <row>
	    <cell align="center">EPMDPortNo</cell>
	    <cell align="center">NodeInfo*</cell>
	  </row>
	<tcaption>NAMES_RESP</tcaption></table>
	<p>
	  NodeInfo is a string written for each active node.
	  When all NodeInfo has been written the connection is
	  closed by EPMD.
	</p>
	<p>
	  NodeInfo is, as expressed in Erlang:
	</p>
	<code>
	io:format("name ~s at port ~p~n", [NodeName, Port]).
	</code>
      </section>


      <section>
	<title>Dump all data from EPMD</title>
	<p>
	  This request is not really used, it should be regarded as a debug
	  feature.
	</p>
	<table align="left">
	  <row>
	  <cell align="center">1</cell>
	  </row>
	  <row>
	    <cell align="center">100</cell>
	  </row>
	<tcaption>DUMP_REQ</tcaption></table>

	<p>The response for a <c>DUMP_REQ</c> looks like this:</p>
	<table align="left">
	  <row>
	    <cell align="center">4</cell>
	    <cell align="center">&nbsp;</cell>
	  </row>
	  <row>
	    <cell align="center">EPMDPortNo</cell>
	    <cell align="center">NodeInfo*</cell>
	  </row>
	<tcaption>DUMP_RESP</tcaption></table>
	<p>
	  NodeInfo is a string written for each node kept in EPMD.
	  When all NodeInfo has been written the connection is
	  closed by EPMD.
	</p>
	<p>
	  NodeInfo is, as expressed in Erlang:
	</p>
	<code>
	io:format("active name     ~s at port ~p, fd = ~p ~n",
	          [NodeName, Port, Fd]).
	</code>
	<p>
	  or
	</p>
	<code>
	io:format("old/unused name ~s at port ~p, fd = ~p~n",
	          [NodeName, Port, Fd]).
	</code>

      </section>

      <section>
	<title>Kill the EPMD</title>
	<p>
	  This request will kill the running EPMD. It is almost never used.
	</p>
	<table align="left">
	  <row>
	  <cell align="center">1</cell>
	  </row>
	  <row>
	    <cell align="center">107</cell>
	  </row>
	<tcaption>KILL_REQ</tcaption></table>

	<p>The response fo a <c>KILL_REQ</c> looks like this:</p>
	<table align="left">
	  <row>
	    <cell align="center">2</cell>
	  </row>
	  <row>
	    <cell align="center">OKString</cell>
	  </row>
	<tcaption>KILL_RESP</tcaption></table>
	<p>
	  where <c>OKString</c> is "OK".
	</p>
      </section>

      <section>
	<title>STOP_REQ  (Not Used)</title>
	<p></p>
	<table align="left">
	  <row>
	    <cell align="center">1</cell>
	    <cell align="center">n</cell>
	  </row>
	  <row>
	    <cell align="center">115</cell>
	    <cell align="center">NodeName</cell>
	  </row>
	<tcaption>STOP_REQ</tcaption></table>
	<p>
	  where n = Length - 1
	</p>
	<p>
	  The current implementation of Erlang does not care if the connection
	  to the EPMD is broken.
	</p>
	<p>The response for a <c>STOP_REQ</c> looks like this.</p>
	<table align="left">
	  <row>
	    <cell align="center">7</cell>
	  </row>
	  <row>
	    <cell align="center">OKString</cell>
	  </row>
	<tcaption>STOP_RESP</tcaption></table>
	<p>
	  where OKString is "STOPPED".
	</p>
	<p>A negative response can look like this.</p>
	<table align="left">
	  <row>
	    <cell align="center">7</cell>
	  </row>
	  <row>
	    <cell align="center">NOKString</cell>
	  </row>
	<tcaption>STOP_NOTOK_RESP</tcaption></table>
	<p>
	  where NOKString is "NOEXIST".
	</p>
      </section>
<!--
      <section>
	<title>ALIVE_REQ (97)</title>
	<p></p>

	<table align="left">
	  <row>
	    <cell align="center">1</cell>
	    <cell align="center">2</cell>
	    <cell align="center">n</cell>
	  </row>
	  <row>
	    <cell align="center">97</cell>
	    <cell align="center">PortNo</cell>
	    <cell align="center">NodeName</cell>
	  </row>
	<tcaption></tcaption></table>

	<p>
	  where n = Length - 3
	</p>
	<p>
	  The connection created to the EPMD must be kept until the node is
	  not a distributed node any longer.
	</p>
      </section>

      <section>
	<title>ALIVE_OK_RESP (89)</title>
	<p></p>
	<table align="left">
	  <row>
	    <cell align="center">1</cell>
	    <cell align="center">2</cell>
	  </row>
	  <row>
	    <cell align="center">89</cell>
	    <cell align="center">Creation</cell>
	  </row>
	<tcaption></tcaption></table>
      </section>


      <section>
	<title>ALIVE_NOTOK_RESP  ()</title>
	<p>
	  EPMD closed the connection.
	</p>
      </section>

      <section>
	<title>PORT_PLEASE_REQ   (112)</title>
	<p></p>
      <table align="left">
	<row>
	  <cell align="center">1</cell>
	  <cell align="center">n</cell>
	</row>
	<row>
	  <cell align="center">112</cell>
	  <cell align="center">NodeName</cell>
	</row>
      <tcaption></tcaption></table>
      <p>
	where n = Length - 1
      </p>
      </section>

      <section>
	<title>PORT_OK_RESP ()</title>
	<p></p>
	<table align="left">
	  <row>
	    <cell align="center">2</cell>
	  </row>
	  <row>
	    <cell align="center">PortNo</cell>
	  </row>
	<tcaption></tcaption></table>

      </section>

      <section>
	<title>PORT_NOTOK_RESP ()</title>
	<p>
	  EPMD closed the connection.
	</p>
      </section>


      <section>
	<title>PORT_NOTOK_RESP ()</title>
	<p>
	  EPMD closed the connection.
	</p>
      </section>
-->

    </section>

      <section>
	<title>Handshake</title>
	<p>
	  The handshake is discussed in detail in the internal documentation for 
	  the kernel (Erlang) application.
	</p>
      </section>

      <section>
        <marker id="connected_nodes"/>
	<title>Protocol between connected nodes</title>
	<p>
	  As of erts version 5.7.2 the runtime system passes a distribution
	  flag in the handshake stage that enables the use of a
	  <seealso marker="erl_ext_dist#distribution_header">distribution
	  header</seealso> on all messages passed. Messages passed between
	  nodes are in this case on the following format:
	</p>
	<table align="left">
	  <row>
	    <cell align="center">4</cell>
	    <cell align="center">d</cell>
	    <cell align="center">n</cell>
	    <cell align="center">m</cell>
	  </row>
	  <row>
	    <cell align="center"><c>Length</c></cell>
	    <cell align="center"><c>DistributionHeader</c></cell>
	    <cell align="center"><c>ControlMessage</c></cell>
	    <cell align="center"><c>Message</c></cell>
	  </row>
	<tcaption></tcaption></table>
	<p>
	  where:
	</p>
	<p>
	  <c>Length</c> is equal to d + n + m
	</p>
	<p>
	  <c>ControlMessage</c> is a tuple passed using the external format of
	  Erlang.
	</p>
	<p>
	  <c>Message</c> is the message sent to another node using the '!'
	  (in external format). Note that <c>Message</c> is only passed in
	  combination with a <c>ControlMessage</c> encoding a send ('!').
	</p>
	<p>
	  Also note that <seealso marker="erl_ext_dist#overall_format">the
	  version number is omitted from the terms that follow a
	  distribution header</seealso>.
	</p>
	<p>
	  Nodes with an erts version less than 5.7.2 does not pass the
	  distribution flag that enables the distribution header. Messages
	  passed between nodes are in this case on the following format:
	</p>
	<table align="left">
	  <row>
	    <cell align="center">4</cell>
	    <cell align="center">1</cell>
	    <cell align="center">n</cell>
	    <cell align="center">m</cell>
	  </row>
	  <row>
	    <cell align="center"><c>Length</c></cell>
	    <cell align="center"><c>Type</c></cell>
	    <cell align="center"><c>ControlMessage</c></cell>
	    <cell align="center"><c>Message</c></cell>
	  </row>
	<tcaption></tcaption></table>
	<p>
	  where:
	</p>
	<p>
	  <c>Length</c> is equal to 1 + n + m
  	</p>
	<p>
	  Type is: 112 (pass through)
	</p>
	<p>
	  <c>ControlMessage</c> is a tuple passed using the external format of
	  Erlang.
	</p>
	<p>
	  <c>Message</c> is the message sent to another node using the '!'
	  (in external format).  Note that <c>Message</c> is only passed in
	  combination with a <c>ControlMessage</c> encoding a send ('!').
	</p>
	<p>
	  The <c>ControlMessage</c> is a tuple, where the first element
	  indicates which distributed operation it encodes.
	</p>
	<taglist>
	  <tag><c>LINK</c></tag>
	  <item>
	    <p>
	      <c>{1, FromPid, ToPid}</c>
	    </p>
	  </item>
	  
	  <tag><c>SEND</c></tag>
	  <item>
	    <p>
	      <c>{2, Cookie, ToPid}</c>
	    </p>
	    <p>
	    <em>Note</em> followed by <c>Message</c>
	    </p>
	  </item>

	  <tag><c>EXIT</c></tag>
	  <item>
	    <p>
	      <c>{3, FromPid, ToPid, Reason}</c>
	    </p>
	  </item>
	  
	  <tag><c>UNLINK</c></tag>
	  <item>
	    <p>
	      <c>{4, FromPid, ToPid}</c>
	    </p>
	  </item>
	  
	  <tag><c>NODE_LINK</c></tag>
	  <item>
	    <p>
	      <c>{5}</c>
	    </p>
	  </item>
	  
	  <tag><c>REG_SEND</c></tag>
	  <item>
	    <p>
	      <c>{6, FromPid, Cookie, ToName}</c>
	    </p>
	    <p>
	    <em>Note</em> followed by <c>Message</c>
	    </p>
	  </item>

	  <tag><c>GROUP_LEADER</c></tag>
	  <item>
	    <p>
	      <c>{7, FromPid, ToPid}</c>
	    </p>
	  </item>
	
	  <tag><c>EXIT2</c></tag>
	  <item>
	    <p>
	      <c>{8, FromPid, ToPid, Reason}</c>
	    </p>
	  </item>
	</taglist>
      </section>

  
    <section>
      <title>New Ctrlmessages for distrvsn = 1 (OTP R4)</title>
      <taglist>
	<tag><c>SEND_TT</c></tag>
	<item>
	<p>
	  <c>{12, Cookie, ToPid, TraceToken}</c>
	</p>
	<p>
	<em>Note</em> followed by <c>Message</c>
	</p>
	</item>

	<tag><c>EXIT_TT</c></tag>
	<item>
	<p>
	  <c>{13, FromPid, ToPid, TraceToken, Reason}</c>	  
	</p>
	</item>
      
	<tag><c>REG_SEND_TT</c></tag>
	<item>
	<p>
	  <c>{16, FromPid, Cookie, ToName, TraceToken}</c>
	</p>
	<p>
	<em>Note</em> followed by <c>Message</c>
	</p>
	</item>
      
	<tag><c>EXIT2_TT</c></tag>
	<item>
	<p>
	  <c>{18, FromPid, ToPid, TraceToken, Reason}</c>
	</p>
	</item>
      </taglist>
    </section>
    
    <section>
      <title>New Ctrlmessages for distrvsn = 2</title>
      <p>
	distrvsn 2 was never used.
      </p>
    </section>
    
    <section>
      <title>New Ctrlmessages for distrvsn = 3 (OTP R5C)</title>
      <p>
	None, but the version number was increased anyway.
      </p>
    </section>

    <section>
      <title>New Ctrlmessages for distrvsn = 4 (OTP R6)</title>
      <p>
	These are only recognized by Erlang nodes, not by hidden nodes.
      </p>
      <taglist>
	<tag><c>MONITOR_P</c></tag>
	<item>
	<p>
	  <c>{19, FromPid, ToProc, Ref}</c>
	  
	  <c>FromPid</c> = monitoring process
	  <c>ToProc</c> = monitored process pid or name (atom)
	</p>
	</item>
      
	<tag><c>DEMONITOR_P</c></tag>
	<item>
	<p>
	  <c>{20, FromPid, ToProc, Ref}</c>
	  We include the FromPid just in case we want to trace this.
	  
	  <c>FromPid</c> = monitoring process
	  <c>ToProc</c> = monitored process pid or name (atom)
	</p>
	</item>

	<tag><c>MONITOR_P_EXIT</c></tag>
	<item>
	<p>
	  <c>{21, FromProc, ToPid, Ref, Reason}</c>
	  
	  <c>FromProc</c> = monitored process pid or name (atom)
	  <c>ToPid</c> = monitoring process
	  <c>Reason</c> = exit reason for the monitored process
	</p>
	</item>
      </taglist>
    </section>
  </chapter>