home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / nics / root.2 / usr / include / sys / msmstruc.h / msmstruc
Text File  |  1998-08-19  |  5KB  |  186 lines

  1. /*
  2.  * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3.  *                                                                         
  4.  *        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5.  *                   SANTA CRUZ OPERATION INC.                             
  6.  *                                                                         
  7.  *   The copyright notice above does not evidence any actual or intended   
  8.  *   publication of such source code.                                      
  9.  */
  10.  
  11. #ifndef    _IO_MSM_MSMSTRUC_H_
  12. #define    _IO_MSM_MSMSTRUC_H_
  13.  
  14. #ident    "@(#)msmstruc.h    2.1"
  15. #ident    "$Header: $"
  16.  
  17. #ifdef  _KERNEL_HEADERS
  18.  
  19. #include <io/odi/msm/msm.h>
  20.  
  21. #elif defined(_KERNEL)
  22.  
  23. #include <sys/msm.h>
  24.  
  25. #endif
  26.  
  27. #define GET_HI_LO(x)                        \
  28.     ((UINT16)(x) << 8) | (UINT16)((x) >> 8)
  29.  
  30. #define BYTE_MOVE(Dest, Source)                    \
  31.     (UINT8)*Dest = (UINT8)*Source
  32.  
  33. #define WORD_MOVE(Dest, Source)                    \
  34.     *(PUINT16)Dest = *(PUINT16)Source
  35.  
  36. #define DWORD_MOVE(Dest, Source)                \
  37.     *(PUINT32)Dest = *(PUINT32)Source
  38.  
  39. #define CMPADDRESS(a1, a2)                    \
  40.     ((*(PUINT32)a1 ^ *(PUINT32)a2)    \
  41.     || (((PUINT16)(a1))[2] ^ ((PUINT16)(a2))[2]))
  42.  
  43. #define RESERVED        0
  44.  
  45. typedef struct _MSM_IOCTL_TIMEOUT_ARGS_ {
  46.     struct _MSM_IOCTL_TIMEOUT_ARGS_    *nextlink;
  47.     ECB                *asyncECB;
  48.     UINT32                ioctl;
  49.     UINT32                brdnum;
  50.     UINT32                cookie;
  51.     UINT32                parm1;
  52.     UINT32                parm2;
  53.     UINT32                parm3;
  54. } MSM_IOCTL_TIMEOUT_ARGS;
  55.  
  56. /*
  57.  * definitions for Custom Keyword Types.
  58.  */
  59. #define    T_REQUIRED        0x8000    /* Keyword must be entered. */
  60. #define    T_STRING        0x0100    /* String input(default). */
  61. #define    T_NUMBER        0x0200    /* Dword Decimal input. */
  62. #define    T_HEX_NUMBER        0x0300    /* Dword Hex input. */
  63. #define    T_HEX_STRING        0x0400    /* 6-byte hex string input. */
  64. #define    T_LENGTH_MASK        0x00FF    /* Length Mask */
  65. #define T_TYPE_MASK             0xFF00  /* Type Mask. */
  66.  
  67. typedef    struct _ADAPTER_DATA_ {
  68.     struct _ADAPTER_DATA_        *InstanceLink;
  69.     DRIVER_PARM_BLOCK        DPBlock;
  70.     TSM_PARM_BLOCK            MPBlock;
  71.  
  72.     /*
  73.      * the following ECBs are here for asyncronous call back of IOCTLs.
  74.      */
  75.     ECB                         *GetStatsECB;
  76.     ECB                         *ShutDownECB;
  77.     ECB                         *ResetECB;
  78.     ECB                         *MulticastECB;
  79.     ECB                         *PromiscuousECB;
  80.     ECB                         *LookAheadSizeECB;
  81.  
  82.     struct _RTAG_HANDLE_        *AllocRTag;
  83.     struct _RTAG_HANDLE_        *Below16MegRTag;
  84.     struct _RTAG_HANDLE_        *ECBRTag;
  85.     UINT32                      RxBelow16;
  86.     void                        *ECBBufferPool;
  87.     void                        *ECBBufferIndex;
  88.     void                        *MaxECBAddress;
  89.  
  90. #ifdef   IAPX386
  91.     MLID_AES_ECB            MlidIntAES;
  92.     MLID_AES_ECB            MlidAES;
  93.     UINT32                HSMInC;
  94. #endif
  95.  
  96.     struct _ADAPTER_DATA_       *PollingLink;
  97.     UINT32                      UnBindOnRemove;
  98.     UINT32                      MaxTxFreeCount;
  99.     ECB                         *TxECBList;
  100.     ECB                         *TxECBHead;
  101.     MLID_AES_ECB                *AESList;
  102.     EXTRA_CONFIG                *ExtraConfigList;
  103.     void                        (* DriverIntReschedule)
  104.                     (struct _DRIVER_DATA_ *driverData);
  105. #ifdef UNIXWARE
  106.     UINT32                AdapterMatchValue;
  107.     UINT32                InterruptCookie0;
  108.     UINT32                InterruptCookie1;
  109.     clock_t                isrtime;
  110.     MSM_IOCTL_TIMEOUT_ARGS        *ioctltimeouts;
  111.     int                initmemtype;
  112.     int                initmemsrc;
  113. #endif
  114.     /*
  115.      * the following variables will be accessed by TSM's and HSM's and
  116.      * must remain in the following order.
  117.      */
  118. #ifdef IAPX386
  119.     UINT32                      ReservedForCHSM[18];
  120.     UINT32                      AsmHSMUpdate;
  121.     MSTATS                      *AsmStatsPtr;
  122. #else
  123.     UINT32                      ReservedForCHSM[20];
  124. #endif
  125.     DRIVER_PARM_BLOCK           *AsmParmBlock;
  126.     UINT32                      AdapterIntDisabled; 
  127.  
  128.     UINT32                      NeedContiguousECB;
  129.     GENERIC_STATS               *GenericStatsPtr;
  130. #ifdef NETWARE
  131.     void                        *AdapterSpinLock;
  132. #elif defined (UNIXWARE)
  133.     MSM_PROTECTION_OBJ        *ProtectionObject;
  134. #endif
  135.     UINT32                      MaxFrameHeaderSize;
  136.     UINT8                       PhysNodeAddress[ADDR_SIZE];
  137.     UINT8                       PhysNodeFill[2];
  138.     void                        *SendListHead;
  139.     void                        *SendListTail;
  140.     DRIVER_PARM_BLOCK           *DPBlockPtr;
  141.     void                        *MediaDataPtr;
  142.     CONFIG_TABLE                *DefaultVirtualBoard;
  143.     UINT32                      DriverInterrupt;
  144.     UINT32                      InCriticalSection;
  145.     MLID_StatsTable             *StatsPtr;
  146.     CONFIG_TABLE                *VirtualBoardLink[4];
  147.     UINT32                      StatusFlags;
  148.     UINT32                      TxFreeCount;
  149. } ADAPTER_DATA;
  150.  
  151. /*
  152.  * fake type definition to keep .h files happy. _DRIVER_DATA_ is
  153.  * defined in the HSM and not accessed directly by the MSM or TSM.
  154.  */
  155. typedef struct _DRIVER_DATA_ {
  156.         void    *FakeData;
  157. } DRIVER_DATA;
  158.  
  159. typedef struct _MODULE_HANDLE_ {
  160.         void    *FakeData;
  161. } MODULE_HANDLE;
  162.  
  163. /*
  164.  * this is a template to put over the top of an C DRIVER_PARM_BLOCK
  165.  * at the DPB_Reserved1 field. This makes easy access to the ASM fields.
  166.  */
  167. typedef struct _ASM_DRIVER_KEWYORD_STRUCT_ {
  168.     UINT32                DriverNumKeywords;
  169.     MEON                        **DriverKeywordText;
  170.     UINT32                      *DriverKeywordTextLen;
  171.     UINT32                      (_cdecl ** DriverProcesskeywordTab)(
  172.                     CONFIG_TABLE *configTable, PMEON
  173.                     string, UINT32 value);
  174. } ASM_DRIVER_KEYWORD_STRUCT;
  175.  
  176. #define MSM_HIERPOLL        18
  177. #define MSM_HIERADAPTER        24
  178.  
  179. #define    MSM_PHYS_LOGICAL_ADDR    0x1000000
  180.  
  181. #define    MAXINTVEC        256
  182. #define    INTSHARED        0x00001
  183. #define    INTALLOCED        0x00002
  184.  
  185. #endif    /* _IO_MSM_MSMSTRUC_H_ */
  186.