Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Structure of QNX4 Arcnet packet header
Ref. No. QNX.000009479
Category(ies) Network
Issue We have a software utility which allows us to view the structure of a packet on the network.  We are trying to figure out what is the structure of the QNX header.  What information will we find in this header?

Solution Here is the structure we use for the header of a QNX4 Arcnet packet.

struct _phys_hdr        /* 20 byte header on every QNX4 ARCNET pkt      */
{
  unsigned char  system_code;    /* ARCNET std - QNX is 0xDC */
  unsigned char  sub_code;      /* QNX POSIX ver 4.00 is 1 */
  unsigned char  zero1;          /* per-vid seq_num, WAS zero1 */
  unsigned char  seq;            /* sequence number, per node */
  unsigned char  class;          /* CTRL or DATA pkt */
  unsigned char  type;          /* type of CTRL or DATA pkt */
  unsigned char  old_class;      /* must not be 2|3 for qnx2 */
  unsigned char  flags;          /* BEGIN, END flags */
  short unsigned int rcv_vid;    /* VID on recvng end */
  short unsigned int vid_seq;    /* per-vid seq_num, WAS ext_rcv */
  short unsigned int rcv_off;    /* offset into rcvng data seg */
  short unsigned int src_vid;    /* was ext_rcv_off == 0 */
  short unsigned int rcv_seg;    /* segment of rcvng data */
  short unsigned int len;        /* length of data[] after hdr  */
  unsigned char data[];          /* pointer to data xferred */
};