Protocols for downloading firmware image

Dune firmware images are always distributed and downloaded as DFF files
("Dune Firmware File").

When firmware upgrade is triggered (either way, e.g. by a built-in firmware
upgrade functionality, or by the custom application using Dune STB API
operation), firmware image can be downloaded from network to the STB using
one of the following protocols:

   - Unicast: from HTTP URL.
      - DFF file should be used in gzipped form.
      - Example URL:
         - http://customer.com/upgrade/dunehd/dune_firmware_hdtv_101_customer_101010_1010.dff.gz

   - Multicast: from multicast address.
      - DFF file should be used in non-gzipped form, and should be streamed
        using a special multicast streaming tool (see "Multicast firmware
        upgrade" section).
      - Example URL:
         - igmp://multicast-ip-address:port

Multicast firmware upgrade

For multicast firmware upgrade, the following firmware image URL syntax is
supported (either one can be used, there is no difference):
   - a) igmp://multicast-ip-address:port
   - b) udp://@multicast-ip-address:port

Multicast streaming of firmware file uses a special streaming protocol. There
is the following simple tool (for Linux/x86) allowing to easily stream .DFF
files on a given multicast address:
   - http://files.dune-hd.com/sdk/misc/dune_file_multicast_server.x86.gz

Instructions for using this tool:
     ./dune_file_multicast_server.x86 [options] <ip-address> <port> <file-path>

   Basic options (alter these according to your needs):
     [-s speed] Speed in KBytes/s (default: 256)
     [-t ttl] TTL for multicast UDP packets (default: 1)

   Advanced options (typically not needed):
     [-n iterations_number] Iterations number, 0 = infinite (default: 0)
     [-d iteration_delay] Delay between iterations in seconds (default: 0)
     [-i info_packets_period] INFO packets period in seconds, 1..30 (default: 2)
     [-v level] Verbosity level, 0..5 (default: 1)
     [-h] Help message

When the tool is launched, it performs endless streaming of the given file
on the given multicast address with the given transfer speed.

Example of using the tool on an Linux/x86 host:
   1. Download the archive with server executable:
         wget http://files.dune-hd.com/sdk/misc/dune_file_multicast_server.x86.gz
   2. Unpack the archive:
         gunzip dune_file_multicast_server.x86.gz
   3. Ensure firmware image (DFF file, not gzipped and not zipped) is
      available on the host.
   4. Launch multicast update server. For example:
        .../dune_file_multicast_server.x86 5500 \

If several firmware files need to be streamed (e.g. for several Dune HD
models), several instances of the tool should be run, each on its own
multicast address.

In production environment, for best robustness, it is recommended to launch
the tool using some mechanism (e.g. simple shell script) which ensures that
the tool is automatically restarted in case if it terminates for any