]> Cypherpunks.ru repositories - nncp.git/blob - doc/mcd.texi
Unify @ref and @command usage
[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     @command{@ref{nncp-daemon}} sends multicast messages about its
13     presence from time to time. See @ref{CfgMCDSend, mcd-send}
14     configuration option.
15 @item
16     When @command{@ref{nncp-caller}} sees them, it adds them as the most
17     preferred addresses to already known ones. If MCD address
18     announcement was not refreshed after two minutes -- it is removed.
19     See @ref{CfgMCDListen, mcd-listen} and
20     @ref{CfgMCDIgnore, mcd-ignore} configuration options.
21 @end itemize
22
23 MCD announcement is an XDR-encoded packet with only two fields:
24
25 @verbatim
26 +----------------+
27 | MAGIC | SENDER |
28 +----------------+
29 @end verbatim
30
31 Magic number is @verb{|N N C P D 0x00 0x00 0x01|} and sender is 32-byte
32 identifier of the node. It is sent as UDP packet on IPv6
33 @strong{@verb{|ff02::4e4e:4350|}} (hexadecimal ASCII @verb{|NNCP|})
34 multicast address and @strong{5400} port. Operating system will use IPv6
35 link-local address as a source one, with the port taken from
36 @command{@ref{nncp-daemon}}'s @option{-bind} option. That way, IP packet
37 itself will carry the link-scope reachable address of the daemon.