. , , ,

,,,

1.

2.

3. TCP/IP

4.

5.

6.

7.


1. .

, -

ARPANET TELENET, , 80% -

,

, ..

.

10-15 - -

(),

,

.

IEEE 802 ( -

-IEEE, ), -

, : "...

, ,

, : , -

,

... , , -

,

, IEEE 802 Ѡ

,

1-20

/" .

, : -

, -

.


2.

()

() . -

, .

.

( 1) -

. ,

(,

, ,

).

( 2)

.

.

( 3), -

, .

. .

( 4)

,

.

( 5) -

. -

, ()

. ,

.

( 6)

. , ,

ASCII/EBCDIC,

- .

( 7) -

.

-

, , -

.

-

.

.

: -

-

.

:

1.

.

Ihe Dept. of Defense's User Datagram Protocol (UDP).

2. .

Xerox's Internet Pasket Exchange Protocol (IPX).

3. Apple.

Apple's Datagram Delivery Protocol (DDP).


1

------------------------------>

"A" 2 "B"

------------------------------>

3

------------------------------>

"A" "B" -

.

, -

.

:

. ,

, .

.

.

. -

. ,

, .

, ,

.

. -

-

. "",

,

. -

, - .

, ,( -

):

1. . Ihe

Dept. of Defenee's Transmission Control Protocol (TCP)

2. 젠 Xerox's

Sequenced Packet Protocol (SPP). , -

,( ):

1. . Ihe

Dept. of Defenee's Transmission Control Protocol (TCP) 2.

Xerox's Sequenced Packet

Protocol (SPP). 3. . Apple's

Appletalk Transaction Protocol (ATP)


""

----------------------------------->

<----------------------------------

1

----------------------------------->

"A" 2 "B"

----------------------------------->

3

----------------------------------->

<----------------------------------

"A" "B" -

. "",

.

-

, -

.

NetWare -

. ,

, -

, .

2.1.

NetWare

Xerox (Xerox Network Systems

XNS) -

(Internet Datagram and Internet Transport Protocols).

: -

( ) . -

: ,

() .

-

: -, ().

- 48 . -

-

.

32 , -

.

() 16 -

/ .

2.2. .

NetWare

, -

-

NetWare. NetWare -

. -

.

, -

. -

, .

2.3. .

NetWare

. NetWare

-

, -

. -

(Sequenced Packet Exange Protocol), -

.

NetWare : 1) -

,

2) -

.

, -

() -

-

. -

, .

.

-

. -

.

-

, . -

, -

576-

.

, -

, .

-

,

.

, /

, .

, -

,

. -

,

. , -

.

2.4. NetWare (IPX)

IPX Advanced NetWare

. IPX 頠 Xerox's Interuetwork

Datagram PacKet Protocol (IDP). IPX -

NetWare

,

.

IPX -

. -

Xerox Network Systems (XNS).   -

NetWare . -

IPX, NetWare

. -

, , -

.

NetWare.

IPX- Xerox's XNS

Internet Datagram Protocol (IDP). -

: .

,

.

,

.

30 .

,

. Xerox -

:

0 : ;

1 : ;

2 : -;

3 : ;

4 : ;

5 : ;

16-31 : .


(IPX)

-

0 1 15

====================

堠 ---------T----------

---------+----------

- -

--------------------

- -

蠠 - 蠠 -

--------------------

蠠 +---------

--------------------

--------------------

-

- -

- -

--------------------

L====================-

--

====================

0 -546 ⠠

+------

---------

.

L===================-

--

. 2.3.

2.5. IPX

IPX -

. :

, -

, . IPX

:

a. ;

b. ;

c. ;

d. ;

e. ;

f. ;

g. .

Asynchronons Event Sheduler (AES), IPX. AES

,

-

. AES

:

a. IPX;

b. ;

c. ;

d. .

IPX -

,

, .

IPX

2F. , 1, IPX -

.

void far (*ipx_spx)(void)

int ipx_installed(void)

{

union REGS regs;

struct SREGS sregs;

regs.x.ax =0x7a00;

int86x(0x2f,&regs,&regs,&sregs);

if (regs.h.al != 0xff)

return -1;

ipx_spx = MK_FP(sregs.es,regs.x.di);

return 1;

}

/*

*

*

*/

struct IPXHEADER

{

unsigned int checksum;

unsigned int length;

unsigned char transport_control;

unsigned char packet_type;

unsigned char dest_network_number [4];

unsigned char dest_network_node [6];

unsigned int dest_network_socket;

unsigned char source_network_number [4];

unsigned char source_network_node [6];

unsigned int source_network_socket;

};

struct ECB

{

void far *link_address;

void far (*event_service_routine)(void);

unsigned char in_use;

unsigned char completion_code;

unsigned int socket_number;

unsigned int connection_id; /* returned by Listen */

unsigned int rest_of_workspace;

unsigned char driver_workspace [12];

unsigned char immediate_address [ 6];

unsigned int packet_count;

struct {

void far *address;

unsigned int length;

} packet [2];

};

int ipx_spx_installed(void);

int ipx_cancel_event(struct ECB *ecb_ptr);

void close_socket(unsigned int socket);

int open_socket(unsigned int socket);

int get_local_target(unsigned char *dest_network,

unsigned char *dest_node,

unsigned int dest_socket,

unsigned char *bridge_address);

void let_ipx_breath(void);

void ipx_listen_for_packet(struct ECB *ecb_ptr);

void ipx_send_packet(struct ECB *ecb_ptr);

int get_internet_address(unsigned char connection_number,

unsigned char *network_number,

unsigned char *physical_node);

unsigned int get_1st_connection_num (char *who);

unsigned char get_connection_number(void);

void get_user_id(unsigned char connection_number,

unsigned char *user_id);

/*

* IPX.C -- helper routines for accessing IPX services

* from Turbo C.

*/

#include <stdlib.h>

#include <dos.h>

#include <mem.h>

#include <string.h>

#include <ipx.h>

void far (*ipx_spx)(void);

int ipx_spx_installed(void)

{

union REGS regs;

struct SREGS sregs;

regs.x.ax = 0x7a00;

int86x(0x2f, &regs, &regs, &sregs);

if (regs.h.al != 0xff) return -1;

ipx_spx = MK_FP(sregs.es, regs.x.di);

_BX = 0x0010;

_AL = 0x00;

ipx_spx();

if (_AL == 0x00) return 0;

return 1;

}

int ipx_cancel_event(struct ECB *ecb_ptr)

{

_ES = FP_SEG( (void far *) ecb_ptr);

_SI = FP_OFF( (void far *) ecb_ptr);

_BX = 0x0006;

ipx_spx();

_AH = 0;

return _AX;

}

void close_socket(unsigned int socket)

{

if (ipx_spx_installed() < 1) return;

_BX = 0x0001;

_DX = socket;

ipx_spx();

}

int open_socket(unsigned int socket)

{

if (ipx_spx_installed() < 1) return -1;

_DX = socket;

_BX = 0x0000;

_AL = 0xFF;

ipx_spx();

_AH = 0;

return _AX;

}

int get_local_target(unsigned char *dest_network,

unsigned char *dest_node,

unsigned int dest_socket,

unsigned char *bridge_address)

{

unsigned int temp_ax;

struct {

unsigned char network_number [4];

unsigned char physical_node [6];

unsigned int socket;

} request_buffer;

struct {

unsigned char local_target [6];

} reply_buffer;

memcpy(request_buffer.network_number, dest_network, 4);

memcpy(request_buffer.physical_node, dest_node, 6);

request_buffer.socket = dest_socket;

_ES = FP_SEG( (void far *) &request_buffer);

_SI = FP_OFF( (void far *) &request_buffer);

_DI = FP_OFF( (void far *) &reply_buffer);

_BX = 0x0002;

ipx_spx();

_AH = 0;

temp_ax = _AX;

memcpy(bridge_address, reply_buffer.local_target, 6);

return temp_ax;

}

void let_ipx_breath(void)

{

_BX = 0x000A;

ipx_spx();

}

void ipx_listen_for_packet(struct ECB *ecb_ptr)

{

_ES = FP_SEG( (void far *) ecb_ptr);

_SI = FP_OFF( (void far *) ecb_ptr);

_BX = 0x0004;

ipx_spx();

}

void ipx_send_packet(struct ECB *ecb_ptr)

{

_ES = FP_SEG( (void far *) ecb_ptr);

_SI = FP_OFF( (void far *) ecb_ptr);

_BX = 0x0003;

ipx_spx();

}

int get_internet_address(unsigned char connection_number,

unsigned char *network_number,

unsigned char *physical_node)

{

union REGS regs;

struct SREGS sregs;

struct {

unsigned int len;

unsigned char buffer_type;

unsigned char connection_number;

} request_buffer;

struct {

unsigned int len;

unsigned char network_number [4];

unsigned char physical_node [6];

unsigned int server_socket;

} reply_buffer;

regs.h.ah = 0xe3;

request_buffer.len = 2;

request_buffer.buffer_type = 0x13;

request_buffer.connection_number = connection_number;

reply_buffer.len = 12;

regs.x.si = FP_OFF( (void far *) &request_buffer);

sregs.ds = FP_SEG( (void far *) &request_buffer);

regs.x.di = FP_OFF( (void far *) &reply_buffer);

sregs.es = FP_SEG( (void far *) &reply_buffer);

int86x(0x21, &regs, &regs, &sregs);

memcpy(network_number, reply_buffer.network_number, 4);

memcpy(physical_node, reply_buffer.physical_node, 6);

regs.h.ah = 0;

return regs.x.ax;

}

unsigned int get_1st_connection_num (char *who)

{

union REGS regs;

struct SREGS sregs;

struct {

unsigned int len;

unsigned char buffer_type;

unsigned int object_type;

unsigned char name_len;

unsigned char name [47];

} request_buffer;

struct {

unsigned int len;

unsigned char number_connections;

unsigned char connection_num [100];

} reply_buffer;

regs.h.ah = 0xe3;

request_buffer.len = 51;

request_buffer.buffer_type = 0x15;

request_buffer.object_type = 0x0100;

request_buffer.name_len = (unsigned char) strlen(who);

strcpy(request_buffer.name, who);

reply_buffer.len = 101;

regs.x.si = FP_OFF( (void far *) &request_buffer);

sregs.ds = FP_SEG( (void far *) &request_buffer);

regs.x.di = FP_OFF( (void far *) &reply_buffer);

sregs.es = FP_SEG( (void far *) &reply_buffer);

int86x(0x21, &regs, &regs, &sregs);

if (regs.h.al != 0) return 0;

if (reply_buffer.number_connections == 0) return 0;

regs.h.ah = 0;

regs.h.al = reply_buffer.connection_num[0];

return regs.x.ax;

}

unsigned char get_connection_number(void)

{

_AH = 0xDC;

geninterrupt(0x21);

return _AL;

}

void get_user_id(unsigned char connection_number,

unsigned char *user_id)

{

union REGS regs;

struct SREGS sregs;

struct {

unsigned int len;

unsigned char buffer_type;

unsigned char connection_number;

} request_buffer;

struct {

unsigned int len;

unsigned char object_id[4];

unsigned char object_type[2];

char object_name[48];

char login_time[7];

} reply_buffer;

regs.h.ah = 0xe3;

request_buffer.len = 2;

request_buffer.buffer_type = 0x16;

request_buffer.connection_number = connection_number;

reply_buffer.len = 61;

regs.x.si = FP_OFF( (void far *) &request_buffer);

sregs.ds = FP_SEG( (void far *) &request_buffer);

regs.x.di = FP_OFF( (void far *) &reply_buffer);

sregs.es = FP_SEG( (void far *) &reply_buffer);

int86x(0x21, &regs, &regs, &sregs);

strncpy(user_id, reply_buffer.object_name, 48);

}

2.6. NetWare (SPX)

(SPX)

IPX Xerox's Sequenced

Packet Protocol (SPP). SPX

NetWare -

, -

.

SPX IPX

, .

IPX, SPX 12 -

.

2.7. SPX

IPX, SPX

:

a. SPX;

b. ;

c. ;

d. ;

e. ;

f. ;

g. ;

h. () .

, , c -

. , SPX -

- -

, -

.


SPX

0 1 15

====================

--------------------

---------T----------

. দ

---------+----------

- 蠠 -

--------------------

- -

蠠 - 蠠 -

-------------------- 1

蠠 +---------

--------------------

- -

--------------------

-

- -

- -

--------------------

L====================-

-+

==========T=========

. ꦦ

----------+---------

..

--------------------

. ࠠ 2

--------------------+---------

---------------------

--------------------

L====================-

--

====================

0 - 546 3

+---------

-----------

.

L===================-

--

TTT======T==========

L+++================-

.2.4


2.8. SPX

,

. , -

- , SPX -

, -

. SPX -

, -

. SPX -

-

, .

SPX -

, -

,

.

2.9.

, Novell -

. -

NetWare , -

NetWare.

, , , -

, -

NetWare.

-

,

.

.

(SAP).

, -

, -

.


3. ۠ TCP/IP

p TCP/IP p

p Ѡ p TCP/IP

------------------ --------T----T-----T-----T---------

p頠 Telnet FTP TFTP SMTP DNS

+-----------------+ +---------+

p p

+-----------------+ +-------+----+---T-+-----+---------+

頠 TCP UDP

pp頠

+-----------------+ +-------T--------+T----------------+

IP ICMP ---------------+

頠 L---------- ARP RARP

+-----------------+ +----------T--------+--T-----------+

Ethernet Token Ring p堠

+-----------------+

L------------------ L----------+-----------+------------

.3.1.

-

. ,

. , -

, -

, .

(protocol stack) - . p .3.2.

TCP/IP , .

-

-

.

,


p TCP/IP

- - ꠠ - - p

--------------- --------------

p頠 p

L-------T------- 蠠 L------T-------

---------- 蠠 -----------

-------+------ -------+------

pp pp

L------T------- p (UDP) L------T-------

--------- (TCP) ------

-------+------ -------+------

(p) (p)

L------T------- L------T-------

---------- p IP -------

-------+------ -------+------

頠 頠

p񠠠 p

L------T------- L------T-------

---------- p ------------

-----------------------

L-------+ ppࠠ +------

L-----------------------

.3.2.

.

, , -

TCP, :

-

; - -

TCP,

(Internet-IP);

- IP ,

TCP. , -

IP.

-

- ;

- IP

- .

IP ;

- - -

IP IP;

- IP IP.

, , -

, IP, ;

- , IP


p p TCP/IP

------------------------T---------------------------------

p렠 p񠠠

+-----------------------+---------------------------------+

Internet Protocol (IP) p

p

Internet Control p p

Message Protocol (ICMP) p p

p -

-

Address Resolution p pp p⠠

Protokol (ARP) p p ⠠

Reverse Address p p pp

Resolution Protocol p p 堠

(RARP) p p堠

Transmission Control p p p頠

Protocol (TCP) p 頠

-

User Datagram p

Protocol (UDP) p -

p

File Transfer p pp ⠠

Protocol (FTP) pp

p

Telnet pࠠ

L-----------------------+----------------------------------

IP TCP TCP.

TCP -

;

- TCP TCP

. -

, TCP .

,

TCP -

;

- - TCP TCP

;

- -

,

- .

3.1. .

, , .

. -

. ,

Ethernet 6- ,

08-00014-57-69-69. -

. X.25 X.121 -

14 . LocalTalk 3 -

, 2- 1- -

. LocalTalk , -

.

( IP) -

-

. 4

(32 ) , ,

( ) .

4- IP

( ), , , 129.47.6.17.

.

, TCP/IP, -

IP -

, .

IP

. , -

IP .

IP ,

-

. TCP/IP

IP. -

, IP -

.

:

- DARPA,

: DDN Network Information Center SRI International

333 Ravenswood Avenue, Room EJ291 Menlo Park, CA 94025 USA -

DARPA,

.

:

-

, , 129.47

129.47;

- IP

.

3.2.

IP ,

, , , .3.3.

IP, Ethernet. IP

,

Ethernet , -

. , -

-

IP, IP.

IP -

(ARP) ,

Ethernet, Token Ring, ARCnet.

IP -

IP, IP. -

ARP, -

IP .

IP .

.

-

, .

ARP -

, - .

IP .

IP, IP .

IP , -

. IP

IP --

.


p IP p Ethernet

IP

=======T========T========T========T=============T========

p-  堠 .

- - ঠ ࠠ ࠠ

Ethernet

L====================================================-

------- -------------- ---

-------------------- Ethernet-----------------------

.3.3.

3.3.

TCP/IP

-

. , -

. ,

. TCP/IP -

,

, . ,

(routers)

(ICMP) .

""

. ,

IP -

IP, . -

: .

. , IP,

,

IP, IP -

.

, . -

, IP

IP . -

, -

.

IP

, -

. IP -

ARP

. , -

IP, .

IP, IP

.

IP , -

, -

. -

, -

.

3.4. IP

-

. -

IP. IP , -

. ,

IP .


IP

IP IP

=============T=============+==============T==============

񠠠 񠠠 堠

IP IP

L======================================================-

.3.4.

, , -

, -

. -

IP , -

. , , -

.

IP ,

-

. ,

, IP, -

, -

, . ,

.

3.5.

TCP/IP -

(ICMP). ICMP

: ,

.. IP

ICMP

. -

ICMP

, IP.

3.6. : UDP TCP

TCP/IP:

(UDP) -

(TCP). UDP

. TCP

-

IP.

TCP/IP UDP -

. UDP

.

: -

. ,

TCP/IP -

. 1 255 -

-

. -

, , -

, .

UDP .

UDP IP, -

, , Ethernet

. 3.5. IP

UDP

ꠠ 堠

UDP UDP

======T=====T=+==========

UDP

L======================-

--- UDP ----

=========+=========================

IP

L==================================-

--------- IP ----------

==========+===================================+==========

.

ࠠ ࠠ

L=======================================================-

------------------- Ethernet -----------------------

.3.5.

IP ,

IP UDP

UDP.

UDP UDP -

. -

UDP. UDP

, -

.

, 堠

, . -

. TCP/IP -

-

(TCP) - . -

-

, . -

TCP

. , UDP.

, , ,

. ,

, , -

TCP .

UDP, TCP IP. TCP

. , -

, ()

. TCP

.

TCP -

.

,

.

,

- - . -

, ,

. - -

, -

. , "

", -

.

3.7. TCP/IP NetWare 3.11

TCP/IP -

Novell. -

TCP/IP NLM -

IP , -

, NetWare NFS, -

IPX IP. TCP/IP -

, NFS,

, 4.3BSD UNIX

AT&T Streams Transport Layer Interface (TLI). NetWare v3.11

TCP/IP :

NLM NetWare TCP/IP (TCPIP.NLM)

The Simple Network Management Protocol NLM

(SNMP.NLM)

The SNMP event logger NLM (SNMPLOG.NLM)

The TCP/IP Console NLM (TCPCON.NLM)

The IP configuration NLM (IPCONFIG.NLM)

The IPX/IP Tunnel module (IPTUNNEL.LAN)

Sample Internet database files (GATEWAYS, HOSTS,

NETWORKS, PROTOCOL, and SERVICES)

TCP/IP .3.6.


TCP/IP NetWare

-----------------------------------------------------------

+----------------------------------------------------------+

------------ ---------- ----------- --------------

堠 TCPCON SNMPLOG 堠

TLI

L-----T------ L----T----- L-----T----- L------T-------

L--------------+--------------+

============

\/ \/

-------------- -------+------

NetWare

NFS BSD

TLI

L-----T-------- L======T=====- L------T-------

\/ \/ \/

------+----------------------+--------------------+------

TCP/IP NetWare

L--------------------------T------------------------------

----------------+----------------

ODI

L----T----------T----------T------

----------- \/ L-----------

-----+---- -------+------ ------+----

Ethernet Token Ring ARCnet

L----T----- L------T------- L-----T-----

\/ \/ \/

------+-------- --------+--------- -------+-----

𠠠 𠠠

Ethernet Token Ring Arcnet

L--------------- L------------------ L-------------

L-----------------------------------------------------------

.3.6.

TCP/IP

IP IPX.

IP ( UNIX)

, TCP/IP, -

NetWare. Ethernet -

IP 129.1.0.0 IPX 84404556

3.7.


TCP/IP SPX/IPX

================

NetWare Server ---------------

UNIX Server

L=========T======- L-------T-------

129.1.0.3 129.1.0.1

IPX Net=84404556 IP Net=129.1.0.0

------T---+------------T----+------------T-------------

------+-------- -----+--------- 129.1.0.2

NetWare Client NetWare Client -----+-----------

UNIX Workstation

L--------------- L--------------- L-----------------

.3.7.

IP IPX NetWare. -

UNIX -

Netware NFS (.3.8.).

TCP/IP SPX/IPX

--------------------- --------------

UNIX UNIX

L---------T----------- L-----T--------

129.1.0.2 129.1.0.1

IP=129.1.0.0

-----------+----------------T------+-------------------

129.1.03

=================

NetWare

L=========T========-

IPX = 84404556 Token Ring

------------------------+-----------------------

L------T------------------------------------T----

-------+------- -------+-------

NetWare NetWare

L--------------- L---------------

.3.8.

IP NetWare.

.3.9. TCP/IP Netware 1

IP, UNIX IP Ethernet

Netware 2.

IP NetWare

--------------------- --------------

UNIX UNIX

L---------T----------- L-----T--------

129.1.0.2 129.1.0.1

IP=129.1.0.0

-----------+----------------T------+-------------------

129.1.03

=================

NetWare 1

L=========T========-

IPX = 84404556 Token Ring

------------------------+-----------------------

L----T------------------T-----------------T------

-------+------- =============== -------+-------

NetWare NetWare 2 NetWare

L--------------- L================- L---------------

.3.9.

IP, .3.10.-, -

IP IP.

IP -

IPX IP. IP

NetWare.

IP . IP

IP , -

. IP

IPX IP .3.10.

NetWare IP

IP ============

IPX

L======T=====-

----------------- ============ ----------+------

NetWare +-+- IP---+ NetWare

+--- -T-+

L--------T-------- L============- L-----------------

=============== IP

IPX

L================-

.3.10.

4. .

, , -

: -

-.

, :

Uses Dos;

var k : integer;

sendString : string;

Procedure SendToCon(Message : string);

var

reg : registers;

s : array [0..64] of byte;

i : integer;

begin

s[0] := 0;

s[1] := 4;

s[2] := $09;

s[3] := length(Message);

for i := 1 to Length(Message) do

s[i+3] := ord(Message[i]);

reg.ah := $0E1;

reg.bx := reg.ds;

reg.ds := seg(s);

reg.si := ofs(s);

intr($21,reg);

reg.ds := reg.bx;

end;

begin

If ParamCount = 0 then

begin

Writeln('Send message to console utility by S.Perevoznik, 1993');

Writeln('Usage : ssend <message>');

halt;

end;

for k := 1 to paramcount do

begin

SendString := SendString + Paramstr(k) + ' ';

end;

SendToCon(sendString);

Writeln('Message send to console ...');

end.

:

{$F+,O+}

Unit UICNet;

Interface

Uses Dos;

Function GetUserName(ConnectionNumber : byte;

Var ObjectFree : boolean) : string;

Function LocalDisk : boolean;

Procedure SendBroadcastMessage(Message:string;ConnectionNumber:byte);

Implementation

Function GetUserName(ConnectionNumber : byte;

Var ObjectFree : boolean) : string;

var

WordPtr:^Word;

r : registers;

SendPacket : array[0..4] of byte;

ReplyPacket : array[0..64] of byte;

UserName : string;

ObjectType : word;

function GetWord(P: pointer): word;

var

WordPtr :^word;

begin

WordPtr := P;

GetWord := swap(WordPtr^);

end;

begin

SendPacket[2] := $16;

SendPacket[3] := ConnectionNumber;

WordPtr := addr(SendPacket);

WordPtr^:=2;

WordPtr := addr(SendPacket);

WordPtr^ := 62;

r.ah := $e3;

r.ds := seg(SendPacket);

r.si := ofs(SendPacket);

r.es := seg(ReplyPacket);

r.di := ofs(ReplyPacket);

intr($21,r);

if r.al = 0

then

begin

ObjectType := GetWord(addr(ReplyPacket[6]));

if ObjectType = 0 then ObjectFree := true

else

ObjectFree := false;

move(ReplyPacket[8],UserName[1],48);

UserName[0] := chr(48);

GetUserName := Username;

end;

end;

Function LocalDisk : boolean;

var r : registers;

begin

r.ah := $19;

intr($21,r);

r.dl := r.al+1;

r.ah := $e9;

r.al := 0;

r.dh := 0;

intr($21,r);

if r.ah = 128 then localdisk := true

else localdisk := false;

end;

Procedure SendBroadcastMessage(Message:string; ConnectionNumber:byte);

var

r : registers;

WordPtr : ^word;

SendPacket : array [0..160] of byte;

ReplyPacket : array [0..103] of byte;

begin

SendPacket[2] := 0;

SendPacket[3] := 1;

SendPacket[4] := ConnectionNumber;

SendPacket[5] := length(Message);

move(Message[1],SendPacket[6],length(Message));

WordPtr := addr(SendPacket);

WordPtr^ := Length(Message) + 4;

r.ah := $e1;

r.ds := seg(SendPacket);

r.si := ofs(SendPacket);

r.es := seg(ReplyPacket);

r.di := ofs(ReplyPacket);

intr($21,r);

end;

end.

-

, :

uses Dos;

function GetWord(P: pointer): word;

var

WordPtr :^word;

begin

WordPtr := P;

GetWord := swap(WordPtr^);

end;

Function GetLong(P:Pointer): longint;

type long= record

case integer of

1:(Long1: Longint);

2:(Word1,Word2:word);

end;

var LongPtr :^Long;

L : long;

begin

LongPtr := P;

L.Word1 := swap(LongPtr^.Word2);

L.Word2 := swap(LongPtr^.Word1);

GetLong:= L.Long1;

end;

Function GetConnectionInformation(ConnectionNumber:byte;

Var ObjectName : string; var ObjectType : word;

var ObjectID : longint; var LoginTime : string): byte;

var

WordPtr:^Word;

r:registers;

SendPacket : array[0..4] of byte;

ReplyPacket : array[0..64] of byte;

begin

SendPacket[2] := $16;

SendPacket[3] := ConnectionNumber;

WordPtr := addr(SendPacket);

WordPtr^:=2;

WordPtr := addr(SendPacket);

WordPtr^ := 62;

r.ah := $e3;

r.ds := seg(SendPacket);

r.si := ofs(SendPacket);

r.es := seg(ReplyPacket);

r.di := ofs(ReplyPacket);

intr($21,r);

if r.al = 0

then

begin

ObjectID := GetLong(addr(ReplyPacket[2]));

ObjectType := GetWord(addr(ReplyPacket[6]));

move(ReplyPacket[8],ObjectName[1],48);

ObjectName[0] := chr(48);

move(ReplyPacket[56],LoginTime[1],7);

LoginTime[0] := chr(7);

end;

GetConnectionInformation := r.al;

end;

var

ObjectName,LoginTime : string;

ObjectType : word;

ObjectID : longint;

ConnectionNumber, CCode : byte;

begin

ConnectionNumber := 1;

CCode := GetConnectionInformation(ConnectionNumber,

ObjectName,ObjectType,ObjectID,LoginTime);

while (CCode <> 253) and (ConnectionNumber<255)

do

begin

if CCode <> 0

then

writeln('Cod ',CCode,ConnectionNumber)

else if ObjectType <>0 then begin

Writeln(ConnectionNumber,' ',ObjectType,' ',ObjectID);

Writeln(ObjectName);

end;

inc(ConnectionNumber);

CCode := GetConnectionInformation(ConnectionNumber,

ObjectName,ObjectType,ObjectID,LoginTime);

end;

end.

5. .

,

:

; -

; , - 4.0 .

; Joe R. Doupnik and Sergey V. Perevoznik, 1988 - 1993

lprog equ 1 ; 0 for small memory, 1 for large memory model

; Modify lprog to match the memory model

if lprog

x equ 6 ; prologue overhead for large memory model

else

x equ 4 ; ditto, small memory model

endif

begin macro name ; begin a function, near or far

public name

if lprog

name proc far

else

name proc near

endif

endm

; define Borland Pascal segments

; use neither Group nor Class

data segment word public

data ends

cseg segment byte public

assume cs:cseg, ds:data, es:nothing

;--------------------------------

; Extended Open a File func(61) (3DH)

;

; var

; Mode, Handle, RetCode : Integer;

; Filename : String[n];

;

; RetCode := xtndopn(Mode, Handle, Filename);

;

begin xtndopn

push bp

mov bp,sp

push ds

lds si,[bp+x+8] ; put the mode in ax

mov ax,[si]

mov ah,03Dh ; put the function in ah

lds dx,[bp+x] ; ptr to ASCIIZ string

inc dx ; add 1 to get to the beginning of the string

int 21h

jc xtndopx ; carry set means failure

lds di,[bp+x+4] ; put the handle into the variable

mov [di],ax ; if there is no error and

xor ax,ax ; return a 0

xtndopx:pop ds

pop bp

ret 14

xtndopn endp

;--------------------------------

; Get or Set File Attributes(handle) func(67) (43H)

;

; var

; Func, Attribute, ErrCode : Integer;

; Filename : String[n];

;

;ErrCode := setattr(Func, Attribute, Filename);

;

begin setattr

push bp

mov bp,sp

push ds

lds si,[bp+x+8] ; put the subfunction in ax

mov ax,[si]

mov ah,043h ; put the function in ah

lds dx,[bp+x] ; ptr to var desc block for ASCIIZ string

inc dx ; add 1 to get the address of the string

lds si,[bp+x+4] ; put the attribute to set in cx

mov cx,[si]

int 21h

jc setattx ; carry set means failure

lds di,[bp+x+4] ; put the returned attributes in the

mov [di],cx ; variable if there is no error

xor ax,ax ; and return zero

setattx:mov ah,0

pop ds

pop bp

ret 14

setattr endp

;--------------------------------

; End of Job Flag Status func(187) (BBH)

;

; var

; Flag : Integer;

;

;ErrCode := eojstat(Flag);

;

begin eojstat

push bp

mov bp,sp

push ds

lds si,[bp+x] ; put the flag in ax

mov ax,[si]

mov ah,0BBh ; put the function in ah

int 21h

mov ah,0

lds di,[bp+x]

mov [di],ax

pop ds

pop bp

ret 6

eojstat endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Physical Record Lock: Log Record BCH

;

; var

; ErrCode,FileHandle,HiByteOffset,LoByteOffset : Integer

; HiLockLen,LoLockLen,Flags,TimeOut : Integer

;

;ErrCode := PRLH_Log(FileHandle,HiByteOffset,LoByteOffset,HiLockLen,

; LoLockLen,Flags,TimeOut);

;

begin PRLH_Log

push bp

mov bp,sp

push ds

lds si,[bp+x+24] ; FileHandle

mov bx,[si]

lds si,[bp+x+20] ; ByteOffset

mov cx,[si]

lds si,[bp+x+16]

mov dx,[si]

lds si,[bp+x+4] ; AL = Log Flags

mov ax,[si]

lds si,[bp+x+12] ; LockLen

mov si,[si]

lds di,[bp+x+8]

mov di,[di]

lds bp,[bp+x] ; time out

mov bp,[bp]

mov ah,0BCH

int 21H

mov ah,0 ; clear the high byte of the return

pop ds

pop bp

ret 30

PRLH_Log endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Physical Record Lock: Release Rec BDH

;

; var

; FileHandle,HiByteOffset,LoByteOffset,ErrCode,

; HiWordLen,LoWordLen : integer;

; ErrCode := PRLH_Rel(FileHandle,HiByteOffset,LoByteOffset,HiWordLen,

; LoWordLen:integer);

begin PRLH_Rel

push bp

mov bp,sp

push ds

lds si,[bp+x+16] ; FileHandle

mov bx,[si]

lds si,[bp+x+12] ; HiByteOffset

mov cx,[si]

lds si,[bp+x+8] ; LoByte

mov dx,[si]

lds si,[bp+x+4] ; HiWordLen

mov si,[si]

lds di,[bp+x] ; LoWordLen

mov di,[di]

mov ah,0BDH

int 21H

mov ah,0

pop ds

pop bp

ret 22

PRLH_Rel endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Physical Record Lock: Release Clr BEH

;

; var

; FileHandle,HiByteOffset,LoByteOffset,ErrCode,

; HiWordLen,LoWordLen : integer;

; ErrCode := PRLH_Rel(FileHandle,HiByteOffset,LoByteOffset,HiWordLen,

; LoWordLen:integer);

;

begin PRLH_Clr

push bp

mov bp,sp

push ds

lds si,[bp+x+16] ; FileHandle

mov bx,[si]

lds si,[bp+x+12] ; ByteOffset

mov cx,[si]

lds si,[bp+x+8]

mov dx,[si]

lds si,[bp+x+4] ; HiWordLen

mov si,[si]

lds di,[bp+x] ; LoWordLen

mov di,[di]

mov ah,0BEH

int 21H

mov ah,0

pop ds

pop bp

ret 22

PRLH_Clr endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Physical Record Lock: Log Rec FCB BFH

;

; var

; ErrCode,fcb,HiByteOffset,LoByteOffset : Integer;

; HiLockLen,LoLockLen,Flags,TimeOut : Integer;

;

; ErrCode := PRLF_Log(fcb,HiByteOffset,LoByteOffset,HiLockLen,LoLockLen,Flags,TimeOut);

;

begin PRLF_Log

push bp

mov bp,sp

push ds

lds si,[bp+x+24] ; FCB

mov dx,[si]

lds si,[bp+x+20] ; ByteOffset

mov bx,[si]

lds si,[bp+x+16]

mov cx,[si]

lds si,[bp+x+4] ; AL = Log Flags

mov ax,[si]

lds si,[bp+x+8] ; low lock length

mov di,[si]

lds si,[bp+x+12] ; hi lock length

mov si,[si]

mov bp,[bp+x] ; timeout value

mov bp,[bp]

mov ah,0BFH

int 21H

mov ah,0

pop ds

pop bp

ret 28

PRLF_Log endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Physical Record Lock: Rel Rec FCB C0H

;

; var

; ErrCode,fcb,HiByteOffset,LoByteOffset : Integer;

;

; ErrCode := PRLF_Rel(fcb,HiByteOffset,LoByteOffset);

;

begin PRLF_Rel

push bp

mov bp,sp

push ds

lds dx,[bp+x+8] ; FCB

lds si,[bp+x+4] ; ByteOffset

mov bx,[si]

lds si,[bp+x]

mov cx,[si]

mov ah,0C0H

int 21H

mov ah,0

pop ds

pop bp

ret 12

PRLF_Rel endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Physical Record Lock: Clr Rec FCB C1H

;

; var

; ErrCode,fcb,HiByteOffset,LoByteOffset : Integer;

;

; ErrCode := PRLF_clr(fcb,HiByteOffset,LoByteOffset);

;

begin PRLF_Clr

push bp

mov bp,sp

push ds

lds dx,[bp+x+8] ; FCB

lds si,[bp+x+4] ; ByteOffset

mov bx,[si]

lds si,[bp+x]

mov cx,[si]

mov ah,0C0H

int 21H

mov ah,0

pop ds

pop bp

ret 12

PRLF_Clr endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Lock Record Set C2H

;

; var

; ErrCode, Flags, TimeOut : Integer;

;

; ErrCode := PRLS_Lck(Flags,TimeOut);

;

begin PRLS_Lck

push bp

mov bp,sp

push ds

lds si,[bp+x+4] ; AL = Lock flag bits

mov ax,[si]

lds si,[bp+x] ; TimeOut Value

mov bp,[si]

mov ah,0C2h

int 21h

mov ah,0

pop ds

pop bp

ret 10

PRLS_Lck endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Release Record Set C3H

;

; var

; ErrCode : Integer;

;

; ErrCode := PRLS_Rel;

;

begin PRLS_Rel

mov ah,0C3h

int 21h

mov ah,0

ret

PRLS_Rel endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Clear Record Set C4H

;

; var

; ErrCode : Integer;

;

; errcode := PRLS_Clr;

;

begin PRLS_Clr

mov ah,0C4h

int 21h

mov ah,0

ret

PRLS_Clr endp

;--------------------------------

; Semaphores func(197) (C5H) subfunction 00h

;

; var

; RetCode,SemaValu,HiHandle,LoHandle,OpenCnt : Integer;

; Sema4 : String[n];

;

; RetCode := OpenSem(Sema4,SemaValu,HiHandle,LoHandle,OpenCnt);

;

begin OpenSem

push bp

mov bp,sp

push ds

lds dx,[bp+x+16] ; ptr to Semaphore string

; inc dx ; add 1 to get the address of the string

lds si,[bp+x+12] ; set semaphore value

mov cx,[si]

mov ax,0C500h ; set the function

int 21h

mov bh,00h

lds di,[bp+x] ; return the open count

mov [di],bx

lds di,[bp+x+4] ; return low handle

mov [di],cx

lds di,[bp+x+8] ; return high handle

mov [di],dx

mov ah,00h

pop ds

pop bp

ret 22

OpenSem endp

;--------------------------------

; Semaphores func(197) (C5H) subfunction 01h

;

; var

; RetCode,HiHandle,LoHandle,SemaValu,OpenCnt : Integer;

;

; RetCode := ExamSem(HiHandle,LoHandle,SemaValu,OpenCnt);

;

begin ExamSem

push bp

mov bp,sp

push ds

lds si,[bp+x+12] ; hi handle

mov dx,[si]

lds si,[bp+x+8] ; lo handle

mov cx,[si]

mov ax,0C501h ; set function

int 21h

lds di,[bp+x+4] ; return semaphore value

mov [di],cx

mov dh,00h

lds di,[bp+x]

mov [di],dx ; return open count

mov ah,00h

pop ds

pop bp

ret 16

ExamSem endp

;--------------------------------

; Semaphores func(197) (C5H) subfunction 02h

;

; var

; RetCode,HiHandle,LoHandle,TimeOut : Integer;

;

; RetCode := WaitSem(HiHandle,LoHandle,TimeOut);

;

begin WaitSem

push bp

mov bp,sp

push ds

lds si,[bp+x+8] ; hi handle

mov dx,[si]

lds si,[bp+x+4] ; lo handle

mov cx,[si]

lds si,[bp+x]

mov bp,[si] ; set time out

mov ax,0C502h ; set function

int 21h

mov ah,00h

pop ds

pop bp

ret 12

WaitSem endp

;--------------------------------

; Semaphores func(197) (C5H) subfunction 03h

;

; var

; RetCode,HiHandle,LoHandle : Integer;

;

; RetCode := SigSem(HiHandle,LoHandle);

;

begin SigSem

push bp

mov bp,sp

push ds

lds si,[bp+x+4] ; hi handle

mov dx,[si]

lds si,[bp+x] ; lo handle

mov cx,[si]

mov ax,0C503h ; set function

int 21h

mov ah,00h

pop ds

pop bp

ret 8

SigSem endp

;--------------------------------

; Semaphores func(197) (C5H) subfunction 04h

;

; var

; RetCode,HiHandle,LoHandle : Integer;

;

; RetCode := ClosSem(HiHandle,LoHandle);

;

begin ClosSem

push bp

mov bp,sp

push ds

lds si,[bp+x+4] ; hi handle

mov dx,[si]

lds si,[bp+x] ; lo handle

mov cx,[si]

mov ax,0C504h ; set function

int 21h

mov ah,00h

pop ds

pop bp

ret 8

ClosSem endp

;--------------------------------

; Get or Set Lock Mode func(198) (C6H)

;

; var

; Mode,Func : Integer;

;

; Mode := setlck(Func);

;

begin setlck

push bp

mov bp,sp

push ds

lds si,[bp+x]

mov ax,[si] ; set the subfunction

mov ah,0C6h ; set the function

int 21h

mov ah,0

pop ds

pop bp

ret 4

setlck endp

;--------------------------------

; Transactional Backout func(199) (C7H)

;

; var

; RetCode, Func : Integer;

;

; RetCode := BakOuts(Func);

;

begin BakOuts

push bp

mov bp,sp

push ds

lds si,[bp+x] ; set the subfunction

mov ax,[si]

mov ah,0C7h ; set the function

int 21h

mov ah,0

pop ds

pop bp

ret 4

BakOuts endp

;--------------------------------

; Begin transaction func(200) (C8H)

;

; var

; RetCode,Mode : Integer;

;

; RetCode := btrans(Mode);

;

begin btrans

mov ah,0C8h

call arg1t

ret 4

btrans endp

;--------------------------------

; End Transaction func(201) (C9H)

;

; var

; RetCode : Integer;

;

; RetCode := etrans;

;

begin etrans

mov ah,0C9H

int 021h

mov ah,00h

ret

etrans endp

;--------------------------------

; Exc.log File (202) (CA)

;

; var

; RetCode, FcbAddr : Integer;

;

; RetCode := exclog(FcbAddr);

;

begin exclog

mov ah,0CAH

call arg1f

ret 4

exclog endp

;--------------------------------

; Exc Lock Set func(203) (CBH)

;

; var

; RetCode, Mode : Integer;

;

; RetCode := exclcks(Mode);

;

begin exclcks

mov ah,0CBH

call arg1

ret 4

exclcks endp

;--------------------------------

; Exclusive file unlock (204) (CC)

;

; var

; RetCode, FcbAddr : Integer;

;

; RetCode := exculkf(FcbAddr);

;

begin exculkf

mov ah,0CCH

call arg1f

ret 4

exculkf endp

;--------------------------------

; Exclusive Unlock Set (205)(CD)

;

; var

; RetCode : Integer;

;

; RetCode := exculks;

;

begin exculks

mov ah,0CDH

int 21h

mov ah,00h

ret

exculks endp

;--------------------------------

; Exc Clear file func(206) (CEH)

;

; var

; RetCode, FcbAddr : Integer;

;

; RetCode := excclrf(FcbAddr);

;

begin excclrf

mov ah,0CEH

call arg1f

ret 4

excclrf endp

;--------------------------------

; Exc Clear Set func(207) (CFH)

;

; var

; RetCode : Integer;

;

; RetCode := excclrs;

;

begin excclrs

mov ah,0CFH

int 21h

mov ah,00h

ret

excclrs endp

;--------------------------------

; Log Record(s) func(208) (D0H)

;

; var

; RetCode, Flag, Timeout : Integer ;

; RecStr : String[n];

;

; RetCode := reclog(RecStr,Flag,Timeout);

;

begin reclog

push bp

mov bp,sp

push ds

lds si,[bp+x+4] ; load flags

mov ax,[si]

lds si,[bp+x] ; get timeout

mov si,[si]

lds dx,[bp+x+8] ; get ptr to string

; inc dx

mov bp,si ; move timeout to BP

mov ah,0D0h

int 21h

mov ah,0

pop ds

pop bp

ret 14

reclog endp

;--------------------------------

; Record Lock func(209) (D1H)

;

; var

; RetCode, Mode : Integer;

;

; RetCode := reclck(Mode);

;

begin reclck

push bp

mov bp,sp

push ds

lds si,[bp+x]

mov bp,[si]

mov ah,0D1h

int 21h

mov ah,0

pop ds

pop bp

ret 6

reclck endp

;--------------------------------

; Record Unlock func(210) (D2H)

;

; var

; RetCode : Integer;

; Semaphore : String[n];

;

; RetCode := reculk(Semaphore);

;

begin reculk

mov ah,0D2H

call arg1a

ret 4

reculk endp

;--------------------------------

; Unlock Record Set func(211) (D3H)

;

; var

; RetCode : Integer;

;

; RetCode := reculks;

;

begin reculks

mov ah,0D3H

int 21h

mov ah,00h

ret

reculks endp

;--------------------------------

; Record Clear func(212) (D4H)

;

; var

; RetCode : Integer;

; Semaphore : String[n];

;

; RetCode := recclr(Semaphore);

;

begin recclr

mov ah,0D4H

call arg1a

ret 4

recclr endp

;--------------------------------

; Clear record set func(213) (D5H)

;

; var

; RetCode : Integer;

;

; RetCode := recclrs;

;

begin recclrs

mov ah,0D5H

int 21h

mov ah,00h

ret 4

recclrs endp

;--------------------------------

; End of Job func(214) (D6H)

;

; var

; RetCode : Integer;

;

; RetCode := eoj;

;

begin eoj

mov ah,0D6H

int 21h

mov ah,00h

ret 4

eoj endp

;--------------------------------

; Logout System func(215) (D7H)

;

; var

; RetCode : Integer;

;

; RetCode := sysout;

;

begin sysout

mov ah,0D7H

int 21h

mov ah,00h

ret 4

sysout endp

;--------------------------------

; Vol Statistics func(218) (DAH)

;

; var

; RetCode,volume : Integer;

; reply : String[n];

;

; RetCode := volstat(volume, reply);

begin volstat

mov ah,0DAh

push bp

mov bp,sp

push ds

push es

lds si,[bp+x+4] ; addr for the volume number

mov dx,[si] ; get the volume number

les di,[bp+x] ; ptr to reply buffer

inc di ; add 1 to get the address of the string

int 21h

mov ah,00h

pop es

pop ds

pop bp

ret 8

volstat endp

;--------------------------------

; Local Disks func(219) (DBH)

;

; var

; NumDisks : Integer;

;

; NumDisks := locdrv;

;

begin locdrv

mov ah,0DBH

int 21h

mov ah,00h

ret

locdrv endp

;--------------------------------

; WorkStation ID func(220) (DCH)

;

; note: This routine returns the station number as an integer.

; It can also be returned in ASCII with this call.

;

; var

; StationNum : Integer;

;

; StationNum := wsid;

;

begin wsid

mov ah,0DCH

int 21h

mov ah,00h

ret

wsid endp

;--------------------------------

; Set Error mode func(221) (DDH)

;

; var

; mode : Integer;

;

; errmode(mode);

;

begin errmode

mov ah,0DDH

call arg1

ret 4

errmode endp

;--------------------------------

; Broadcast Mode func(222) (DEH)

;

; var

; mode : Integer;

;

; bcsmode(mode);

;

begin bcsmode

mov ah,0DEH

call arg1

ret 4

bcsmode endp

;--------------------------------

; Modify LST Device func(223) (DFH)

;

; var

; RetCode, Mode : Integer;

;

; RetCode := ctlspl(Mode);

;

begin ctlspl

mov ah,0DFh

call arg1

ret 4

ctlspl endp

;--------------------------------

; Spool Request func(224) (E0H)

;

; var

; ErrCode : Integer;

; RequestBlock, Reply : String[n];

;

; ErrCode := splreq(RequestBlock, Reply);

;

begin splreq

mov ah,0E0h

call req_rep

ret 8

splreq endp

;--------------------------------

; Pipe Request func(225) (E1H)

;

; var

; ErrCode : Integer;

; RequestBlock, Reply : String[n];

;

; ErrCode := pipreq(RequestBlock, Reply);

;

begin pipreq

mov ah,0E1h

call req_rep

ret 8

pipreq endp

;--------------------------------

; Directory Path func(226) (E2H)

;

; var

; ErrCode : Integer;

; RequestBlock, Reply : String[n];

;

; ErrCode := dpath(RequestBlock, Reply);

;

begin dpath

mov ah,0E2h

call req_rep

ret 8

dpath endp

;--------------------------------

; Login system func(227) (E3H)

;

; var

; ErrCode : Integer;

; RequestBlock, Reply : String[n];

;

; ErrCode := syslog(RequestBlock, Reply);

;

begin syslog

mov ah,0E3h

call req_rep

ret 8

syslog endp

;--------------------------------

; Set File Attribute func(228) (E4H)

;

; var

; RetCode, FcbAddr, Attribute : Integer;

;

; RetCode := fattr(FcbAddr, Attribute);

;

begin fattr

push bp

mov bp,sp

push ds

lds si,[bp+x]

mov cx,[si] ; cx = attribute

lds dx,[bp+x+4] ; dx = address of fcb

mov ah,0E4h

int 21h

mov ah,0

pop ds

pop bp

ret

fattr endp

;--------------------------------

; Update file size func(229) (E5H)

;

; var

; ErrCode,FcbAddr : Integer;

;

; ErrCode := updfcb(FcbAddr);

;

begin updfcb

mov ah,0E5H

call arg1f

ret 4

updfcb endp

;--------------------------------

; Copy File to File func(230) (E6H)

;

; var

; RetCode,FcbSource,FcbDest : Integer;

; CountLow, CountHigh : Integer;

;

; RetCode := cpyfile(FcbSource, FcbDest, CountLow, CountHigh)

;

;

begin cpyfile

mov ah,0E6h

push bp

mov bp,sp

push ds

push es

lds si,[bp+x] ; addr of the high byte cnt

mov dx,[si] ; dx=high word of byte cnt

lds si,[bp+x+4] ; addr low word of byte cnt

mov cx,[si] ; cx=low 16 bits of count

les di,[bp+x+8] ; address of dest fcb

lds si,[bp+x+12] ; address of the source fcb

int 21h

mov ah,0

pop es

pop ds

pop bp

ret 16

cpyfile endp

;--------------------------------

; get time / date string func(231) (E7H)

;

; var

; time : String[n];

;

; nettod(time);

;

; where time is a string of the form Y M D H M S

;

begin nettod

mov ah,0E7h

call arg1a

ret 4

nettod endp

;--------------------------------

; Set Close mode func(232) (E8H)

;

; var

; mode : Integer;

;

; clsmode(mode);

;

begin clsmode

mov ah,0E8H

call arg1wor

ret 4

clsmode endp

;--------------------------------

; Shell Base Status func(233) (E9H)

;

; var

; RetFlags, drive : Integer;

;

; RetFlags := drvmap(drive);

;

begin drvmap

mov ax,0E900h

call arg1

ret 4

drvmap endp

;--------------------------------

; Return Shell Version func(234) (EAH)

;

; var

; RetCode, Mode : Integer;

; EnvirStr : String[n];

;

; RetCode := retshl(EnvirStr, Mode);

;

begin retshl

push bp

mov bp,sp

push ds

push es

les di,[bp+x+4] ; set es:di to point at the buffer

inc di ; point di at the start of the data area

lds si,[bp+x] ; put the mode into al

mov ax,[si]

mov ah,0EAh

int 21h

mov ah,00h

pop es

pop ds

pop bp

ret 8

retshl endp

;--------------------------------

; ascii log File (235) (EB)

;

; var

; RetCode, Flags, TimeOut : Integer;

; Asciiz : String[n];

;

; RetCode := asclog(Flags, TimeOut, Asciiz);

;

begin asclog

push bp

mov bp,sp

push ds

lds si,[bp+x+8]

mov ax,[si] ; flags into al

lds dx,[bp+x] ; pointer to the asciiz string

lds si,[bp+x+4]

mov bp,[si] ; time out into bp

mov ah,0EBH

int 21h

mov ah,00h

pop ds

pop bp

ret 12

asclog endp

;--------------------------------

; ASCIIZ file unlock (236) (EC)

;

; var

; RetCode : Integer;

; Asciiz : String[n];

;

; RetCode := asculkf(Asciiz);

;

begin asculkf

mov ah,0ECH

call arg1a

ret 4

asculkf endp

;--------------------------------

; ASCIIZ Clear file func(237) (EDH)

;

; var

; RetCode : Integer;

; Asciiz : String[n];

;

; RetCode := ascclrf(Asciiz);

;

begin ascclrf

mov ah,0EDH

call arg1a

ret 4

ascclrf endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Get Physical Station Number EEH

;

; var

; StationNo : Integer;

;

; StationNo := Get_PSN;

;

begin Get_PSN

mov ah,0EEh

int 21h

mov ah,0

ret

Get_PSN endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Get Shell Table Addresses (239) EFH

;

; var

; Mode,Segment,Offset : Integer;

;

; Get_STA(Mode,Segment,Offset);

;

begin Get_STA

push bp

mov bp,sp

push es

push ds

mov si,[bp+x+8] ; get the mode

mov ax,[si]

mov ah,0EFh ; set the function

int 21h

lds di,[bp+x+4] ; store the segment location

mov [di],es

lds di,[bp+x] ; store the offset location

mov [di],si

pop ds

pop es

pop bp

ret 12

Get_STA endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Set Preferred File Server (240) F0H

;

; var

; RetServer, Mode, NewServ : Integer;

;

; RetServer := SetServ(Mode,NewServ);

;

begin SetServ

push bp

mov bp,sp

push ds

mov si,[bp+x+4] ; get the mode

mov ax,[si]

mov di,[bp+x] ; set the preferred server number

mov dx,[di]

mov ah,0F0h ; set the function

int 21h

mov ah,0

pop ds

pop bp

ret 6

SetServ endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; Attach/Detach To File Server (241) F1H

;

; var

; RetCode, Mode, NewServ : Integer;

;

; RetCode := ModServ(Mode,NewServ);

;

begin ModServ

push bp

mov bp,sp

push ds

lds si,[bp+x+4] ; get the mode

mov ax,[si]

lds di,[bp+x] ; set the preferred server number

mov dx,[di]

mov ah,0F1h ; set the function

int 21h

mov ah,0

pop ds

pop bp

ret 6

ModServ endp

;-------------------------------

; Place a single integer argument into dx

; with a return code

arg1 proc near

push bp

mov bp,sp

push ds

lds si,[bp+x+2]

mov dx,[si] ; dx gets the argument

int 21h

mov ah,0 ; clear ah for al return code

pop ds

pop bp

ret

arg1 endp

;--------------------------------

; Place a single integer argument into bp

; for use with time outs - with a return code

arg1t proc near

push bp

mov bp,sp

push ds

lds si,[bp+x+2]

mov bp,[si] ; dx gets the argument

int 21h

mov ah,0 ; clear ah for al return code

pop ds

pop bp

ret

arg1t endp

;--------------------------------

; Process an fcb address in a

; function call with a return code

arg1f proc near

push bp

mov bp,sp

push ds

lds dx,[bp+x+2] ; dx gets the argument

int 21h

mov ah,0 ; clear ah for al return code

pop ds

pop bp

ret

arg1f endp

;--------------------------------

; Process a single string argument in a

; function call with a return code

arg1a proc near

push bp

mov bp,sp

push ds

lds dx,[bp+x+2] ; ptr to parameter string

; inc dx ; add 1 to get the address of the string

int 21h

mov ah,0 ; clear ah for al return code

pop ds

pop bp

ret

arg1a endp

;----------------------------

; Perform a single integer argument

; but without a return code

arg1wor proc near

push bp

mov bp,sp

push ds

lds si,[bp+x+2]

mov dx,[si] ; dx gets the arg (or ptr)

int 21h

pop ds

pop bp

ret

arg1wor endp

;----------------------------

; Perform a single string argument

; but without a return code

arg1awor proc near

push bp

mov bp,sp

push ds

lds dx,[bp+x+2]

inc dx ; add 1 to get the start of the string

int 21h

pop ds

pop bp

ret

arg1awor endp

;----------------------------

; Handle a request$ and reply$ function

; with error code

req_rep proc near

push bp

mov bp,sp

push ds

push es

lds si,[bp+x+6] ; ptr to req. string

inc si ; add 1 to get the address of the string

les di,[bp+x+2] ; ptr to var desc block for reply buf

inc di ; add 1 to get the address of the string

pushf ; save the direction flag

int 21h

popf

mov ah,0

pop es

pop ds

pop bp

ret

req_rep endp

cseg ends

end

6. ۠ Ƞ N E T W A R E

NetWare Novell -

" -

". -

(F: G: ...).

,

. -

-

.

-

: -

( )

.

, -

MBR, BOOT . -

NetWare. " " NetWare

MBR . ,

NetWare. BOOT- -

0- .

MBR, NetWare. 0-

, , , -

. -

0- . -

, .

DOS, -

NetWare , , -

.

.

, -

.

. ,

( -

). .

-

"" NetWare.

NetWare : -

; -

, p ( -

); - -

.

-

.

DOS

. -

. -

.

.  

""-. -

.

- NetWare.


.

1. A- NetWare. (13 c.)

..

2. - NetWare. (66 .)

..

3. . (45 .)

..

4. Texece cpeca oax cee. (27 .)

apo A.B.

5. NetWare

Novell. (55 .) ..

6.

NetWare 386. (49 .) ..

7. NetWare 386. (86 .) ..

8. DOS ODI NetWare 386.

(26 .) ..

9. Cpyypa aaoa, cpyypa ooaee ccea

a ce NetWare (62 cp.) yco B.E.

10. .

NetWare 386.

(152 .) ..

11. NetWare 386.

(83 .) .

12. NetWare 386.

(51 .) ..

13. ⠠

Novell. (42 .) ..

14. Novell.

(47 .) ..

15. , ,

Novell.

(79 .) ..

16.

NetWare Novell.

(41 .) ..

17. FoxBase+ Clipper .

(17 .) ..

18. ,

1. 2. 3. TCP/IP 4. 5. 6.

 

 

 

! , , , .
. , :