home *** CD-ROM | disk | FTP | other *** search
- ---------------------------------------------------------------------
- NETBIOS LANOS NETBIOS LANOS NETBIOS LANOS NETBIOS LANOS NETBIOS LANOS
- ---------------------------------------------------------------------
-
- Date : 01-04-1992 Time : 05:00pm
-
- This is the DOC-file for the LANOS-Unit and the NCB-Unit (Version 1.0).
- It's a short documentation because I had no time to write a whole manual.
-
- All the units are written in Borlands Turbo-Pascal 6.0 !!!
-
- What does LANOS do ?
- ====================
-
- LANOS includes all the standard MS-DOS compatible network-functions such
- as REDIRECT A DEVICE, GET REDIRECTED DEVICE, etc.
-
- But this is not all !
-
- The other part is LANTASTIC specific. I have implemented all these functions,
- which you find in LANTASTIC NOS (up to version 4.0).
-
- What you must know:
-
- Each NOS call returns an error status. This error status is updated after
- each call in the global variable NOSErrNo. You can then get the error message
- by using the
-
- function NOSGetErrorText(tWord : Word).
-
- But it's not necessary ! I did the job for you. There is a global variable
- called NOS_Message (type string) which contains the error message when the
- carry-flag was set after calling NOS.
-
- In the interface part you can see that each call is a PROCEDURE and not a
- FUNCTION. So very often you have calls by reference and not calls by value.
- That's because some of the NOS-calls return or update values by themselves
- (e.g. incrementing index in BX register).
-
- ------------------------------------------------------------------------------
-
- What does NCB do ?
- ==================
-
- NCB is a unit for supporting the NETBIOS-Interface using the INT 5Ch.
- NETBIOS is a great interface if you know how to handle it. In the interface
- part you can see the structure of a network control block (NCB).
-
- It's the key to everything !
-
- I implemented the basic functions you need to communicate using the NETBIOS.
-
- How to establish a NETBIOS-Session:
-
- 1. ADD_NAME
-
- Add your (local) and the remote-name to the network.
- remote-name (NCB_callname) can accept wildcards.
-
- e.g. NCB_Result := NCB_ADD_NAME(Send_NCB,'LOCAL','*');
-
- that is important when building a multiuser-session or
- things like this. (see line 24/26 in NCBTEST.PAS)
-
- 2. RECV_DATAGRAM or RECV_BCST_DATAGRAM (when you receive a datagram)
- SEND_DATAGRAM or SEND_BCST_DATAGRAM (when you send a datagram)
-
- You do this as shown in line 48 in NCBTEST.PAS. The function will wait
- until a datagram is received or a timeout occurs.
-
- What is a DATAGRAM ? It is a part of your computer's memory.
- You can transfer everything. In the DEMO-program I'm transfering a
- string (includes also the length of the string ; first byte).
-
- But, as an example, you may also transfer a record. What you must do is
- get the records segment and offset. Length will be determined by the
- following statement:
-
- SizeOf(record);
-
- 3. HANG_UP
-
- I'm not certain if this is necessary because I have found many different
- examples during my research.
-
- But I used it on line 62 in the DEMO-program.
-
- 4. DELETE_NAME
-
- Closes the network-session and releases the allocated network-names.
-
- ---------------------------------------------------------------------------
-
- The function NCB_EXECUTE is used to execute any NETBIOS call. You
- must tell the function which command you want to execute.
-
- (NCBWAIT variable has no effect in this function ! Add 80h to
- the command for ASYNC mode)
-
-
- WARNING !!! WARNING !!
-
- I have declared a global variable NCBWAIT (type boolean; def: TRUE).
- When this variable is set to FALSE then the NCB_Command is incremented
- by 80h before each call. That means ASYNC-Mode !
-
- Exception: NCB_EXECUTE(Command : Word; VAR tNCB);
-
- Therefore the called NETBIOS-function does not wait until a datagram is
- received ! It's up to you to loop until there is something useful.
-
- But when a datagram is received, NETBIOS will call an interrupt which
- you must define by calling the function.
-
- NCB_RECV_DATAGRAM(VAR tNCB : _NCB;BUFSeg,BUFOfs,BUFLen : Word;UsrProc : Pointer)
- |
- address of user-procedure ------+
-
- Make sure that the address points to a useful procedure when working
- in ASYNC mode (NCBWAIT is FALSE) otherwise the system hangs up !!!!
-
-
-
- How you can reach me:
- =====================
-
-
- There are two EMAIL-addresses where you can reach me:
- (thats in EUROPE)
-
- +--------------------------------------------+
- | CompuServe ID : 100016,732 |
- | X.400 : CZ8OR@ZCVX00.ascom.ch |
- +--------------------------------------------+
-
- I normally check these mailboxes frequently.
-
-
- Private address :
-
- Name : Oliver Rehmann
- Street : Dorfhalde 7
-
- ZIP/City : 8712 Staefa
-
- SWITZERLAND
-
- COMMENT
- =======
-
- I have decided to give LANOS and NCB as public domain to the rest of the
- world. There is therefore no need to register it. Nevertheless I'll be
- happy about any appreciation. Everyone who likes the programs and wants to
- reward the work and time spent to develop the programs can do this by
- sending a modest contribution. To those of you sending $ 40 (includes
- shipping by air) in cash or by check and provide me with their mail-address,
- together with the type of disk and current version in use, I will send
- the latest version, including the source-code of the units.
-
- Of course, there are no limits of appreciation :-) But I'll be happy also
- about any smaller appreciation and I think that this could advance the
- development of this software.
-
- The units are public domain and you may provide a copy to your friends, as
- long as the whole package is in its original form and the program leaves
- unchanged.
-
-
-