⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sicl.h

📁 这个是无线网卡WirelessLAN 测试程序NDIS
💻 H
📖 第 1 页 / 共 3 页
字号:
#define I_MSIB_CMD_SET_IEEE_ADDRESS     0x0700

/*
 * imap 'mapspace' values
 */
#define I_MAP_A16     0x0000
#define I_MAP_A24     0x0001
#define I_MAP_A32     0x0002
#define I_MAP_VXIDEV  0x0003
#define I_MAP_EXTEND  0x0004
#define I_MAP_INTFREG 0x0005
#define I_MAP_SHARED  0x0006
#define I_MAP_AM      0x8000
/*
 *  For E1489 MXI
 */
#define I_MAP_A16_L             0x0007
#define I_MAP_A16_D32           I_MAP_A16_L  
#define I_MAP_A24_L             0x0008
#define I_MAP_A24_D32           I_MAP_A24_L  
#define I_MAP_A24_BLK           0x0009
#define I_MAP_A24_BLK_L         0x000a
#define I_MAP_A32_L             0x000b
#define I_MAP_A32_D32           I_MAP_A32_L  
#define I_MAP_A32_BLK           0x000c
#define I_MAP_A32_BLK_L         0x000d
#define I_MAP_A16_SM            0x000e  /* MXI supervisory mode access */
#define I_MAP_A24_SM            0x000f  /* MXI supervisory mode access */
#define I_MAP_A32_SM            0x0010  /* MXI supervisory mode access */
#define I_MAP_A16_SM_L          0x0011  /* MXI SM D32 */
#define I_MAP_A16_SM_D32        I_MAP_A16_SM_L
#define I_MAP_A24_SM_L          0x0012  /* MXI SM D32 */
#define I_MAP_A24_SM_D32        I_MAP_A24_SM_L
#define I_MAP_A32_SM_L          0x0013  /* MXI SM D32 */
#define I_MAP_A32_SM_D32        I_MAP_A32_SM_L

/*
 * Protocols
 */
#define I_PROTOCOL_1394_IICP488		1
#define I_PROTOCOL_USB_SCPI		2

/*
 * Error Codes
 */
#define I_ERR_NOERROR        0
#define I_ERR_SYNTAX         1
#define I_ERR_SYMNAME        2
#define I_ERR_BADADDR        3
#define I_ERR_BADID          4
#define I_ERR_PARAM          5
#define I_ERR_NOCONN         6
#define I_ERR_NOPERM         7
#define I_ERR_NOTSUPP        8
#define I_ERR_NORSRC         9
#define I_ERR_NOINTF        10
#define I_ERR_LOCKED        11
#define I_ERR_NOLOCK        12
#define I_ERR_BADFMT        13
#define I_ERR_DATA          14
#define I_ERR_TIMEOUT       15
#define I_ERR_OVERFLOW      16
#define I_ERR_IO            17
#define I_ERR_OS            18
#define I_ERR_BADMAP        19
#define I_ERR_NODEV         20
#define I_ERR_INVLADDR      21
#define I_ERR_NOTIMPL       22
#define I_ERR_ABORTED       23
#define I_ERR_BADCONFIG     24
#define  I_ERR_NOCMDR       25
#define I_ERR_VERSION       26
#define I_ERR_NESTEDIO      27
#define I_ERR_BUSY          28
#define I_ERR_BADREMADDR	 32
#if !defined(STD_SICL)
#define I_ERR_CONNEXISTS    29
#define I_ERR_BUSERR        30
#define I_ERR_BUSERR_RETRY  31
#define I_ERR_INTERNAL     128
#define I_ERR_INTERRUPT    129
#define I_ERR_UNKNOWNERR   130
#define I_ERR_NOTLISTENER  131
#define I_ERR_NOTTALKER    132
#endif

/*
 * These are the buffer sizes for formatted I/O.  These will become
 * a part of standard sicl.
 * NOTE:  These numbers are tuned for HP-UX performance.
 */
#define I_READ_BUF_SZ       4096
#define I_WRITE_BUF_SZ       128

#define I_BUF_READ          0x01
#define I_BUF_WRITE         0x02
#define I_BUF_DISCARD_READ  0x04
#define I_BUF_DISCARD_WRITE 0x08
#define I_BUF_WRITE_END     0x10

   /*
    * LU info structure
    * Only some of these fields are documented in SICL, others are
    * documented in TULIP.
    */
   typedef struct lu_info {
      long logical_unit;   /* Documented:  SICL/TULIP (hwconfig.cf) */
      char symname[32];    /* Documented:  SICL/TULIP (hwconfig.cf) */
      char cardname[32];   /* Documented:  SICL/TULIP (xxx_getentry) */
      long filler;      /* Filler - Needed for backward compatability */
      long intftype;    /* Documented:  SICL/TULIP (xxx_getentry) */
      long location;    /* Documented:  TULIP      (hwconfig.cf) */
      long busaddr;     /* Documented:  TULIP      (hwconfig.cf) */
      char _far * hwarg[16];  /* Documented: TULIP    (hwconfig.cf) */
      char visaname[32];        /* interface name used for VISA */   
      long filler2[4];     /* Filler - Needed for future expansion  */
   } lu_info;

   /*
    * ivxirminfo structure
    */
   struct vxiinfo {
      /* Device Identification */
      short laddr;      /* Logical Address */
      char name[16];    /* Symbolic Name */
      char manuf_name[16]; /* Manufacturer Name */
      char model_name[16]; /* Model Name */
      unsigned short man_id;  /* Manufacturer ID */
      unsigned short model;   /* Model Code */
      unsigned short devclass;   /* Device Class */
      
      /* Self Test Status */
      short selftest;      /* 1=PASSED, 0=FAILED */
      
      /* Location of Device */
      short cage_num;      /* Cardcage Number */
      short slot;    /* slot number, -1 is unknown, -2 is MXI */
      
      /* Device Information */
      unsigned short protocol;   /* Value of protocol register */
      unsigned short x_protocol;/* Results of Read Protocol WS command */
      unsigned short servant_area;/* Value of servant area */
      
      /* Memory Information */
      /* page size is 256 bytes for A24 and 64K bytes for A32 */
      unsigned short addrspace;  /* 24=A24, 32=A32, 0=none */
      unsigned short memsize; /* Amount of memory in pages */
      unsigned short memstart;   /* Start of memory in pages */
      
      /* Misc. Information */
      short slot0_laddr;   /* LADDR of slot 0 device, -1 if unknown */
      short cmdr_laddr;    /* LADDR of commander, -1 if top level */
      
      /* Interrupt Information */
      short int_handler[8];   /* List of interrupt handlers */
      short interrupter[8];   /* List of interrupters */
      
      short fill[10];      /* Unused */
   };

   /*
    * vxiinfo structure values
    */
#define I_VXI_DEVCLASS_MEMORY    0x0000
#define I_VXI_DEVCLASS_EXTENDED  0x4000
#define I_VXI_DEVCLASS_MSGBASED  0x8000
#define I_VXI_DEVCLASS_REGBASED  0xc000


   typedef struct {
      unsigned short     command;
      unsigned long      mapHandle;
      unsigned long      address;
      unsigned long      parm1;
      unsigned long      parm2;
   } ivximacroelem;

#define I_VXI_MACRO_DELAY          (0x0001)
#define I_VXI_MACRO_POLLSTAT16     (0x0002)
#define I_VXI_MACRO_POKE8          (0x0003)
#define I_VXI_MACRO_POKE16         (0x0004)
#define I_VXI_MACRO_POKE32         (0x0005)
#define I_VXI_MACRO_READMODWRITE16 (0x0006)
#define I_VXI_MACRO_PEEK8          (0x0007)
#define I_VXI_MACRO_PEEK16         (0x0008)
#define I_VXI_MACRO_PEEK32         (0x0009)
#define I_VXI_MACRO_SESSION        (0xfffe)
#define I_VXI_MACRO_END            (0xffff)

   struct msibinfo {
      char capability[127];   /* response to SEND CAPABILITY command */
      char capability_length; /* capability may contain NULL bytes */
      /* the rest are NULL-terminated strings */
      char module_id[128]; /* response to SEND MODULE ID */
      char mfg_id[128];    /* response to SEND MANUFACTURER ID */
      char model_number[128]; /* response to SEND MODEL NUMBER */
      char serial_number[128];   /* response to SEND SERIAL NUMBER */
      char firmware_rev[128]; /* response to SEND FIRMWARE REVISION */
   };

/* Non-Standard SICL Defines */
#if !defined(STD_SICL)
   /* Trace defines */
#define  trace_off   0
#define  trace_user  1
#define  trace_inout 2
#define  trace_action   3
#define  trace_detail   4
#define trace_xdetail   5
   /* Configuration file defines */
   /* Bus types (int bustype): */
#define  I_BUS_INT   0  /* Internal Bus */
#define  I_BUS_ISA   1  /* ISA Bus */
#define  I_BUS_EISA  2  /* EISA Bus */
#define  I_BUS_DIO   3  /* DIO I/II Bus */
#define  I_BUS_VME   4  /* VME Bus */
#define I_BUS_USRLND    5       /* Userland driver */
#define  I_BUS_PCI   6  /* PCI Bus */
   /* Bus types -- USE I_BUS_*, not these!!! (int bustype): */
/*
 * These are also defined in pilconfig.h.  If you change these
 * you MUST also change the matching ones in pilconfig.h.
 */
#if !defined(CFG_BUS_INT)
#define  CFG_BUS_INT I_BUS_INT
#define  CFG_BUS_CORE   I_BUS_INT
#define  CFG_BUS_ISA I_BUS_ISA
#define  CFG_BUS_EISA   I_BUS_EISA
#define  CFG_BUS_DIO I_BUS_DIO
#define  CFG_BUS_VME I_BUS_VME
#define CFG_BUS_USRLND  I_BUS_USRLND
#define  CFG_BUS_PCI I_BUS_PCI
/* Interface types -- USE I_INTF_*, not these!!! (int intftype): */
#define  CFG_INTF_HPIB  I_INTF_GPIB /* GPIB Interface */
#define  CFG_INTF_VXI   I_INTF_VXI  /* VXI Interface */
#define  CFG_INTF_RS232 I_INTF_RS232   /* RS-232 Interface */
#define  CFG_INTF_GPIO  I_INTF_GPIO /* GPIO Interface */
#define  CFG_INTF_DIL   5     /* DIL Interface */
#define CFG_INTF_USRDEF I_INTF_USRDEF   /* User-defined Interface type */
#endif
#endif


#if ! defined(SICL_NOPROTO)

/* See if C++ or not */
#if defined(__cplusplus)
   extern "C" {
#endif

#if defined(__STDC__) || defined(__cplusplus) || defined(_MS_DOS_WIN) || defined (_SICL_WIN32)

/* Version Information */
int SICLAPI iversion(int _far *siclversion,int _far *implversion);
int SICLAPI idrvrversion(INST id,int _far *specversion,int _far *implversion);

/* Open/Close */
INST SICLAPI iopen(char _far *addr);
int SICLAPI iclose(INST id);
INST SICLAPI igetintfsess(INST id);

/* Write/Read */
int SICLAPI iwrite (
   INST id,
   char _far *buf,
   unsigned long datalen,
   int endi,
   unsigned long _far *actual
);
int SICLAPI iread (
   INST id,
   char _far *buf,
   unsigned long bufsize,
   int _far *reason,
   unsigned long _far *actual
);
int SICLAPI itermchr(INST id,int tchr);
int SICLAPI igettermchr(INST id,int _far *tchr);

/* Formatted I/O */
int SICLAPIV iprintf (INST id, const char _far *fmt, ...);
int SICLAPIV ivprintf (INST id, const char _far *fmt, va_list ap);
int SICLAPIV isprintf (char _far *user_buf, const char _far *fmt, ...);
int SICLAPIV isvprintf (char _far *user_buf, const char _far *fmt, va_list ap);

int SICLAPIV iscanf (INST id, const char _far *fmt, ...);
int SICLAPIV ivscanf (INST id, const char _far *fmt, va_list ap);
int SICLAPIV isscanf (char _far *user_buf, const char _far *fmt, ...);
int SICLAPIV isvscanf (char _far *user_buf, const char _far *fmt, va_list ap);

int SICLAPIV ipromptf (
   INST id, 
   const char _far *writefmt, 
   const char _far *readfmt, 
   ...
);
int SICLAPIV ivpromptf (
   INST id, 
   const char _far *writefmt, 
   const char _far *readfmt, 
   va_list ap
);

int SICLAPI ifwrite (
   INST id, 
   char _far *buf, 
   unsigned long datalen, 
   int end, 
   unsigned long _far *actualcnt
);
int SICLAPI ifread (
   INST id, 
   char _far *buf, 
   unsigned long bufsize, 
   int _far *reason, 
   unsigned long _far *actualcnt
);

int SICLAPI iflush (INST id, int mask);
int SICLAPI isetbuf (INST id, int mask, int size);
int SICLAPI isetubuf (INST id, int mask, int size, char _far *buf);

/* Device/Interface Control */
int SICLAPI iclear(INST id);
int SICLAPI iabort(INST id);
int SICLAPI ilocal (INST id);
int SICLAPI iremote (INST id);
int SICLAPI ireadstb(INST id,unsigned char _far *stb);
int SICLAPI itrigger(INST id);
int SICLAPI ixtrig(INST id,unsigned long which);
int SICLAPI ihint(INST id,int hint);

/* Commander Sessions */
int SICLAPI isetstb(INST id, unsigned char stb);

/* Service Requests */
typedef void (SICLCALLBACK *srqhandler_t)(INST);
int SICLAPI ionsrq(INST id,srqhandler_t shdlr);
int SICLAPI igetonsrq(INST id, srqhandler_t _far *shdlr);

/* Interrupts */
typedef void (SICLCALLBACK *intrhandler_t)(INST,long,long);
int SICLAPI ionintr(INST id,intrhandler_t ihdlr);
int SICLAPI igetonintr(INST id, intrhandler_t _far * ihdlr);
int SICLAPI isetintr(INST id,int intnum,long secval);

/* Asynchronous Events Control */
int SICLAPI iintroff(void);
int SICLAPI iintron(void);
int SICLAPI iwaithdlr(long timeout);

/* Locking */
int SICLAPI ilock(INST id);
int SICLAPI iunlock(INST id);
int SICLAPI isetlockwait(INST id,int flag);
int SICLAPI igetlockwait(INST id,int _far *flag);

/* Timeouts */
int SICLAPI itimeout(INST id,long tval);
int SICLAPI igettimeout(INST id,long _far *tval);

/* Misc. Functions */
int SICLAPI igetaddr(INST id,char _far * _far *addr);
int SICLAPI isetdata(INST id,void _far *data);
int SICLAPI igetdata(INST id,void _far * _far *data);
int SICLAPI igetintftype(INST id,int _far *pdata);
int SICLAPI igetsesstype(INST id,int _far *pdata);
int SICLAPI igetdevaddr(INST id,int _far *prim, int _far *sec);
int SICLAPI igetlu(INST id, int _far *lu);
int SICLAPI ibeswap(char _far *addr,unsigned long length,int datasize);
int SICLAPI ileswap(char _far *addr,unsigned long length,int datasize);
int SICLAPI iswap(char _far *addr,unsigned long length,int datasize);
int SICLAPI igetlulist(int _far * _far *list);
int SICLAPI igetluinfo(int lu,struct lu_info _far *result);
int SICLAPI igetgatewaytype(INST id,int _far *pdata);
void SICLAPI siclExplicitlyLoaded();
void SICLAPI ionexitclose();

/* Error Handling */
typedef void (SICLCALLBACK *errorproc_t)(INST,int);
int SICLAPI ionerror(errorproc_t);
int SICLAPI igetonerror(errorproc_t _far *);
void SICLCALLBACK I_ERROR_EXIT(INST,int);
void SICLCALLBACK I_ERROR_NO_EXIT(INST,int);
int SICLAPI igeterrno (void);
char _far * SICLAPI igeterrstr (int);
void SICLAPI icauseerr (INST id, int errcode, int flag);

/* RS-232 specific functions */
int SICLAPI iserialmclctrl (INST id, int sline, int state);
int SICLAPI iserialmclstat (INST id, int sline, int _far *state);
int SICLAPI iserialctrl (INST id, int request, unsigned long setting);
int SICLAPI iserialstat (INST id, int request, unsigned long _far *result);
int SICLAPI iserialbreak (INST id);

/* VXI Specific functions */
   int SICLAPI ivxibusstatus(INST id,int request,unsigned long _far *result);
   int SICLAPI ivxiwaitnormop(INST id);
   int SICLAPI ivxitrigon(INST id,unsigned long which);
   int SICLAPI ivxitrigoff(INST id,unsigned long which);
   int SICLAPI ivxitrigroute(INST id,unsigned long in_which,unsigned long out_which);
   int SICLAPI ivxigettrigroute(INST id,unsigned long which,unsigned long _far *route);
   int SICLAPI ivxiws(INST id,unsigned short wscmd,unsigned short _far *wsresp,unsigned short _far *rpe);
   int SICLAPI ivxiservants(INST id,int maxnum,int _far *list);
   int SICLAPI ivxirminfo(INST id,int laddr, struct vxiinfo _far *info);

#if defined(_MS_DOS_WIN) || defined(_SICL_WIN32)
   int  SICLAPI igetvberrbase (short *);
   int  SICLAPI isetvberrbase (short);
   void SICLAPI ibpoke(unsigned volatile char _far *addr, unsigned char value);
   void SICLAPI iwpoke(unsigned volatile short _far *addr,unsigned short value);
   void SICLAPI ilpoke(unsigned volatile long _far *addr, unsigned long value);
   unsigned char SICLAPI ibpeek(unsigned volatile char _far *addr);
   unsigned short SICLAPI iwpeek(unsigned volatile short _far *addr);
   unsigned long SICLAPI ilpeek(unsigned volatile long _far *addr);
#endif

/* new map/peek/poke/move routines */
   unsigned long SICLAPI imapx(INST id, int mapspace, unsigned int pagestart, unsigned int pagecnt);
   int SICLAPI iunmapx(INST id, unsigned long handle, int mapspace, unsigned int pagestart, unsigned int pagecnt);
   int SICLAPI iderefptr(INST id, unsigned long handle, unsigned char *value);
   int SICLAPI ipeekx8( INST id, unsigned long handle, unsigned long offset, unsigned char  *value);
   int SICLAPI ipeekx16(INST id, unsigned long handle, unsigned long offset, unsigned short *value);
   int SICLAPI ipeekx32(INST id, unsigned long handle, unsigned long offset, unsigned long  *value);
   int SICLAPI ipokex8( INST id, unsigned long handle, unsigned long offset, unsigned char  value);
   int SICLAPI ipokex16(INST id, unsigned long handle, unsigned long offset, unsigned short value);
   int SICLAPI ipokex32(INST id, unsigned long handle, unsigned long offset, unsigned long  value);
#if defined (_SICL_VXI_D64)
   int SICLAPI ipeekx64(INST id, unsigned long handle, unsigned long offset, unsigned __int64 *value);
   int SICLAPI ipokex64(INST id, unsigned long handle, unsigned long offset, unsigned __int64 value);
#endif
   int SICLAPI iblockmovex(INST id,
                      unsigned long src_handle,
                      unsigned long src_offset,
                      int           src_width,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -