home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
ibmtool.zip
/
itest.c
< prev
next >
Wrap
Text File
|
1997-11-07
|
6KB
|
118 lines
#define INCL_SUB
#define INCL_BASE
#define INCL_DOS
#include <os2.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "ndis.h"
#include "ioctl.h"
#include "ibmtool.h"
#include "intrface.h"
extern int CurrMenuOpt;
extern char far *VendorDesc;
extern COMMONCHAR MACMCC;
extern SERVICESTAT MACMSS;
extern SERVICECHAR MACMSC;
extern UPPERDISP MACMUD;
extern PROTLWRDISP PROTLD;
extern MCASTBUF MACMCBuff;
BOOLEAN Test = FALSE;
void SetTestMACTables ()
{
MACMCC.CcSize = sizeof (MACMCC); // WORD Table size
MACMCC.CcNDISMjrVer = 2; // BYTE Major NDIS Version
MACMCC.CcNDISMnrVer = 0; // BYTE Minor NDIS Version
MACMCC.CcSpLvl = 1; // WORD Level of spec tables
MACMCC.CcMjrVer = 1; // BYTE Module Major version number
MACMCC.CcMnrVer = 0; // BYTE Module Minor version number
MACMCC.CcBindFnc = 3; // DWORD "Hints" on binding support
strcpy (MACMCC.CcName, "TESTMAC"); // BYTE Module name
MACMCC.CcUPLevel = 1; // BYTE Upper protocol level
MACMCC.CcUIType = 1; // BYTE Upper interface type
MACMCC.CcLPLevel = 0; // BYTE Lower protocol level
MACMCC.CcLIType = 0; // BYTE Lower interface type
MACMCC.CcModuleID = 5; // WORD Module ID (supplied by PM)
MACMCC.CcDataSeg = 0x1234; // WORD Module Data Segment
MACMCC.CcSysReq = NULL; // far *
MACMCC.CcSCp = NULL; // far * specific characteristics
MACMCC.CcSSp = NULL; // far * specific status
MACMCC.CcUDp = NULL; // far * upper dispatch table
MACMCC.CcLDp = NULL; // far * lower dispatch table
MACMSC.MscSize = sizeof (MACMSC); // WORD Table size
strcpy (MACMSC.MscType, "802.5"); // BYTE MAC type name
WedgeCommon->StnAdrSz =
MACMSC.MscStnAdrSz = 6; // WORD Station address length
MACMSC.MscPermStnAdr[0] = 0x01; // BYTE Permanent station address
MACMSC.MscPermStnAdr[1] = 0x02; // BYTE Permanent station address
MACMSC.MscPermStnAdr[2] = 0x03; // BYTE Permanent station address
MACMSC.MscPermStnAdr[3] = 0x04; // BYTE Permanent station address
MACMSC.MscPermStnAdr[4] = 0x05; // BYTE Permanent station address
MACMSC.MscPermStnAdr[5] = 0x06; // BYTE Permanent station address
MACMSC.MscCurrStnAdr[0] = 0x01; // BYTE Current station address
MACMSC.MscCurrStnAdr[1] = 0x02; // BYTE Current station address
MACMSC.MscCurrStnAdr[2] = 0x03; // BYTE Current station address
MACMSC.MscCurrStnAdr[3] = 0x04; // BYTE Current station address
MACMSC.MscCurrStnAdr[4] = 0x05; // BYTE Current station address
MACMSC.MscCurrStnAdr[5] = 0x06; // BYTE Current station address
MACMSC.MscCurrFncAdr = 0x11223344;
// DWORD Current functional address
MACMSC.MscMCp = NULL; // struct MCastBuf far * multicast buffer
MACMSC.MscLinkSpd = 4000000; // DWORD Link speed (bits/sec)
MACMSC.MscService = 0; // DWORD Services supported flags
MACMSC.MscMaxFrame = 2000; // WORD Maximum frame size
MACMSC.MscTBufCap = 1024; // DWORD Transmit buffer capacity
MACMSC.MscTBlkSz = 256; // WORD Transmit buf alloc block size
MACMSC.MscRBufCap = 1024; // DWORD Receive buffer capacity
MACMSC.MscRBlkSz = 256; // WORD Receive buf alloc block size
MACMSC.MscVenCode[0] = 0x01; // BYTE Vendor code
MACMSC.MscVenCode[1] = 0x02; // BYTE Vendor code
MACMSC.MscVenCode[2] = 0x03; // BYTE Vendor code
MACMSC.MscVenAdapter = 0x0F; // BYTE Vendor adapter code
MACMSC.MscVenAdaptDesc = VendorDesc;
// BYTE far * vendor adapter desc
MACMSC.MscInterrupt = 3; // WORD Interrupt level used
MACMSC.MscTxQDepth = 16; // WORD Transmit Queue Depth
MACMSC.MscMaxDataBlocks = 8; // WORD Max buff descriptor data blocks
MACMSS.MssSize = sizeof (MACMSS); // WORD Table size
MACMSS.MssDiagDT = 123456L; // DWORD Last diagnostic Date/Time
MACMSS.MssStatus = MS_BOUND | MS_OPEN;
// DWORD MAC status - bit mask
MACMSS.MssFilter = 3; // WORD Current packet filter
MACMSS.MssM8Sp = NULL; // void far * to Media specific status
MACMSS.MssClearDT = 123456L; // DWORD Last clear stats Date/Time
MACMSS.MssFR = 123456L; // DWORD Frames received: total
MACMSS.MssRFCRC = 123456L; // DWORD Receive fail: CRC error
MACMSS.MssFRByt = 123456L; // DWORD Frames received: total bytes
MACMSS.MssRFLack = 123456L; // DWORD Receive fail: lack of buffers
MACMSS.MssFRMC = 123456L; // DWORD Frames received: multicast
MACMSS.MssFRBC = 123456L; // DWORD Frames received: broadcast
MACMSS.MssRFErr = 123456L; // DWORD rcv fail: errors in general
MACMSS.MssRFMax = 123456L; // DWORD rcv fail: exceeds max size
MACMSS.MssRFMin = 123456L; // DWORD rcv fail: less than min size
MACMSS.MssFRMCByt = 123456L; // DWORD Frames rcvd: multicast bytes
MACMSS.MssFRBCByt = 123456L; // DWORD Frames rcvd: broadcast bytes
MACMSS.MssRFHW = 123456L; // DWORD rcv fail: hardware error
MACMSS.MssFS = 123456L; // DWORD Frames sent: total
MACMSS.MssFSByt = 123456L; // DWORD Frames sent: total bytes
MACMSS.MssFSMC = 123456L; // DWORD Frames sent: multicast
MACMSS.MssFSBC = 123456L; // DWORD Frames sent: broadcast
MACMSS.MssFSBCByt = 123456L; // DWORD Frames sent: broadcast bytes
MACMSS.MssFSMCByt = 123456L; // DWORD Frames sent: multicast bytes
MACMSS.MssSFTime = 123456L; // DWORD Send fail: time-out
MACMSS.MssSFHW = 123456L; // DWORD Send fail: hardware error
MACMCBuff.McbMax = 10;
MACMCBuff.McbCnt = 0;
}