-struct mscp {
- struct mscp_header mscp_header;/* device specific header */
- long mscp_cmdref; /* command reference number */
- short mscp_unit; /* unit number */
- short mscp_xxx1; /* unused */
- u_char mscp_opcode; /* opcode */
- u_char mscp_flags; /* end message flags */
- short mscp_modifier; /* modifiers */
- union {
- struct {
- long Mscp_bytecnt; /* byte count */
- long Mscp_buffer; /* buffer descriptor */
- long Mscp_xxx2[2]; /* unused */
- long Mscp_lbn; /* logical block number */
- long Mscp_xxx4; /* unused */
- long *Mscp_dscptr; /* pointer to descriptor (software) */
- long Mscp_sftwds[4]; /* software words, padding */
- } mscp_generic;
- struct {
- short Mscp_version; /* MSCP version */
- short Mscp_cntflgs; /* controller flags */
- short Mscp_hsttmo; /* host timeout */
- short Mscp_usefrac; /* use fraction */
- long Mscp_time; /* time and date */
- } mscp_setcntchar;
- struct {
- short Mscp_multunt; /* multi-unit code */
- short Mscp_unitflgs; /* unit flags */
- long Mscp_hostid; /* host identifier */
- quad Mscp_unitid; /* unit identifier */
- long Mscp_mediaid; /* media type identifier */
- short Mscp_shdwunt; /* shadow unit */
- short Mscp_shdwsts; /* shadow status */
- short Mscp_track; /* track size */
- short Mscp_group; /* group size */
- short Mscp_cylinder; /* cylinder size */
- short Mscp_xxx3; /* reserved */
- short Mscp_rctsize; /* RCT table size */
- char Mscp_rbns; /* RBNs / track */
- char Mscp_rctcpys; /* RCT copies */
- } mscp_getunitsts;
- } mscp_un;
- short mscp_fil1;
- short mscp_fil2;
- short mscp_fil3;
-};
+/*
+ * An MSCP packet begins with a header giving the length of
+ * the entire packet (including the header itself)(?), two bytes
+ * of device specific data, and the a whole bunch of variants
+ * depending on message type.
+ *
+ * N.B.: In most cases we distinguish between a `command' and
+ * an `end' variant as well. The command variant is that which
+ * is given to the controller; the `end' variant is its response.
+ */