FANDA Multicast Data Format

Multicast packet format for Fairmount. All data is little endian on the wire.

NOTE That a UUID is 16 bytes long.

typedef struct udp_multicast_header
{
    U16_t               total_packet_length;  /* Header length plus data payload */
    U8_t                version;              /* current value = 1 or 2 (encrypted) */
    U8_t                flags;                /* 1 = encrypted */
    U32_t		group_address;        /* Multicast Group IP address */
    UUID                library_guid;         /* GUID matching a library returned by GetNDL */
    U16_t               structure_id;         /* structure ID attribute referenced in the NDL */
} Udp_Multicast_Header_t;

typedef struct udp_multicast_packet
{
    Udp_Multicast_Header_t header;            /* header information */
    U8_t                   data[1500];        /* data to be interpreted per the NDL and will be a maximum of 1500 bytes */
} Udp_Multicast_Packet_t;

When encryption is in use, the NDL will include the following fields:

  • Cipher
    Cipher in use. One of the following strings:
    *3DES
    *AES128
    *AES192
    *AES256
  • KeyBits
    Number of bits in the encryption key
  • Rekey
    Rekey interval in minutes

The

udp_multicast_packet

is wrapped as follows:

typedef struct udp_encrypted_packet
{
    Udp_Multicast_Header_t header;            /* header information */
    U32_t                  key_generation;    /* encryption key index */
    U8_t                   iv[];              /* length depends on cipher in use */
    U8_t                   enc_data[];        /* length from header.total_packet_length */
} Udp_Encrypted_Packet_t
header.version

will be at least 2.

header.flags

will have the low bit set to indicate that the packet is encrypted.

The encrypted plaintext is in the same format as for unencrypted multicasts with an added SHA1 hash at the end. The SHA1 is calculated over all data bytes, but does not include any header bytes.