Novell Home

TID100899 - get connections using a file misdocumented

From Developer Community

The assembly API call get connections using a file is misdocumented . The documentation should read as follows, in the detailed description.

DETAILED DESCRIPTION

Get Connections Using A File

NAME Get Connections Using A File - Returns all logical connections using the file specified by Directory Handle and File Path

NetWare Server: 3.11, 4.0

Lite: None

On Entry


AL23 (17h)

BX Number of fragments in request packet. 5 fragment maximum. DX Number of fragments in reply packet. 5 fragment maximum. CX Handle to valid connection table entry. DS:SI Pointer to fragment list for request packet ES:DI Pointer to fragment list for reply packet

On Exit

AH Completion Code Type. 0 indicates successful.

AL Completion Code. 0 indicates successful.

Note All other registers preserved.


Request Packet

Offset Request Packet Contents Bytes Remarks

0 Request Packet Length 2 Length of the request packet starting at offset two (2). The first two bytes designating the length of the packet are not included.

2 236 (ECh) 1 Subfunction code

3 DataStream 1 Contains the data stream number if the name space is Macintosh. A value of 0 is the resource fork and a value of 1 is the data fork. If DOS, the value is always 0.

4 Volume Number 1 Identifies the volume on which the file exists.

5 Directory Entry 4 The Directory Entry number, indicating the file or directory path. Index to File Server?s directory tables. Must be associated with volume number. The value returned from Convert Path to Directory Entry must be long swapped before it is place in this field

9 Last Record Seen 2 Last record for which information was returned. Set to zero (0) on the first call.


Reply Packet


OffsetReply Packet ContentsBytesRemarks

0 Next Request Record 2 The value that Last Record Seen must be set to in the next call. 2 Use Count 2 Number of tasks opening or logging the file. 4 Open Count 2 Number of tasks having the file open. 6 Open For Read Count 2 Number of logical connections having the file open for reading. 8 Open For Write Count 2 Number of logical connection having the file open for writing. 10 Deny Read Count 2 Number of logical connections having denied other connections the right to read from the file. 12 Deny Write Count 2 Number of logical connections having denied other connections the right to write to the file. 14 Lock Flag 1 0x00 Not locked exclusively 0xFE Locked by a file lock 0xFF Locked by Begin Share File Set 15 Fork Count 1 16 Number Of Records 2 Number of records that follow. The number of times the remaining fields repeat. 18 Connection Number 2 Logical connection number of the workstation using the file. 20 Task Number 2 Task number using the file. 22 Lock Type 1 See Remarks below. 23 Access Flag 1 Repeats number of record times. 24 Lock Flag 1 Repeats number of record times.

Connection Number n (2), Task Number n (2) Lock Type n (1), Access Control n (1), and Lock Flag n (1) repeat Number Of Records times. Where n is one of the connections using the file.


Completion Codes


AH=88h DOS Requester Completion Codes (REQSTR_ERR)


AL Remarks

0 SUCCESS: The requester has filled in the reply packet. Non-0 Unsuccessful. The contents of the reply packet are invalid. 01h Invalid Connection 50h Too Many Rep Frags


AH=89h Server Completion Codes (SERVER_ERR)

AL Remarks

0 Successful 96h Server Out Of Memory C6h No Console Rights


Remarks

Get Connections Using A File must be repeated until Next Request Record (returned in the reply message) is 0.

There is one record for every connection using or trying to use the specified file.

Lock Type contains the following bit flags: BitsStatus

76543210 xxxxxxx1 Locked xxxxxx1x Open Shareable xxxxx1xx Logged xxxx1xxx Open Normal x1xxxxxx TTS Holding Lock 1xxxxxxx Transaction Flag Set On This File

arm005.exe

arm005.exe20.2 K2005-04-06

--devsup

Novell® Making IT Work As One

© 2009 Novell, Inc. All Rights Reserved.