NWScanConnInformation(3nw)


NWScanConnInformation -- returns connection information for multiple connections

Synopsis

   #include <nwconnec.h> 
   

NWCCODE N_API NWScanConnInformation( pnuint32 scanIndex, nuint scanInfoLevel, nuint scanInfoLen, nptr scanConnInfo, nuint scanFlags, nuint returnInfoLevel, nuint returnInfoLen, pnuint32 connRef, nptr returnConnInfo);

Description

The parameters are as follows:

scanIndex
(IN) Points to the index to be used on the next iteration of the scan; set to zero initially.

scanInfoLevel
(IN) Indicates the level of information returned.

scanInfoLen
(IN) Indicates the length of scanConnInfo in bytes.

scanConnInfo
(IN) Points to the data describing one piece of connection information.

scanFlags
(IN) Indicates whether to return connection information for connections matching or unmatching the scan criteria.

returnInfoLevel
(IN) Indicates the information to be returned.

returnInfoLen
(IN) Indicates the size, in bytes, of returnConnInfo.

connRef
(OUT) Points to the connection reference associated with the returned information.

returnConnInfo
(OUT) Points to the returned information.

Return values

0x0000
SUCCESSFUL

No More Entries

Level Not Supported

Buffer Overflow

Notices

NWScanConnInformation will return one piece of information or the full structure of connection information for one connection at a time. It is designed to scan for connections based on any piece of connection information. For example, if you want to scan for all connections in the Directory Services tree ``ACME'', call NWScanConnInformation with the following parameters:

scanInfoLevel
NWC_CONN_INFO_TREE_NAME

scanConnInfo
``ACME''

scanFlags
NWC_MATCH_EQUALS | NWC_RETURN_PUBLIC | NWC_RETURN_LICENSED
scanInfoLevel and returnInfoLevel can have the following values:

NWC_CONN_INFO_INFO_VERSION
0x0001

NWC_CONN_INFO_AUTH_STATE
0x0002

NWC_CONN_INFO_BCAST_STATE
0x0003

NWC_CONN_INFO_CONN_REF
0x0004

NWC_CONN_INFO_TREE_NAME
0x0005

NWC_CONN_INFO_WORKGROUP_ID
0x0006

NWC_CONN_INFO_SECURITY_STATE
0x0007

NWC_CONN_INFO_CONN_NUMBER
0x0008

NWC_CONN_INFO_USER_ID
0x0009

NWC_CONN_INFO_SERVER_NAME
0x000A

NWC_CONN_INFO_TRAN_ADDR
0x000B

NWC_CONN_INFO_NDS_STATE
0x000C

NWC_CONN_INFO_MAX_PACKET_SIZE
0x000D

NWC_CONN_INFO_LICENSE_STATE
0x000E

NWC_CONN_INFO_PUBLIC_STATE
0x000F

NWC_CONN_INFO_SERVICE_TYPE
0x0010

NWC_CONN_INFO_DISTANCE
0x0011

NWC_CONN_INFO_RETURN_ALL
0xFFFF
If scanInfoLevel contains NWC_CONN_INFO_RETURN_ALL, information for all connections will be returned.

scanFlags indicates if the scan is supposed to return matching connections or unmatching connections. It does not allow any other conditions (such as greater than or less than). scanFlags can have the following values:

NWC_MATCH_NOT_EQUALS
0x0000

NWC_MATCH_EQUALS
0x0001

NWC_RETURN_PUBLIC
0x0002

NWC_RETURN_PRIVATE
0x0004

NWC_RETURN_LICENSED
0x0008

NWC_RETURN_UNLICENSED
0x0010
If you specify returnInfoLevel to be NWC_CONN_INFO_RETURN_ALL, a full structure is returned. You must supply data for all pointers in NWCConnInfo including the tree name, workgroup ID, server name, and transport address. However, if you do not want a piece of information to be returned, substitute a NULL pointer.

The type of data contained in scanConnInfo depends on the level of information being scanned. For example, if you are using the scan to find all connections with a particular authentication state, scanConnInfo would be a ``pnuint'' since authentication is described as a nuint in the return structure. If the scan if being used to find all connections in a particular Directory Services tree, scanConnInfo would be a ``pnstr''. scanConnInfo will always be a single indirect pointer to the data describing the scan.

If you want to find all the connections in the ``ACME'' Directory Services tree, call NWScanConnInformation with scanFlag set to NWC_MATCH_NOT_EQUALS. scanFlag is also used to tell the requester whether to return private or public, licensed or unlicensed connections. Usually, NWScanConnInformation is called to return public, licensed connections.

Services

Connection

NCP calls

0x2222 23 17 Get File Server Information
0x2222 23 22 Get Station's Logged Info (old)
0x2222 23 28 Get Station's Logged Info
0x2222 104 1 Ping for NDS NCP

 
 0x2222   23    17   Get File Server 
                     Information 
 0x2222   23    22   Get Station's 
                     Logged Info 
                     (old) 
 0x2222   23    28   Get Station's 
                     Logged Info 
 0x2222   104   1    Ping for NDS 
                     NCP 

References

NWGetConnInformation(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.