### Multicast flooding transmission ¶

Do you need to send single mail message or file to many recipients at once? For example an update of some program, network participants list or available files for freqing? But you are not connected directly to each of them?

       A-------->E---->F    A -> B C E
      / \        |\    ^    C -> H J
     /   \       |  \  |    E -> D F G
    v     v      v    \v    D -> G
    B     C      D---->G    J -> K
         / \     ^    /     K -> D G
        /   \    |   /
       v     v   v  /
       H     J<->K<-

NNCP has multicast packets format, allowing you to flood transmission of the single packet to multiple recipients. A sends packet to three destinations. C sends it to the two nodes next. E sends it to three. Some participants may receive multiple copies of the same packet, like D, J, G, F, but that copies will be just ignored. If B sends packet to single known to him A, then that packet will be distributed among all other multicast area subscribers.

Moreover those multicast packets are encrypted and require key knowledge for reading. But that does not prevent their relaying! Also you are not required to know sender’s public keys. That way you can easily create echo-conferences for files or commands (like mail message delivering) transmission.

Let’s create keys for the new multicast area:

    $ nncp-cfgnew -area filelists -nocomments
    areas: {
      filelists: {
        id: TOU5TKOW4JBIZJBX63D4776C72FMWDAUAUSZNJX4DFOITVYQ5ZQA
        pub: DSHL5O6BK2R3QKJAIJ7BC4UIGE73EC2LJPOV3VTS44KYOTUQYZLA
        prv: AYD5FAA4GDDSAD5N65NJLLFS6TG2NSPQ46KAQO5U722JLVG34SOQ
      }
    }

and send that keypair everybody who wants to read that area. For intermediaries willing to relay packets on, but that should not read them, you just need to send area’s identity. For example A adds to his configuration:

    areas: {
      filelists: {
        id: TOU...
        pub: DSH...
        prv: AYD...
        subs: ["B", "C", "E"]
        incoming: /home/A/areas/filelists
      }

and E, that will be relaying intermediary (as we decided):

    areas: {
      filelists: {
        id: TOU...
        subs: ["D", "F", "G"]
      }

After you distributed the knowledge about `nodelist` multicast area, you can share file lists:

    $ nncp-file tree-of-A-20210715.txt.zst area:filelists:
    $ nncp-toss -node self