/*++ Copyright (c) 1991 Microsoft Corporation Module Name: tnetbios.c Abstract: This module contains code which exercises the NetBIOS dll and driver. Author: Colin Watson (ColinW) 13-Mar-1991 Environment: Application mode Revision History: Dave Beaver (DBeaver) 10 August 1991 Modify to support multiple LAN numbers Jerome Nantel (w-jeromn) 23 August 1991 Add Event Signaling testing --*/ #include #include #include #define WIN32_CONSOLE_APP #include #include #include // 1234567890123456 #define SPACES " " #define TIMEOUT 60000 // Time out for wait, set at 1 minute #define Hi "Come here Dave, I need you" #define ClearNcb( PNCB ) { \ RtlZeroMemory( PNCB , sizeof (NCB) ); \ RtlMoveMemory( (PNCB)->ncb_name, SPACES, sizeof(SPACES)-1 );\ RtlMoveMemory( (PNCB)->ncb_callname, SPACES, sizeof(SPACES)-1 );\ } // Hard code lana-num that is mapped to XNS int Limit = 20; VOID usage ( VOID ) { printf("usage: tnetbios [-n:lan number][-h][-e] \n"); printf(" -n specifies the lan number (0 is the default)\n"); printf(" -h specifies that addresses are hexadecimal numbers \n"); printf(" rather than strings.\n"); printf(" -e test event signaling for ASYNC calls. \n"); printf(" final two arguments are the remote and local computer names.\n"); } int main (argc, argv) int argc; char *argv[]; { NCB myncb; CHAR Buffer[128]; CHAR Buffer2[128]; int i,j; CHAR localName[16]; CHAR remoteName[16]; CHAR localTemp[32]; CHAR remoteTemp[32]; ULONG lanNumber=0; BOOLEAN gotFirst=FALSE; BOOLEAN asHex=FALSE; BOOLEAN tevent=FALSE; UCHAR lsn; UCHAR name_number; HANDLE event; if ( argc < 3 || argc > 6) { usage (); return 1; } // // dbeaver: added switch to allow 32 byte hex string as name to facilitate // testing under unusual circumstances // for (j=1;j<16;j++ ) { localTemp[j] = ' '; remoteTemp[j] = ' '; } // // parse the switches // for (i=1;i