X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=doc%2Fmulticast.texi;h=1c8913f357a337938bbd5bd49fdba6f8cb253f0a;hb=bb7fe5e770586be9f44a8a7f3321a3139d5345bb;hp=15554f28451af6cd19c862c35adc505ad96bdf48;hpb=9aebb21b953517bcb6639c22939616ed4efbe87b;p=nncp.git diff --git a/doc/multicast.texi b/doc/multicast.texi index 15554f2..1c8913f 100644 --- a/doc/multicast.texi +++ b/doc/multicast.texi @@ -1,4 +1,5 @@ @node Multicast +@cindex multicast area @unnumbered Multicast areas NNCP has ability to multicast packets: send single packet to multiple @@ -10,7 +11,8 @@ networks). Each multicast group is identified by so-called @strong{area}. Area consists of private/public Curve25519 keypairs for @ref{Encrypted area, packets encryption}, identity (BLAKE2b-256 hash of the public key) and -possible subscribers. Areas are created with @ref{nncp-cfgnew} command. +possible subscribers. Areas are created with @command{@ref{nncp-cfgnew}} +command. You can make either file or exec transmissions to the areas. Those ordinary file/exec packets are double wrapped in: @@ -23,6 +25,7 @@ that encrypted packet to the others) can should it to the subscribers further @end itemize +@vindex MsgHash Area's message identity (@code{MsgHash}) is the hash of the encrypted packet header. Because the area packet, containing the encrypted packet, is relayed as-is without any modifications, that area message's hash @@ -39,12 +42,12 @@ following: @itemize @item check if that message was already seen (sent or received from) before by the destination node: check existence of - @file{SPOOL/NODE/area/AREA/MsgHash.seen} file. Skip that node if + @file{SPOOL/NODE/area/AREA/MsgHash} file. Skip that node if it exists @item if subscriber's node is not the one we received the packet from, then create outgoing encrypted packet to it, with that area packet inside - @item create corresponding @file{MsgHash.seen} file + @item create corresponding @file{MsgHash} file @item "rewind" the outer encrypted file to the beginning and repeat the whole cycle again, while all of subscribers will "seen" that area's message. @@ -55,7 +58,7 @@ following: consumption. @end itemize @item check if we have seen that area's message before by looking at - @file{SPOOL/SELF/area/AREA/MsgHash.seen}. If so, remove the packet, + @file{SPOOL/SELF/area/AREA/MsgHash}. If so, remove the packet, because it is just a ordinary possible duplicate, finish its processing @item check if we have got corresponding area's private key. If no key exists, then remove the packet, finish its processing -- we just @@ -106,18 +109,18 @@ $ nncp-toss -node self @enumerate @item -@command{nncp-file} creates an encrypted packet with area packet and +@command{@ref{nncp-file}} creates an encrypted packet with area packet and encrypted packet inside it, with our own @code{self} node as a recipient (in the @file{SPOOL/SELF/tx} directory). It also creates the -@file{SPOOL/SELF/area/AREA/MSGHASH.seen} file. +@file{SPOOL/SELF/area/AREA/MsgHash} file. @item -@command{nncp-toss} sees @file{tx/} file and "opens" it, applying the +@command{@ref{nncp-toss}} sees @file{tx/} file and "opens" it, applying the area message tossing procedure as described above. That will create outgoing packets in @file{SPOOL/nodeB/tx} and @file{SPOOL/nodeD/tx} -directories with @file{SPOOL/nodeB/area/AREA/MSGHASH.seen} -@file{SPOOL/nodeD/area/AREA/MSGHASH.seen} files. Because we already have -@file{SPOOL/SELF/area/AREA/MSGHASH.seen}, that packet is removed then. +directories with @file{SPOOL/nodeB/area/AREA/MsgHash} +@file{SPOOL/nodeD/area/AREA/MsgHash} files. Because we already have +@file{SPOOL/SELF/area/AREA/MsgHash}, that packet is removed then. @item When @code{nodeB} receives the encrypted packet, it sees the area one @@ -131,7 +134,7 @@ not read area's message because it lacks the keys. @item @code{nodeD} receives packets from both @code{nodeA} and @code{nodeB}. Only one of them processed, and other is ignored because corresponding -@file{MSGHASH.seen} file will exist. +@file{MsgHash} file will exist. If @code{nodeD} will receive packet from the @code{nodeB} first, it will relay it to the @code{nodeA} also, that will silently remove it when