/*++ 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 --*/ #include #include #include #include #include #include // 1234567890123456 #define SPACES " " #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 #define XNS 1 int Limit = 20; VOID usage ( VOID ) { printf("usage: tnetbl [-n:lan number][-h] \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(" final two arguments are the remote and local computer names.\n"); } int main (argc, argv) int argc; char *argv[]; { NCB myncb; 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; UCHAR lsn; UCHAR name_number; USHORT length; if ( argc < 3 || argc > 5) { 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