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