]> Cypherpunks.ru repositories - nncp.git/blob - doc/mcd.texi
Add various documentation indices
[nncp.git] / doc / mcd.texi
1 @node MCD
2 @cindex MCD
3 @cindex multicast discovery
4 @unnumbered MultiCast Discovery
5
6 MCD is an addition to online @ref{Sync, synchronization protocol}, that
7 gives ability to make node discovery by sending multicast announcements
8 in local area network. It is very simple:
9
10 @itemize
11 @item
12     @ref{nncp-daemon} sends multicast messages about its presence from
13     time to time. See @ref{CfgMCDSend, mcd-send} configuration option.
14 @item
15     When @ref{nncp-caller} sees them, it adds them as the most
16     preferred addresses to already known ones. If MCD address
17     announcement was not refreshed after two minutes -- it is removed.
18     See @ref{CfgMCDListen, mcd-listen} and
19     @ref{CfgMCDIgnore, mcd-ignore} configuration options.
20 @end itemize
21
22 MCD announcement is an XDR-encoded packet with only two fields:
23
24 @verbatim
25 +----------------+
26 | MAGIC | SENDER |
27 +----------------+
28 @end verbatim
29
30 Magic number is @verb{|N N C P D 0x00 0x00 0x01|} and sender is 32-byte
31 identifier of the node. It is sent as UDP packet on IPv6
32 @strong{@verb{|ff02::4e4e:4350|}} (hexadecimal ASCII @verb{|NNCP|})
33 multicast address and @strong{5400} port. Operating system will use IPv6
34 link-local address as a source one, with the port taken from
35 @command{nncp-daemon}'s @option{-bind} option. That way, IP packet
36 itself will carry the link-scope reachable address of the daemon.