home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
lan1
/
tech.lzh
/
TECH.DOC
Wrap
Text File
|
1990-06-13
|
49KB
|
1,541 lines
LANtastic (tm) Network Operating System
Technical Reference Manual
=================================================
Introduction
************
This manual is intended for programer who wish to make use of the
network services of the LANtastic Network Operating System (LANOS).
LANOS services described in this manual are for version 3.00 or above.
LANOS services fall into two catagories: Standard MS-DOS compatible
network functions and Extended network functions. Since LANOS runs
on any NETBIOS compatible LAN, NETBIOS functions are also available
although they are intrisic to the underlying NETBIOS implementation.
This manual assumes that the reader is familiar with 8088/8xx6
assembly language and DOS system functions. Since the standard
MS-DOS compatible network functions are described in the DOS
technical reference manual, we will not go into great detail in this
manual.
Throughout this manual references will be made to network paths.
LANOS network paths are fully compatibly with MS-DOS network paths.
Network paths are similar to file paths except that they reference
files through the network. The general syntax for network path is
\\server-name\path-name
where
server-name is 1 to 15 character name of a network file server
path-name is a DOS path on the server
For example,
\\MAIN-MACHINE\PROGS\DATA\FROG.TXT
refers to a file located on server MAIN-MACHINE. The path required
to access the file is PROGS\DATA\FROG.TXT. The directory PROGS is a
shared network directory and may not actually exist on the server. It
may in fact be an entire disk.
MS-NET compatible networks (e.g. IBM-PC LAN) do not fully support
full paths for all systems calls (in particular Find FIrst). LANOS,
however, supports full paths for all system calls that can take a
path argument. This means that many public domain directory
utilities will operate with a network path. Refer to the "Other
useful system calls" section for example uses of find-first/next.
Indirect Files
**************
As of version 3.00 of LANOS, a new type of file has been created for
use on the network. This file type, know as an indirect file,
resides on a server and is accessable to all users with the 'I' ACL
privilege. An indirect file contains server relative path
information that is expanded in place of the file's name when a path
is parsed by the server. In other words, an indirect file points to
another file or directory. Whenever you refer to the indirect file,
its name is replaced by the file or directry it refers to.
The folowing examples illustrate the operation of indirect files.
Given the following indirect files
Indirect file Contents
------------------- ---------------------
\ROOT\A \ROOT\AUTOEXEC.BAT
\MISC\C \ROOT\CONFIG.SYS
\ROOT\SOURCES\WIN.H ..\INCLUDE\WINDOW.H
\ROOT\DOC \MISC\MANUALS\NEW\DOC
Some sample path expansions would be
Path Expansion
-------------------- --------------------------------
\ROOT\A \ROOT\AUTOEXEC.BAT
\MISC\C \ROOT\CONFIG.SYS
\ROOT\SOURCES\WIN.H \ROOT\INCLUDE\WINDOW.H
\ROOT\DOC\INTRO \MISC\MANUALS\NEW\DOC\INTRO
\ROOT\DOC\CHAPTERS\1 \MISC\MANUALS\NEW\DOC\CHAPTERS\1
As you can see from the above examples, indirect files can be used to
point to other files or directories. The advantage of indirect files
is that the actual files or directories that they point to can reside
on one area while multiple indirect file can reference them with a
variety of names while residing in another directory.
Since the concept of indirect files does not exists under DOS.
Indirect files are not available directly from DOS. To use indirect
files you must reference them through the network.
System calls that are useful for the manipulation of indirect files
are
5FB3H Translate path
5FB4H Create indirect file
5FB5H Get indirect file contents
Error Codes
***********
All MS-DOS compatible system calls and all LANOS specific system calls
return error codes. The error code number is always returned in AX.
When an error occurs the carry flag (CY) is set. LANOS provides a
mechanism for expanding the error code number into a text string. The
following is a list of error codes which may be returned by LANOS:
Error
Number Meaning
------ -------
01H Invalid function number
02H File not found
03H Path not found
04H File open limit has been exceeded or no handles left
05H Access denied
06H Invalid handle
07H Memory control blocks destroyed
08H The memory limit has been exceeded
09H Invalid memory block address
0AH Invalid environment
0BH Invalid format
0CH Invalid access code
0DH Invalid data
0EH RESERVED
0FH Invalid drive was specified
10H Attempt to remove current directory
11H Not same device
12H No more files
13H Attempt to write on write protected disk
14H Unknown unit
15H Drive not ready
16H Unknown command
17H Data CRC error
18H Bad req stuc length
19H Seek error
1AH Unknown media
1BH Sector not found
1CH No paper
1DH Write fault
1EH Read fault
1FH General failure
20H Sharing violation
21H Lock violation
22H Invalid disk change
23H FCB unavailable
24H Sharing buffer overflow
25H RESERVED
26H Cannot complete file operation
27H-31H RESERVED
32H Network request not supported
33H Network node ??????????????? is not listening
34H The name already exists on the network
35H Cannot locate network name
36H The network is busy
37H Server connection to network node ??????????????? broken
38H The NETBIOS command limit has been exceeded
39H The network adapter has malfunctioned
3AH Incorrect response received from network node ???????????????
3BH Unexpected network error from network node ???????????????
3CH Incompatible network node ???????????????
3DH Print queue full on network node ???????????????
3EH No room for print file on network node ???????????????
3FH The print file has been deleted on network node ???????????????
40H The network name has been deleted
41H You have been denied access on network node ???????????????
42H Invalid network device
43H The network name was not found
44H The network name limit has been exceeded
45H The session limit has been exceeded
46H Network node ? has been temporarily paused
47H The network request to network node ? was denied
48H Print or disk redirection is paused on network node ???????????????
49H Invalid network version
4AH Account has expired
4BH Password has expired
4CH Login attempt invalid at this time
4DH Disk limit has been exceeded on network node ???????????????
4EH Not logged in to network node ???????????????
4FH RESERVED
50H The file already exists
51H RESERVED
52H Cannot make directory entry
53H Failure on critical error
54H Too many redirections or logins to network node ???????????????
55H Duplicate redirection or login to network node ???????????????
56H Invalid username or password
57H Invalid parameter
58H Network data fault
59H Function not supported on network
5AH Required system component not installed
When you expand the error code into a text string the above question
marks are expanded to the name of the node you were refering to. To
expand an error code into a text string you will need to issue a
multiplex interrupt (2FH). The calling sequence is
INPUT AH 5
AL 0 For installation check
# for error code (in pre DOS 4.00)
1 or 2 for error code in DOS 4.00
BX in Error code
OUTPUT FLAGS NC if error code converted to text
CY is error code can't be converted
ES:DI Pointer to ASCIZ text buffer containing error text.
This is a read only text buffer and you must not alter
the text in this buffer.
If the error code is RESERVED it is expanded to "General failure". The
maximum width for the question mark fields is 15 characters. The error
text is automatically adjusted so that extra spaces are not in the text
buffer. For example the error text
Network node ??????????????? is not listening
would be
Network node HOST is not listening
for node HOST.
When coding for LANOS the following code sequence will work for both
DOS 4.x and DOS 3.x:
mov ax, error_number ; Get error number
mov bx, ax ; Place in BX also
mov ah, 5
int 2fh
; ES:DI now points to error string.
NOTE: LANOS does not check AL when running under DOS 4.00 and thus
the values in AL are not important. The value in AL is important if
you are running on another network operating system such as IBM PC
LAN.
Testing for the Existance of the NETBIOS
****************************************
Before NETBIOS calls may be performed the NETBIOS must be installed.
The folowing code fragment illustates how you should test for the
existance of the NETBIOS.
; An illegal NCB used to determine if the NETBIOS is present
;
illegal_NCB db 7fh ; Illegal command
db 63 dup (0) ; Rest of NCB is 0
; NETBIOS_PRESENT - Determine if we have a NETBIOS present
;
; DS in Current Data segment
; ES in Current Data segment
; AX out Destroyed
; BX out Destroyed
; FLAGS out NO CARRY if present
; CARRY if not present
;
NETBIOS_present proc
push es
mov ax, 355cH ; Get 5C vector
int 21H
mov ax, es
pop es
cmp ax, 0F000h ; Pointing into BIOS?
je no_vector ; Yes - Then no real 5C
or ax, bx ; Test for 0
jnz have_vector ; Non-zero - Have 5C int
no_vector:
stc ; Show not present
ret
; We have a legal 5C vector. Now perform an illegal NCB
; request to make sure that it is a legal NETBIOS.
;
have_vector:
mov al, 0
mov bx, offset illegal_NCB
int 5cH
test al, al ; Will get changed on illegal cmd
jz no_vector
clc
ret
NETBIOS_present endp
Testing for the Existance of the Redirector, Server and LANPUP
**************************************************************
You can issue a multiplex interrupt (2FH) to determine if the
redirector, server or LANPUP software is installed.
INPUT AX B800H
OUTPUT AL 0 If neither redirector or server installed
NZ Redirector, server or LANPUP installed
BL Contains bits indicating which software is installed
(several bits will be set when serveral peices of software
is running)
10000000b Redirector has pop up receive message
capability.
01000000b Server is installed
00001000b Redirector is installed
00000010b LANPUP is installed
Determining Network Software Version
************************************
You can issue a multiplex interrupt to determine which version of the
network software is running.
INPUT AX B809H
OUTPUT AH Major version number.
AL Minor version number.
NOTE: The version numbers are returned as decimal numbers. For
example, version 3.00 would be
AH 2
AL 53 decimal or 35 hex
The Alternate NETBIOS Interface
*******************************
The normal interface to the NETBIOS is via interrupt 5CH; the
alternate interrupt to the NETBIOS is via interrupt 2AH. The 2A
interface is provided by the LANtastic redirector. Some NETBIOS
programs do not use the standard 5C interface but rather the
alternate 2A interface.
The alternate interface (2A) was originally designed as a "higher"
level interface to network communications rather than the "low" level
interface (5C) provided by the NETBIOS. The 2A interface, however,
does not support any higher level functions than does the 5C
interface and therefore has not become a defacto standard as has the
5C interface.
The REDIR intercepts 2A interrupts and reformats them to 5C
interrupts, thereby providing a 2A interface to the NETBIOS. A list
of the 2A interface functions that are supported are described below.
2A interrupt functions are invoked by loading the AH or AX register
with a function code and then issuing a software interrupt 2A. For
example,
mov ah, 0 ; Installation check
int 2AH ; Call alternate NETBIOS interface
---------
FUNCTION: Installation check
DESCRIPTION: Checks to see if a 2A interface is installed.
INPUTS: AH in 0
OUTPUTS: AH out 0 if not installed
AH NZ if installed
---------
FUNCTION: Execute NETBIOS with no error retry
DESCRITION: Executes a NETBIOS command (similar to 5C interface).
The NETBIOS command may be optionaly retried on certain
error conditions.
INPUTS: AX 01xxH or 0401H to execute NETBIOS with
no error retry
0400H to execute NETBIOS with error retry.
Error codes that are automatically retried are
No sessions resources (09H)
No listen (12H)
Interface busy (21H)
ES:BX Pointer to NCB
OUTPUTS: AL NETBIOS error code
AH 0 if no error
1 if error
---------
FUNCTION: Get resource information
DESCRITION: Return NETBIOS resources which are available for use.
INPUTS: AH 5
OUTPUTS: BX Available names (16 - names in use)
CX Available NCBs (free NCBs)
DX Available sessions (max sessions -
pending sessions)
Controlling redirected printer streams
**************************************
You can control how output is sent to redirected printers in three ways:
1. You can set a "combine" mode which does not separate multiple
print jobs when programs terminate or when the printer is
opened or closed.
2. You can set a "separate" mode which seperates print jobs when
a program terminates or when the printer is opened and closed.
3. You can "flush" redirected output, thereby forcing the printer
to begin printing.
The above three functions may be performed using the NET LPT COMBINE
NET LPT SEPARATE and NET LPT FLUSH commands. Often these commands
need to be performed within programs. Two software interfaces are
provided to allow you to control these functions. These interfaces
consist of 2AH interrupt interface and a standard 21H system call
interrupt interface.
NOTE: The DOS COMMAND.COM program always sets redirected printer
separate mode when it prompts for command input and therfore
these interrupts are ineffective accross multiple program
invocations performed through COMMAND.COM. The only exception
to this is inside batch files, since COMMAND.COM does not prompt
for command input.
2AH interrupt interface
-----------------------
FUNCTION: Set spooled output to combine mode
DESCRIPTION: All printer output is combined into 1 print job regardless
of the printer being opened or closed or programs
terminating.
INPUTS: AX 0601H
OUTPUTS: none
---------
FUNCTION: Set spooled output in speparate mode
DESCRIPTION: Printer output is not combined when multiple programs are
run or when the printer is opened or closed. This command
implicitly starts a new print job.
INPUTS: AX 0602H
OUTPUTS: none
---------
FUNCTION: Flush printer output
DESCRIPTION: Printer output is flushed and a new print job is started.
If no output exists to be flush then this function has no
effect.
INPUTS: AX 0603H
OUTPUTS: none
21H Interrupt interface
-----------------------
FUNCTION: Return redirected printer mode
DESCRIPTION: The current printer mode (either printer output
combined or printer output separated) is returned.
INPUTS: AX 5D07H
OUTPUTS: DL 0 Redirected output is being combined
1 Redirected output is being separated
---------
FUNCTION: Set redirected printer mode (either printer output
DESCRIPTION: The current printer mode (either printer output
combined or printer output seprated) can be set.
INPUTS: AX 5D08H
DL 0 Set redirected output to be combined
1 Set redirected output to be separated. This
command implicitly starts a new print job.
OUTPUTS: none
---------
FUNCTION: Flush printer output
DESCRIPTION: Printer output is flushed and a new print job is started.
If no output exists to be flush then this function has no
effect.
INPUTS: AX 5D09H
OUTPUTS: none
MS-DOS Compatible Network Functions
***********************************
All MS-DOS network system call functions with the exception of GET and
SET printer setup string (5E02 and 5E03) are fully supported. The
reason that these functions are not fully supported is that printer
setup strings are set by the system administrator and are stored on
the server. The printer setup strings are only changeable using the
NET_MGR program.
A quick reference list of the MS-DOS compatible network functions is
provided at the end this manual. The following network functions are in
numerical order.
5E00H Get Machine Name
------------------------
INPUT AX 5E00H
DS:DX Pointer to 16 byte buffer where ASCIZ machine name is
returned
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
CL NETBIOS name number of machine name.
CH 0 If machine name is not set
Not zero if machine name has been set
DS:DX ASCIZ machine name
Get Machine Name returns the name which your computer is known by on
the network. This name is specified when you run the redirector. You
may use the name and NETBIOS name number returned by this function to
perform NETBIOS commands. You must not use any other names added by
LANOS.
5E02H Set Printer Setup
-------------------------
INPUT AX 5E02H
BX Redirection list index.
CX Setup string size
DS:SI Pointer to printer setup string
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
Set printer setup sets a setup string to be sent to the network printer
whenever a file is queued to the printer.
NOTE: LANOS does not process this request since printer setup strings
are controlled by the system administer using the NET_MGR program.
The system call DOES NOT return an error, however.
5E03H Get Printer Setup
-------------------------
INPUT AX 5E03H
BX Redirection entry index.
ES:DI Pointer to area to contain setup string
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
CX Length of setup string.
Get setup string will return the setup string set with 5E02H (Set
Printer Setup) above.
NOTE: LANOS does not process this request since printer setup strings
are controlled by the system administer using the NET_MGR program.
The system call DOES NOT return an error, however, and the length
of the setup string (CX) is 0.
5F02H Get Redirected Device Entry
-----------------------------------
INPUT AX 5F02H
BX Redirection entry index. Index 0 specifies the first entry.
DS:SI Pointer to 16 byte area which will receive the ASCIZ device
name which the redirection index corresponds with.
ES:DI Pointer to 128 byte area which will receive the ASCIZ
network path that the redirected device refers to.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
BL Type of device
3 Printer device
4 Disk device
BH Device status
Bit 0=0 If device is valid
0=1 If device is not valid
Bits 1-7 reserved
CX Value stored by 5F03 call. Should be 0 for compatiblity with
LANOS.
DX May be destroyed
BP May be destroyed
DS:SI Filled ASCIZ device name
ES:DI Filled ASCIZ network path
Get Redirected Device Entry returns information about a single
redirected device (see 5F03 Redirect Device). This function may be
used to scan the list of redirected devices.
5F03H Redirect device
-----------------------
INPUT AX 5F03H
BL Type of device
3 Printer device
4 Disk device
CX Value to store with redirected device. Set this to 0
for compatiblity with LANOS.
DS:SI Pointer to ASCIZ device name to redirect. For printer
device specify: PRN, LPT1, LPT2, LPT3
For disk devices specify A:, B:, C:, etc.
ES:DI Pointer to network path to redirect the device to.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
Redirect device allows you to connect local devices to network paths.
For example you can connect your LPT1 to a printer on another node.
References to LPT1 are routed to the network.
5F04H Cancel Device Redirection
---------------------------------
INPUT AX 5F04
DS:SI Pointer to device name to cancel redirection for.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
Cancel device redirection allows you to remove a device redirection so
that the device is restored to its former state.
LANOS Extended Network Functions
********************************
LANOS provides an extended set of network system calls which allow
further network control which is not provided by the standard MS-DOS
compatible network requests.
5F80H Get Login Entry
-----------------------
INPUT AX 5F80H
BX Login entry index (0 based).
ES:DI Pointer to 16 byte buffer which will receive computer name that
you are logged into.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
BX Next login entry index. BX-1 is the current login entry
index. You can use BX-1 in future Get Login Entry calls
to reread the login entry.
DL Adapter number logged in through
ES:DI Pointer to filled ASCIZ buffer. The logged in machine name
DOES NOT include the \\ prefix.
5F81H Login to a Server
-------------------------
INPUT AX 5F81H
ES:DI Pointer to login path and password in the following form
\\computer-name\username<0>password<0>
Passwords may be omiited blank but binary 0's (<0>) are
still needed
BL Adapter number to login into through
0ffh To try all valid adapters
0-3 To try adapter 0-3 explicitly
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
5F82H Logout of a Server
--------------------------
INPUT ES:DI Pointer to server name to log out of in the form
\\computer-name<0>
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
5F83H Get username entry
--------------------------
INPUT AX 5F83H
BX Login entry index (0 based).
ES:DI Pointer to 16 byte buffer which will receive user name that
you are logged into.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
BX Next login entry index. BX-1 is the current login entry
index. You can use BX-1 in future Get Username Entry calls
to reread the suername entry.
DL Adapter number logged in through
ES:DI Pointer to filled buffer.
5F84H Get inactive server entry
---------------------------------
INPUT AX 5F84H
BX Non-logged in server index.
ES:DI Pointer to 16 byte buffer which will receive a server name
that you are NOT logged into but is avaliable to for logging
in.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
DL Adapter number the non-logged in server is on. This number
may be used as input "Login to Server" (5F81) system call.
ES:DI Pointer to filled ASCIZ buffer. The non-logged in server
name DOES NOT include the \\ prefix.
5F85H Change password
-----------------------
INPUT AX 5F85H
ES:DI Pointer to \\computer-name\old-password<0>new_password<0>
You must be logged into computer-name
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
CHANGE PASSWORD changes a password given an old (current) and new
password.
5F86H Disable account
-----------------------
INPUT AX 5F86H
ES:DI Pointer to machine name and password in the form
\\machine-name\password<0>
You must be logged into the machine before this system
call will work.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
DISABLE ACCOUNT disables a user's currently logged in account.
Applies only when concurrent login entries are set at 1 (by
NET_MGR). Requires system manager to reenable account.
5F87H Get account
-------------------
INPUT AX 5F87H
DS:SI Pointer to 128 byte buffer to receive account
information.
ES:DI Pointer to machine name in the form \\machine-name<0>
You must be logged into the machine before this system
call will work.
OUTPUT FLAGS NC If no error
CY If error occured
BX Destroyed
AX Error code if error
Get Account returns the account record for your the account you are
currently logged into the server with.
; User account structure
;
user_account struc
UA_name db 16 dup (?) ; Blank padded username
UA_internal1 db 16 dup (0)
UA_description db 32 dup (?) ; Full user description
UA_privilege db ? ; Privilege bits
UA_concurrent db ? ; Maximum concurent users
UA_allowed_times db 42 dup (?) ; 1 bit for each half hour
; 7 days a week
; Begins on Sunday. 0
; means allowed
UA_internal2 dw 2
UA_last_login_time dw 2 dup (?) ; Last time logged in
UA_account_expiration dw 2 dup (?) ; Expiration date (MSDOS-format)
; Year, Month:Day
UA_password_expiration dw 2 dup (?) ; Expiration date (as above)
; 0 - Means no expiration date
UA_password_extension db ? ; 1-31 Number of days to
; reextend password after change
; 0 - No extension required
UA_internal db 5 dup (?)
user_account ends
; Privilege bits set for UA_password above
;
UA_privilege_superACL equ 10000000b ; Bypass ACLs
UA_privilege_superqueue equ 01000000b ; Bypass queue protection
UA_privilege_peer equ 00100000b ; Treat as local process
UA_privilege_supermail equ 00010000b ; Bypass mail protection
UA_privilege_audit equ 00001000b ; Allow create of audit entry
UA_privilege_system equ 00000100b ; System manager
5F97H Copy file
-----------------
INPUT AX 5F97H
CX:DX Amount to copy (set to FFFF:FFFF to copy whole file)
SI Source handle
DI Destination handle
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
AX:DX Amount copied
COPY FILE copies the source file (designated by the input handle) to the
destination file (designated by the output handle). The copy is performed
by the server and requires not workstation resources.
5F98H Send unsolicited message
--------------------------------
INPUT AX 5F98H
DS:SI Pointer to message buffer. Format of buffer is
described below
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
NOTE: currently no errors are returned
; Format of DG_message command. The 16 byte name fields are null
; terminated and contain the first n characters to be matched. For
; example AB<0> will match ABxxxxxx...
;
message_buffer struc
MB_reserved db ? ; Reserved field used by system call
MB_type db ? ; User defined message type
MB_machine db 16 dup (?) ; Machine name that message is destined for
MB_server db 16 dup (?) ; User must be logged into this server
MB_user db 16 dup (?) ; User must be using this username
MB_originator db 16 dup (?) ; Originator's machine name. Filled in
; when message is received
MB_text db 80 dup (?) ; Message text
message_buffer ends
; Message buffer type. The values 0-7fh are reserved for LANOS use. Other
; message types are user defined. You may, however, use message
; MBT_general since this is the message type that NET and LANPUP use
; to the send rude messages.
;
MBT_general equ 0 ; General message used by NET, LANPUP
; and others
MBT_warning equ 1 ; Server warning message.
5F99H Get last received unsolicited message
---------------------------------------------
INPUT AX 5F98H
ES:DI Pointer to message buffer. Format of buffer is
described above for 5F98H system call.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error (or no message pending)
5F9AH Get message processing flag
-----------------------------------
INPUT AX 5F9AH
OUTPUT DL Bits which describe what processing should be done when
an unsolicited message is received.
FLAGS NC If no error
CY If error occured
AX Error code if error
; Message processing bits
;
MPB_beep equ 00000001b ; Beep before message delivered
MPB_deliver equ 00000010b ; Deliver message to message service
MPB_auto_pop_up equ 00000100b ; Pop up messages automatically
5F9BH Set message processing flag
-----------------------------------
INPUT AX 5F9BH
DL Bits which describe what processing should be done when
an unsolicited message is received. See 5F9AH system
call for list of bits.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
5F9CH Pop up last received message
------------------------------------
INPUT AX 5F9CH
CX Amount of time in ticks to leave message on the screen
DH Line number of where message will be placed. Not value
checkd. 0 Based.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error. The Only erro currently returned is
0BH (Invalid format). This error is returned if the screen
is not currently in a text mode and the pop-up message can't
be displayed.
Pop up last received message displays the last received message on the
screen. The message is placed at a given line and displayed for a given
amount of time. When the message is removed the original screen contents
are restored. The message may be removed before the display time elapses
by pressing Esc.
5FA0H Get queue entry
-----------------------
INPUT AX 5FA0H
BX Queue entry index (0 for first entry)
DS:SI Pointer to memory block to transfer queue entry into.
ES:DI Pointer to ASCIZ server name in the form \\name<0>
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
BX Next queue entry index to use to find next entry.
BX-1 is the current queue entry index. You can use BX-1
in future Get Queue Entry calls to reread the queue
entry.
DS:SI Filled memory block with queue entry info.
; Definition of a queue entry.
;
queue_entry struc
QE_status db ? ; Status of queue entry
QE_size dd ? ; Size of spooled file
QE_type db ? ; Type of queue entry
QE_output_control db ? ; Control of despooled file
QE_copies dw 1 ; Copies
QE_sequence dd ? ; Sequence number of queue entry
QE_spooled_file db 48 dup (?) ; Pathname of spooled file
QE_user db 16 dup (?) ; Username who spooled file
QE_machine db 16 dup (?) ; Machine name user was on
QE_date dw ? ; Date file spooled (MS-DOS format)
QE_time dw ? ; Time file spooled (MS-DOS format)
QE_destination db 17 dup (?) ; ASCIZ Device name or username destined for
QE_comment db 48 dup (?) ; Comment field
queue_entry ends
; Different queue entry statuses
;
QE_status_free equ 0 ; The queue entry is empty
QE_status_update equ 1 ; The queue entry is being updated
QE_status_hold equ 2 ; The queue entry is held
QE_status_wait equ 3 ; The queue entry is waiting for despool
QE_status_active equ 4 ; The queue entry is being despooled
QE_status_cancel equ 5 ; The queue has been canceled
QE_status_file_error equ 6 ; The spooled file could not be accessed
QE_status_spool_error equ 7 ; The destination could not be accessed
QE_status_rush equ 8 ; Rush this job
; Different types of queue entries
;
QE_type_print equ 0 ; Spooled printer queue file
QE_type_message equ 1 ; Spooled message (mail)
QE_type_local_file equ 2 ; Spooled local file
QE_type_remote_file equ 3 ; Spooled remote file
QE_type_modem equ 4 ; Spooled to remote modem
QE_type_batch equ 5 ; Spooled batch processor file
; Bit definitions for output control
;
QE_OC_keep equ 01000000b ; Keep after despooling (don't delete)
; For mail - allow delete only by owner
QE_OC_voice equ 00100000b ; For mail - Mail file contains voice
; mail.
5FA1H Set queue entry
-----------------------
INPUT AX 5FA1H
BX Handle of opened queue entry
DS:SI Pointer to queue information buffer. The buffer must be
formatted as above.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
Set queue entry allows you to change certain fields in a queue entry.
The queue entry must be currently open and you must have a handle to it.
The only fields that are looked at and altered are:
QE_output_control
QE_copies
QE_destination (only for MAIL queue entries)
QE_comment
5FA2H Control queue
---------------------
INPUT AX 5FA2
BL Queue control command
CX:DX Sequence number to control. (CANCEL HOLD RELEASE
RUSH)
DX Physical printer number. (START HALT HALT_EOJ PAUSE
SINGLE RESTART)
0..2 LPT1..LPT2
3..4 COM1..COM2
other All printers
ES:DI ASCIZ computer name
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
Control queue allows you to alter print jobs and manipulate the
physical printer despooling if you have privileges. You can control
despooling for selected printers or all printers.
; Control queue commands. Stared (*) entry are prived. commands which
; require Q privilege.
;
CQ_start equ 0 ;* Start despooling
CQ_halt equ 1 ;* Halt despooling
CQ_halt_EOJ equ 2 ;* Halt despooling at end of job
CQ_pause equ 3 ;* Pause the despooler at end of job
CQ_single equ 4 ;* Print single job
CQ_restart equ 5 ;* Restart the current print job
CQ_cancel equ 6 ; Cancel the currenly printing job
CQ_hold equ 7 ; Hold the queue entry
CQ_release equ 8 ; Release a held queue entry
CQ_rush equ 9 ;* Make the queue entry a rushed job
5FA3H Get Printer Status
--------------------------
INPUT AX 5FA3H
BX Physical printer number
0..2 LPT1..LPT3
3..4 COM1..COM2
DS:SI Pointer to buffer to receive printer status
information
ES:DI ASCIZ server name (\\name format)
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
BX Next physical printer number
Get printer status returns the status of a physical printer on the
server. If the printer is actively printing then more detailed
information is also returned.
; Printer status record
;
PS struc
PS_state db ? ; Printer state (defined below)
PS_index dw ? ; Queue index correspnding to print job being
; despooled. (-1 if not despooling ignore
; rest of fields)
PS_CPS dw ? ; Actual characters per second being output
PS_output_chars dd ? ; Characters actually output so far
PS_read_chars dd ? ; Characters actually read from spooled file
; so far. May be used to compute % completed.
PS_copies dw ? ; Copies remaining to print
PS ends
; Printer states.
;
printer_state record PS_state_pause:1, PS_state_value:7
PS_state_disabled equ 0 ; Printer is disabled
PS_state_single_job equ 1 ; Printer will stop at end of job
PS_state_multijob equ 2 ; Printer should print multiple jobs
5FA4H Get Stream Info
-----------------------
INPUT AX 5FA4H
BX Stream index number (0 based)
DS:SI In Pointer to buffer to receive stream information
(see defintion below)
ES:DI Pointer to machine name in \\machine-name<0> form
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
BX Next stream number
Get Stream Info returns the information about a logical printer
stream. Both the state of the stream and the stream template are
returned.
; Definition of a logical printer stream. Each stream contains a logical
; printer resource template and a flag that indicates if jobs printed for
; that logical printer resource should be queued or not.
;
logical_stream struc
LS_queue db ? ; 0 Disabled, /= 0 Enabled
LS_template db 11 dup (?) ; Template may contain ?'s
logical_stream ends
5FA5H Set Stream Info
-----------------------
INPUT AX 5FA5H
BX Stream index number (0 based)
DS:SI In Pointer to buffer to set stream information from
(see defintion above)
ES:DI Pointer to machine name in \\machine-name<0> form
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
Set Stream Info allows you to set a particular stream's state and
template.
5FA7H Create User Audit Entry
-------------------------------
INPUT AX 5FA7H
DS:DX ASCIZ Reason code (up to 8 characters)
DS:SI ASCIZ Variable reason code (up to 128 characters)
ES:DI Pointer to ASCIZ machine name in the form \\server<0>
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
5FB0H Get Active User information
-----------------------------------
INPUT AX 5FB0H
BX Server login entry index to return information about
(0 based)
DS:SI Pointer to user buffer for a single server login entry
ES:DI Pointer to ASCIZ machine name in the form \\server<0>
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
BX Updated login index - Used to retrieve next succesive
user.
DS:SI Filled buffer with login entry information.
Get active user information returns a server's information about a
currently active user.
; Definition of active user entry
;
active_user_entry struc
AUE_VCID dw 0 ; Virtual circuit number
AUE_state db ? ; Login state defined below
AUE_command db ? ; Last command issued
AUE_IO db 5 dup (?) ; Number of I/O bytes (40 bit number)
AUE_requests db 3 dup (?) ; Number of server requests 24 bit num
AUE_name db 16 dup (?) ; Name of user who is logged in
AUE_machine db 16 dup (?) ; Name of remote logged in machine
active_user_entry ends
; Definition of the various login states and privilege.
;
AUE_state_starting equ 00000000b ; We are in the middle of a login
AUE_state_in equ 00000001b ; We are fully logged in
AUE_state_RPL equ 00000010b ; Remote program load login
AUE_privilege_superACL equ 10000000b ; Bypass ACLs
AUE_privilege_superqueue equ 01000000b ; Bypass queue protection
AUE_privilege_peer equ 00100000b ; Treat as local process
AUE_privilege_supermail equ 00010000b ; Bypass mail protection
AUE_privilege_audit equ 00001000b ; The user can create audit entries
; Active user entry commands
;
AUEC_login equ 0 ; Login into a server
AUEC_terminate equ 1 ; Process termination
AUEC_open equ 2 ; Open a file
AUEC_close equ 3 ; Close a file
AUEC_create equ 4 ; Create a file if it's there or not
AUEC_new equ 5 ; Create a new file that is not there
AUEC_unique equ 6 ; Create a unique file
AUEC_commit equ 7 ; Commit disk data to disk
AUEC_read equ 8 ; Read from file
AUEC_write equ 9 ; Write to file
AUEC_delete equ 10 ; Delete file
AUEC_set_attr equ 11 ; Set file attributes
AUEC_lock equ 12 ; Lock byte range
AUEC_unlock equ 13 ; Unlock byte range
AUEC_create_dir equ 14 ; Create a subdirectory
AUEC_delete_dir equ 15 ; Delete a subdirectory
AUEC_rename_file equ 16 ; Rename a file
AUEC_find_first equ 17 ; Find first matching file
AUEC_find_next equ 18 ; Find the next matching file
AUEC_disk_free equ 19 ; Get disk free space
AUEC_get_queue equ 20 ; Get a queue entry
AUEC_set_queue equ 21 ; Set a queue entry
AUEC_control_queue equ 22 ; Control the queue
AUEC_get_login equ 23 ; Return login information
AUEC_get_link equ 24 ; Return link description
AUEC_seek equ 25 ; Seek to a file position
AUEC_get_time equ 26 ; Get server's time
AUEC_audit equ 27 ; Create audit entry
AUEC_multi_open equ 28 ; Open file in a multitude of modes
AUEC_change_password equ 29 ; Change a password
AUEC_disable_account equ 30 ; Disable account from further log ins
AUEC_copy_file equ 31 ; Local server file copy
AUEC_get_username equ 32 ; Get a username from account file
AUEC_translate_path equ 33 ; Translate a server's logical path
AUEC_create_indirect equ 34 ; Make indirect file
AUEC_get_indirect equ 35 ; Get indirect file text
AUEC_printer_status equ 36 ; Get physical printer stats
AUEC_get_stream equ 37 ; Get logical print stream information
AUEC_set_stream equ 38 ; Set logical print stream information
AUEC_get_account equ 39 ; Get user's account record
5FB1H Get Shared directory information
----------------------------------------
INPUT AX 5FB1H
DS:SI Pointer to 64 byte buffer to receive link description
ES:DI Pointer to ASCIZ machine name and shared directory in form
\\server\shared-resource<0>
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
CX ACL privilege bits for requesting user
DS:SI Filled buffer with ASCIZ description of shared
resource
; ACL bit definition
;
ACL_read equ 1000000000000000b ; (R) Allow open for read and reading
ACL_write equ 0100000000000000b ; (W) Allow open for write and writing
ACL_create_file equ 0010000000000000b ; (C) Allow file creation
ACL_create_dir equ 0001000000000000b ; (M) Allow directory creation
ACL_lookup equ 0000100000000000b ; (L) Allow file/directory lookups
ACL_delete_file equ 0000010000000000b ; (D) Allow file deletion
ACL_delete_dir equ 0000001000000000b ; (K) Allow directory deletion
ACL_rename equ 0000000100000000b ; (N) Allow file renaming
ACL_execute equ 0000000010000000b ; (E) Allow program execution
ACL_physical equ 0000000001000000b ; (P) Allow physical access to device
ACL_attribute equ 0000000000100000b ; (A) Allow attribute changing
5FB2H Get username from account file
--------------------------------------
INPUT AX 5FB2H
BX Username entry index (0 for first entry)
DS:SI Pointer to memory block receive 16 character username
ES:DI Pointer to ASCIZ server name (\\name format)
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
BX Next queue entry index to use to find next entry.
DS:SI 16 Character username retrived from server's account file
5FB3H Translate path
----------------------
INPUT AX 5FB3H
DS:SI Pointer to 128 byte buffer to receive ASCIZ information
ES:DI Pointer to full ASCIZ path (including servre name). E.g.
"\\SERVER\ROOT\LOOPER\FILE.EXT<0>"
DX Type of translation to be performed. (The OR of the
following bits)
00000001b Expand bottom path as indirect file
00000010b Translate to server's physical disk. Actual path
relative to server's disk. (e.g C:\AUTOEXEC.BAT)
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
DS:SI Buffer pointed to by DS:SI updated
Translate path translates the full network path by expanding any indirect
files. This system call is useful when you want to determine what an
indirect file is going to expand into before you use it. Optionally
you can also expand the last file in the path as an indirect file or you
can return the server's physical path.
5FB4H Create indirect file
----------------------------
INPUT AX 5FB4H
DS:SI Pointer to 128 byte ASCIZ area which contains the indirect
file's contents. The file contains may contain any valid
server relative path.
ES:DI Pointer to full ASCIZ path of indirect file to create. E.g.
"\\SERVER\ROOT\LINKFILE<0>"
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
Create indirect file allows you to create an indirect file on a server,
Whenever the server referneces the indirect file, the contents of the
indirect file will be used instead of the indirect file's name. For
example, if the indirect file \\SERVER\ROOT\LINKFILE contained
\MISC\TEXT.DAT, then whenever the file \\SERVER\ROOT\LINKFILE was
referenced, the path \MISC\TEXT.DAT would be substituted.
5FB5H Get indirect file contents
----------------------------------
INPUT AX 5FB6H
DS:SI Pointer to 128 byte area to receive ASCIZ indirect file
contents
ES:DI Pointer to full network path of indirect file.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
DS:SI The buffer area has been filled
Get indirect file contents will return the contents of an indirect file.
This system call can be used to determine what was placed into the
indirect file by create indirect file.
5FC0H Get Server's time
-------------------------
INPUT AX 5FC0H
DS:SI Pointer to 8 byte time block
ES:DI Pointer to ASCIZ server name to get time from.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
DS:SI Filled buffer with time information
time_block struc
TB_year dw ? ; Year
TB_day db ? : Day of month (1-31)
TB_month db ? ; Month (1-12)
TB_minutes db ? ; Minutes (0-59)
TB_hour db ? ; Hour (0-23)
TB_hundreths db ? ; Hundreths of seconds (0-99)
TB_seconds db ? ; Seconds (0-59)
time_block ends
5FD0H Get redirected lineprinter timeout
------------------------------------------
INPUT AX 5FD0H
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
CX Redirected line printer timeout in ticks (1 tick = 1/18.2
seconds). A value of 0 means timeouts are disabled.
5FD1H Set Redirected lineprinter timeouts
-------------------------------------------
INPUT AX 5FD1H
CX Printer timeout in ticks (1/18.2 second). A value of 0
disables timeouts.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
5FE0H Get DOS service vector
------------------------------
INPUT AX 5FE0H
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
ES:BX Pointer to current DOS service routine
5FE1H Set DOS service vector
------------------------------
INPUT AX 5FE1H
ES:BX New DOS service vector location. To chain into the DOS
service vector you must obtain the old vector (5FE0) and
save it. When your service routine is called you will
need to call the old vector before beginning your
processing.
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
5FE2H Get message service vector
----------------------------------
INPUT AX 5FE2H
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
ES:BX Pointer to current message service routine
5FE3H Set message service vector
----------------------------------
INPUT AX 5FE3H
ES:BX New message service vector location. To chain into the
message service vector you must obtain the old vector
(5FE2) and save it. When your service routine is called
you will need to call the old vector before beginning your
processing.
(NOTE: when a service routine is called ES:BX will point to
the currently received message)
OUTPUT FLAGS NC If no error
CY If error occured
AX Error code if error
Other useful system calls
*************************
Obtaining a list of shared resources
------------------------------------
The server's shared resources appear as directories or files in the
server's root directory (i.e. \\SERVER). To obtain a list of the server's
shared resources you can issue a find first system call (4EH) with a path
to the server's network control directory (e.g. \\SERVER\*.*).
For example, to return all shared resources
search_path db "\\server\*.*",0
...
mov ah, 4eh ; Find first system call
mov cx, 11h ; Include read-only &directory
mov dx, search_path
int 21h
...
mov ah, 3fh ; Find next system call
int 21h
To return just printer resources
search_path cb "\\server\@*.*",0
...
mov ah, 4eh ; Find first system call
mov cx, 01h ; Include read-only
mov dx, search_path
int 21h
...
mov ah, 3fh
int 21h
Quick Reference list of MS-DOS compatible Network System Calls
**************************************************************
5E00H Get Machine Name
5E02H Set Printer Setup
5E03H Get Printer Setup
5F02H Get Redirected Device Entry
5F03H Redirect device
5F04H Cancel Device Redirection
Quick Reference List of LANtastic NOS Only Network System Calls
***************************************************************
5F80H Get Login Entry
5F81H Login to a Server
5F82H Logout of a Server
5F83H Get username entry
5F84H Get inactive server entry
5F85H Change password
5F86H Disable account
5F87H Get account
5F97H Copy file
5F98H Send unsolicited message
5F99H Get last received unsolicited message
5F9AH Get message processing flag
5F9BH Set message processing flag
5F9CH Pop up last received message
5FA0H Get queue entry
5FA1H Set queue entry
5FA2H Control queue
5FA3H Get Printer Status
5FA4H Get Stream Info
5FA5H Set Stream Info
5FA7H Create User Audit Entry
5FB0H Get Active User information
5FB1H Get Shared directory information
5FB2H Get username from account file
5FB3H Translate path
5FB4H Create indirect file
5FB5H Get indirect file contents
5FC0H Get Server's time
5FD0H Get redirected lineprinter timeout
5FD1H Set Redirected lineprinter timeouts
5FE0H Get DOS service vector
5FE1H Set DOS service vector
5FE2H Get message service vector
5FE3H Set message service vector