ICE Help PACKETS

From ICE Enterprises
Jump to navigation Jump to search
Go to the full list of ICE Help pages.

Summary: Packet data formats and handlers

As network interfaces play an increasing role in data distribution, software and hardware must be extended to process data packets. Three forms of packets are currently handled by the ICE hardware/software:

  1. ICE Packet format - 64by header, fixed or variable length data
  2. SDDS Packet format - 56by header, fixed 1024by data
  3. VRT Packet format - 32by header, fixed 1440by data
  4. RMIF Packet protocol - 8by header, variable data

Normally, the packet headers precede the packet data they describe. They may also be placed in separate streams. The packet header formats are as follows:

ICE - ICE Packet Header (Little/Big Endian):

typedef struct {
int_1  keys[4];       /* barker syncs(3) and packet type(1) */
int_4  count;         /* packet number since start of xfer */
int_4  elem;          /* data elements in packet */
int_2  user;          /* user defined field */
int_2  channel;       /* port channel number */
int_1  id1,id2;       /* subsystem IDs */
int_1  rep;           /* data rep (Vax,Ieee,Eeei) */
int_1  bpa;           /* bytes per atom=(mode,type) */
int_1  mode;          /* data format mode (Complex, Scalar) */
int_1  type;          /* data format type (Pack,Byte,Int,Long) */
int_1  tcmode;        /* timecode mode */
int_1  tcstatus;      /* timecode status */
double tcoff;         /* sample offset from data(1) to TC */
double tcwsec;        /* timecode 1950 whole seconds */
double tcfsec;        /* timecode fractional seconds */
int_4 lval[4];        /* user fields */
} ICEPACKETSTRUCT;


VRT - VITA-49 Radio Transport Packet Header (Big Endian)

typedef struct {
 int_4 header;         /* Pkt type, fields, size */
 int_4 streamID;       /* Stream Identifier */
 int_4 orgID;          /* Organizational Unique ID */
 int_4 classID;        /* Information:Packet Class ID */
 int_4 tsis;           /* Time Stamp Integer Seconds */
 int_8 tsfs;           /* Time Stamp Fractional Seconds */
 int_1 data[1440];     /* Packet data */
 int_4 trailer;        /* Event trailer */
} VRTPACKETSTRUCT;


SDDS - SDDS Packet Header Modified (Big Endian):

typedef struct {
int_2 keys            /* barker packet sync 0x55AA */
int_2 port            /* UDP source|destination port */
int_4 addr            /* UDP source|destination address */
/* now starts the actual SDDS UDP payload */
int_1 fid;            /* format identifier */
int_1 bits;           /* bits per data word 4|8|16 */
int_2 frame;          /* frame sequence number (0x1F=parity packet) */
int_2 tcinfo;         /* Timecode valid (0xF000) and sample offset in packet (0x0FFF) */
int_2 tccorr;         /* Time from sample to 1msec hack in 250psec tics (min SR=60kHz) */
int_8 tctics;         /* Number of 250psec tics since jan 1 to timecode hack */
int_4 tcext;          /* Timecode extended precision (250psec/2^32) */
int_1 sscinfo[12];    /* SSC information */
int_1 ssdinfo[4];     /* SSD information | IP address */
int_1 aadinfo[20];    /* AAD information */
int_1 data[1024];     /* packet data */
} SDDSPACKETSTRUCT;


RMIF - RMIF Packet Header (Endian independent):

typedef struct {
int_1 func;           /* defines the method to call */
int_1 flag;           /* is the protocol version number and options mask */
int_1 info;           /* channel number for fast routing of monitored properties */
int_1 rep;            /* packet data representation (VAX|IEEE|EEEI) */
int_1 seq;            /* sequence number (0-127) for Reliable packets */
int_1 try;            /* number of resends for Reliable packets */
int_1 rpt;            /* report sequence number */
int_1 adj;            /* number of bytes in adjunct header */
} RMIFPACKETSTRUCT;


NETWORK - Network interface notes

Newer ICE products often involve data capture/playback over standard host network interfaces.

To get higher transfer rates on Linux, the system parameters for the max network buffer size must be set. The system administrator needs to set these parameters to allow large network buffers for UDP on Linux:

> sysctl -a | grep net.core
> sysctl -w net.core.rmem_max=16777216
> sysctl -w net.core.wmem_max=16777216

Add these lines to /etc/sysctl.conf to make them permanent. If you add or remove network cards, remove the old udev rules to properly renumber the existing interfaces:

> rm /etc/udev/rules.d/*-net.rules

Reboot the system and read the new auto generated file to find the current interfaces. Modify /etc/sysconfig/network-scripts/ifcfg-eth{0-N} to specify the interfaces hardware address. ICE appliances use the subnet 192.168.N.XXX where N is the ethN of the network data port. Make sure to modify the HWADDR, IPADDR, NETWORK, and GATEWAY to reflect the ethN interface number. Then run /etc/init.d/network restart to apply the changes.

More notes to come.