📄 mscp_msg.h
字号:
*/ struct _cm { u_long cmd_ref; /* Command reference number */ u_short unit; /* Unit number */ u_short :16; /* Reserved */ u_char opcode; /* Opcode */ u_char :8; /* Reserved */ u_short modifier; /* Command modifiers */ union { /* Overlaid generic command message offsets */ struct _gen_cm { u_long byte_cnt; /* Byte count */ u_long buffer[ 3 ]; /* Buffer descriptor */ u_long lbn; /* Logical block number */ } gen; /* ABORT and GET COMMAND STATUS command message offsets */ struct _abo_cm { /* Command offsets for ABORT */ u_long out_ref; /* Outstanding reference no. */ } abo; /* ACCESS NON-VOLATILE MEMORY command message offsets */ struct _anm_cm { u_long :32; /* Reserved */ u_long anm_offs; /* Offset in NVM */ u_short anm_oper; /* Operation (see A-12) */ u_short anm_dlgh; /* Data length */ u_char anm_memd[ 4 ]; /* NVM data (variable) */ } anm; /* ONLINE and SET UNIT CHARACTERISTICS command message offsets */ struct _onl_cm { u_short :16; /* Reserved */ u_short unt_flgs; /* Unit flags */ u_long :32; /* Reserved */ union { struct { /* Disk variant */ u_long excl_lba; /* Excluded LBN address */ u_long excl_lbc; /* Excluded LBN count */ u_long dev_parm; /* Device parameters */ u_short shdw_unt; /* Shadow unit number */ u_short copy_mod; /* Copy mode */ } d; struct { /* Tape variant */ u_long :32; /* Reserved */ u_long :32; /* Reserved */ u_long dev_parm; /* Device parameters */ u_short format; /* Format */ u_short speed; /* Speed */ } t; } u1; } onl; /* REPOSITION command message offsets */ struct _rpo_cm { u_long rec_cnt; /* Record count/object count */ u_long tmgp_cnt; /* Tape mark count */ } rpo; /* REPLACE command message offsets */ struct _rep_cm { u_long rbn; /* Replacement block number */ } rep; /* set controller characteristics command message offsets */ struct _scc_cm { u_short version; /* MSCP version */ u_short cnt_flgs; /* Controller flags */ u_short hst_tmo; /* Host timeout */ u_short :16; /* Reserved */ u_long time[ 2 ]; /* Quadword date/time */ u_long cnt_parm; /* Cnt-dependent parameters */ } scc; /* FORMAT command message offsets */ struct _fmt_cm { u_long byte_cnt; /* Byte count */ u_long buffer[ 3 ]; /* Buffer descriptor */ u_long fmt_func; /* Format function code */ } fmt; /* DISPLAY command message offsets */ struct _dpy_cm { u_short ditem; /* Item code */ u_short dmode; /* Mode */ u_char dtext[ 16 ]; /* Display text */ } dpy; } u0; } cm; /* Generic end message offsets */ struct _em { u_long cmd_ref; /* Command reference number */ u_short unit; /* Unit number */ u_short seq_num; /* Last err log sequence num */ u_char endcode; /* Endcode */ u_char flags; /* End message flags */ u_short status; /* Status */ union { /* Overlaid generic end message offsets */ struct _gen_em { u_long byte_cnt; /* Byte count */ u_long :32; /* Reserved */ u_long :32; /* Reserved */ u_long :32; /* Reserved */ u_long frst_bad; /* First bad block */ } gen; /* ABORT and GET COMMAND STATUS end message offsets */ struct _abo_em { u_long out_ref; /* Outstanding reference no. */ u_long cmd_sts; /* Command status */ } abo; /* ACCESS NON-VOLATILE MEMORY end message offsets */ struct _anm_em { u_long anm_size; /* NVM size */ u_long anm_offs; /* Offset in NVM */ u_short anm_oper; /* Operation (see A-12) */ u_short anm_dlgh; /* Data length */ u_long anm_memd; /* NVM data (variable) */ } anm; /* GET UNIT STATUS end message offsets */ struct _gus_em { u_short mult_unt; /* Multi-unit code */ u_short unt_flgs; /* Unit flags */ u_long :32; /* Reserved */ u_long unit_id[ 2 ]; /* Unit identifier */ u_long media_id; /* Media identifier */ union { struct { u_short shdw_unt; /* Shadow unit */ u_short shdw_sts; /* Shadow status */ u_short track; /* Track size */ u_short group; /* Group size */ u_short cylinder; /* Cylinder size */ u_char unit_svr; /* Unit software version */ u_char unit_hvr; /* Unit hardware version */ u_short rct_size; /* RCT table size */ u_char rbns; /* RBNs per track */ u_char rct_cpys; /* RCT copies */ } d; struct { u_short format; /* Density in bpi */ u_short speed; /* Instantaneous data rate */ u_short formenu; /* Format menu */ u_char freecap; /* Free capacity */ u_char :8; /* Reserved */ u_char fmtr_svr; /* Formater software version */ u_char fmtr_hvr; /* Formater hardware version */ u_char unit_svr; /* Unit software version */ u_char unit_hvr; /* Unit hardware version */ } t; } u1; } gus; /* ONLINE and SET UNIT CHARACTERISTICS end message and * AVAILABLE attention message offsets. */ struct _onl_em { u_short mult_unt; /* Multi-unit code */ u_short unt_flgs; /* Unit flags */ u_long :32; /* Reserved */ u_long unit_id[ 2 ]; /* Unit identifier */ u_long media_id; /* Media identifier */ union { struct { u_short shdw_unt; /* Shadow unit */ u_short shdw_sts; /* Shadow status */ u_long unt_size; /* Unit size */ u_long vol_ser; /* Volume serial number */ } d; struct { u_short format; /* Density in bpi */ u_short speed; /* Instantaneous data rate */ u_long maxwtrec; /* Max write byte count */ u_short noiserec; /* Max noise record size */ u_short :16; /* Reserved */ } t; } u1; } onl; /* SET CONTROLLER CHARACTERISTICS end message offsets. */ struct _scc_em { u_short version; /* MSCP version */ u_short cnt_flgs; /* Controller flags */ u_short cnt_tmo; /* Controller timeout */ u_char cnt_svr; /* Ctrlr software version */ u_char cnt_hvr; /* Ctrlr hardware version */ u_long cnt_id[ 2 ]; /* Controller ID */ u_long max_bcnt; /* Ctrlr maximum byte count */ } scc; /* Tape ACCESS, COMPARE HOST DATA, FLUSH, READ, * WRITE and WRITE TAPE MARK end message offsets. */ struct _acc_em { u_long byte_cnt; /* Host transfer */ u_long :32; /* Reserved */ u_long :32; /* Reserved */ u_long :32; /* Reserved */ u_long position; /* Object count */ u_long taperec; /* Tape record byte count */ } acc; /* REPOSITION end message offsets. */ struct _rpo_em { u_long rcskiped; /* Records skipped/undefined */ u_long tmskiped; /* Tape marks skipped/undef */ u_long :32; /* Reserved */ u_long :32; /* Reserved */ u_long position; /* Object count */ } rpo; } u0; } em;} MSCP;typedef struct _cm MSCP_CMDMSG;typedef struct _em MSCP_ENDMSG;/* Redefine cells inside inner unions and structures to eliminate * multiple qualification levels. */#define mscp_anm_offs cm.u0.anm.anm_offs /* Offset in NVM */#define mscp_anm_oper cm.u0.anm.anm_oper /* Operation (see A-12) */#define mscp_anm_dlgh cm.u0.anm.anm_dlgh /* Data length */#define mscp_anm_memd cm.u0.anm.anm_memd /* NVM data */#define mscp_anm_size em.u0.anm.anm_size /* NVM size */#define mscp_buffer cm.u0.gen.buffer /* Buffer descriptor */#define mscp_byte_cnt cm.u0.gen.byte_cnt /* Byte count */#define mscp_cmd_ref cm.cmd_ref /* Command reference number */#define mscp_cmd_sts em.u0.abo.cmd_sts /* Command status */#define mscp_cnt_flgs cm.u0.scc.cnt_flgs /* Controller flags */#define mscp_cnt_hvr em.u0.scc.cnt_hvr /* Hardware version */#define mscp_cnt_id em.u0.scc.cnt_id /* Controller ID */#define mscp_cnt_parm cm.u0.scc.cnt_parm /* Ctlr-dependent parms */#define mscp_cnt_svr em.u0.scc.cnt_svr /* Software version */#define mscp_cnt_tmo em.u0.scc.cnt_tmo /* Controller timeout */#define mscp_copy_mod cm.u0.onl.u1.d.copy_mod /* Copy mode */#define mscp_cylinder em.u0.gus.u1.d.cylinder /* Cylinder size */#define mscp_dev_parm cm.u0.onl.u1.d.dev_parm /* Device parameters */#define mscp_ditem cm.u0.dpy.ditem /* Item code */#define mscp_dmode cm.u0.dpy.dmode /* Mode */#define mscp_dtext cm.u0.dpy.dtext /* Display text */#define mscp_endcode em.endcode /* Endcode aka opcode */#define mscp_excl_lba cm.u0.onl.u1.d.excl_lba /* Excluded LBN address */#define mscp_excl_lbc cm.u0.onl.u1.d.excl_lbc /* Excluded LBN count */#define mscp_flags em.flags /* End message flags */#define mscp_fmtr_hvr em.u0.gus.u1.t.fmtr_hvr /* Formatter h/w version */#define mscp_fmtr_svr em.u0.gus.u1.t.fmtr_svr /* Formatter s/w version */#define mscp_fmt_func cm.u0.fmt.fmt_func /* Format disk function code */#define mscp_format cm.u0.onl.u1.t.format /* Tape format */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -