00001 #ifndef nisca_h 00002 #define nisca_h 00003 00004 #define NISCA_M_SRSNTDATWM 0x80 00005 #define NISCA_M_SRLB 0x100 00006 #define NISCA_M_RRSTSTRT 0x200 00007 #define NISCA_M_SSTRT 0x400 00008 #define NISCA_M_SRST 0x800 00009 #define NISCA_M_RMDATREQ 0x1000 00010 #define NISCA_M_SMDATREQ 0x2000 00011 #define NISCA_M_RSNTMDAT 0x4000 00012 #define NISCA_M_SSNTMDAT 0x8000 00013 #define NISCA_M_SRID 0x10000 00014 #define NISCA_M_SRDATREQ 0x20000 /* bit place, 6 bits */ 00015 #define NISCA_M_RSNTDAT 0x800000 00016 #define NISCA_M_SSNTDAT 0x1000000 00017 #define NISCA_M_SRMSG 0x2000000 00018 #define NISCA_M_UNINIT_MAINT 0x4000000 00019 #define NISCA_M_UNINIT 0x8000000 00020 #define NISCA_M_DISAB_MAINT 0x10000000 00021 #define NISCA_M_DISAB 0x20000000 00022 #define NISCA_M_ENAB_MAINT 0x40000000 00023 #define NISCA_M_ENAB 0x80000000 00024 00025 #define NISCA_C_HELLO 0x00 00026 #define NISCA_C_BYE 0x01 00027 #define NISCA_C_CCSTART 0x02 00028 #define NISCA_C_VERF 0x03 00029 #define NISCA_C_VACK 0x04 00030 #define NISCA_C_DONE 0x05 00031 #define NISCA_C_SOLICIT_SRV 0x06 00032 #define NISCA_C_RESERVED 0x07 /* ? */ 00033 00034 #define NISCA_C_CC_LNG 0x62 00035 #define NISCA_C_CC_LNG_V11 0x2E 00036 #define NISCA_C_CC_LNG_V12 0x3E 00037 #define NISCA_C_CC_LNG_V13 0x62 00038 #define NISCA_C_CMDQ_2 0x01 00039 #define NISCA_C_CMDQ_3 0x00 00040 #define NISCA_C_CMDQ_HI 0x02 00041 #define NISCA_C_CMDQ_LO 0x03 00042 #define NISCA_C_DELAY_ACK 0x01 00043 #define NISCA_C_DELAY_SEQ 0x02 00044 #define NISCA_C_DX_LNG_HDR 0x0E 00045 #define NISCA_C_GROUP_BASE_HI 0x00000100 00046 #define NISCA_C_GROUP_BASE_LO 0x010400AB /* ab:00:04:01 */ 00047 #define NISCA_C_HELLO_MIN_TIM 0x01 00048 #define NISCA_C_HELLO_TIMER 0x03 00049 #define NISCA_C_HS_TIMERS 0x01 00050 #define NISCA_C_HS_TMO_1 0x05 00051 #define NISCA_C_HS_TMO_MAX 0x05 00052 #define NISCA_C_LSTN_TIMERS 0x01 00053 #define NISCA_C_LSTN_TMO_1 0x08 00054 #define NISCA_C_LSTN_TMO_MAX 0x08 00055 #define NISCA_C_MAJOR 0x01 00056 #define NISCA_C_MAX_CACHE 0x1F 00057 #define NISCA_C_MAX_REXMT 0x1E 00058 #define NISCA_C_MINOR 0x03 00059 #define NISCA_C_NI_PROTOCOL 0x0760 /* really 0x6007, rfc 1700 */ 00060 #define NISCA_C_NODE_HW_VAX 0x00 00061 #define NISCA_C_PIPE_QUOTA 0x08 00062 #define NISCA_C_PPC_LNG_HDR 0x01 00063 #define NISCA_C_SMSG_OVHD 0x18 00064 00065 #define NISCA_C_PPDMSG_MAX 0x16 00066 #define NISCA_C_REQ_DAT0 0x08 00067 #define NISCA_C_REQ_DAT1 0x09 00068 #define NISCA_C_REQ_DAT2 0x0A 00069 #define NISCA_C_REQ_DATM 0x07 00070 #define NISCA_C_REQ_ID 0x06 00071 #define NISCA_C_RESET 0x12 00072 #define NISCA_C_RET_CNF 0x0F 00073 #define NISCA_C_RET_CNFM 0x0E 00074 #define NISCA_C_RET_CNFWM 0x16 00075 #define NISCA_C_RET_DAT 0x0C 00076 #define NISCA_C_RET_DATM 0x0B 00077 #define NISCA_C_RET_DAT_LP 0x0D 00078 #define NISCA_C_RET_ID 0x10 00079 #define NISCA_C_RET_LB 0x11 00080 #define NISCA_C_SNT_DAT 0x04 00081 #define NISCA_C_SNT_DATM 0x03 00082 #define NISCA_C_SNT_DATWM 0x14 00083 #define NISCA_C_SNT_DATWM_LP 0x15 00084 #define NISCA_C_SNT_DAT_LP 0x05 00085 #define NISCA_C_SNT_DG 0x00 00086 #define NISCA_C_SNT_LB 0x01 00087 #define NISCA_C_SNT_SEQ 0x02 00088 #define NISCA_C_START 0x13 00089 00090 #define NISCA_C_TIMER 0x00989680 00091 00092 #define NISCA_C_TR_LNG_HDR 0x09 00093 #define NISCA_C_TR_LNG_HDR_V10 0x06 00094 #define NISCA_C_TR_LNG_HDR_V13 0x09 00095 00096 #define NISCA_M_TR_DATA 0x01 00097 #define NISCA_M_TR_SEQ 0x02 00098 #define NISCA_M_TR_NAK 0x04 00099 #define NISCA_M_TR_ACK 0x08 00100 #define NISCA_M_TR_RSVP 0x10 00101 #define NISCA_M_TR_REXMT 0x20 00102 #define NISCA_M_TR_CTL 0x40 00103 #define NISCA_M_TR_CCFLG 0x80 00104 00105 #define NISCA_M_AUTHORIZE 0x10 00106 #define NISCA_M_MAINT 0x80000008 /* really 08000080 */ 00107 #define NISCA_M_OK_XMT 0x20 00108 #define NISCA_M_PORT_FCN 0x83FF0180 00109 #define NISCA_M_SRV_RCHK 0x02 00110 #define NISCA_M_SRV_XCHK 0x01 00111 #define NISCA_M_STA_INFO 0x0400 00112 #define NISCA_M_SRV_NOSUP 0xFFFFFFFC 00113 #define NISCA_M_SRV_SUP 0x00000003 00114 #define NISCA_S_DEVICE_NAME 0x10 00115 #define NISCA_S_LAN_HW_ADDR 0x06 00116 #define NISCA_S_NODENAME 0x08 00117 #define NISCA_S_SERVICE 0x10 00118 00119 #define NISCA_V_SRV_XCHK 0x00 00120 #define NISCA_V_SRV_RCHK 0x01 00121 #define NISCA_V_AUTHORIZE 0x04 00122 #define NISCA_V_OK_XMT 0x05 00123 #define NISCA_V_NO_XMT 0x06 00124 #define NISCA_V_CCFLG 0x07 00125 #define NISCA_V_TR_ACK 0x03 00126 #define NISCA_V_TR_DATA 0x00 00127 #define NISCA_V_TR_REXMT 0x05 00128 #define NISCA_V_TR_RSVP 0x04 00129 #define NISCA_V_TR_SEQ 0x01 00130 00131 struct _nisca_intro { 00132 // oops seems this is the dx 00133 unsigned short length; 00134 unsigned char dst[6]; 00135 unsigned short group; 00136 unsigned char src[6]; 00137 }; 00138 00139 struct _nisca { 00140 /* and before is: ( I think ) 00141 unsigned short length excluding this 16 b? 00142 unsigned char dst[6] ab000401+word 00143 unsigned word scssystemid? fffe? 00144 unsigned char src[6] i think 00145 */ 00146 00147 union { 00148 struct { 00149 unsigned long nisca_l_dx_dst_lo; 00150 unsigned short nisca_w_dx_dst_hi; 00151 unsigned short nisca_w_dx_group; 00152 unsigned long nisca_l_dx_src_lo; 00153 unsigned short nisca_w_dx_src_hi; 00154 }; 00155 struct { 00156 union { 00157 unsigned char nisca_b_msg; 00158 unsigned char nisca_b_msg_flags; 00159 }; 00160 unsigned char nisca_b_reason; 00161 unsigned long nisca_l_maint; 00162 unsigned char nisca_b_minor; 00163 unsigned char nisca_b_major; 00164 unsigned short nisca_w_eco; 00165 char nisca_t_nodename[8]; 00166 union { 00167 unsigned long nisca_l_port_fcn; 00168 unsigned long nisca_l_fcn_bitmasks; 00169 }; 00170 unsigned long nisca_l_sta_info; 00171 union { 00172 unsigned long nisca_l_sta_info; 00173 struct { 00174 char fill; 00175 unsigned m : 1; 00176 unsigned ps: 2; 00177 unsigned sys_state:21; 00178 }; 00179 }; 00180 char nisca_t_rst_port[6]; 00181 unsigned char nisca_b_reserved0; 00182 unsigned char nisca_b_pipe_quota; 00183 unsigned short nisca_w_p_srv; 00184 unsigned short nisca_w_r_srv; 00185 unsigned long long nisca_q_authorize; 00186 char nisca_t_service[16]; /* obsolete? */ 00187 unsigned short nisca_w_lcl_chan_seq_num; 00188 unsigned short nisca_w_buf_buffer_size; 00189 unsigned long long nisca_q_transmit_time; 00190 unsigned char nisca_ab_device_name[16]; 00191 unsigned char nisca_ab_lan_hw_addr[6]; 00192 unsigned char nisca_b_device_type; 00193 unsigned char nisca_b_node_hw_type; 00194 }; 00195 struct { 00196 unsigned srv_xchk:1; 00197 unsigned srv_rchk:1; 00198 }; 00199 struct { 00200 unsigned char nisca_b_tr_flag; 00201 unsigned char nisca_b_tr_pad; 00202 unsigned short nisca_w_tr_ack; 00203 unsigned short nisca_w_tr_seq; 00204 unsigned short nisca_w_rmt_chan_seq_num; 00205 unsigned char nisca_b_tr_pad_data_len; 00206 }; 00207 struct { 00208 unsigned char nisca_b_ppc_opc; 00209 }; 00210 }; 00211 }; 00212 00213 #endif 00214