Novell is now a part of Micro Focus

The NetWare API: Getting File Server Configuration Information, Part II

Articles and Tips: article

MORGAN B. ADAIR
Senior Research Engineer
Developer Information

01 Mar 1997


Part II of a series that discusses server configuration parameters returned by the File Server Environment APIs. Covers component versions, LAN/router, file system, disk, and media manager functions.

Introduction

Part I of this DevNote series started to document some of NetWare's File Server Environment functions. This set of functions enables you to get vast quantities of information about a file server. Unfortunately, the Novell SDK does not document all the server configuration parameters returned by File Server Environment APIs. In the first installment, I divided the file server environment APIs into three groups, depending on how dynamic the data returned by the API is:

Server Configuration Data-things like how much memory is in the server, and what type of CPU it has. These items rarely change.

Configurable Parameters-like the server's SET console parameters, these can be changed by the console operator, but are unlikely to change from one minute to the next.

Statistics-like the number of packets that a particular protocol stack has routed, statistics change constantly.

This DevNote series will only deal with the first two categories. I further divided the file server environment functions into 10 groups. Part I covered the following groups:

  • Physical Configuration

  • Set Commands

  • Communication Protocols

  • NLMs

  • Users

Part II covers the remaining 5 groups:

  • Component Versions

  • LAN/Router

  • File System

  • Disk

  • Media Manager

Component Versions

NWGetFileServerDescription

Gets the NetWare version and other descriptive information about a server. Available on NetWare versions 2, 3, and 4. You do not need to be a console operator to call this function.


Returned Parameter Name
Description

companyName

Points to the name of the company providing the version of NetWare (80 characters, optional).

revision

Points to the NetWare version and revision description string (80 characters, optional).

revisionDate

Points to the revision date in the form xx/xx/xx. For example: 12/16/91 (24 characters, optional).

copyrightNotice

Points to the copyright notice (80 characters, optional).

NWGetFileServerExtendedInfo

Get version numbers for server components. Available on NetWare versions 2, 3, and 4. You must be a console operator to call this function.


Returned Parameter Name
Description

accountingVer

VAPVer

queueingVer

printServerVer

virtualConsoleVer

securityVer

internetBridgeVer

8-bit integers giving component version number.

NWGetFileServerInformation

Get general server version and connection information. Available on NetWare versions 2, 3, and 4. You do not need to be a console operator to call this function.


Returned Parameter Name
Description

serverName

The name of NetWare server (48 bytes).

majorVer

Points to the major NetWare version number.

minVer

Points to the minor NetWare version number.

rev

Points to the revision number of the NetWare OS on NetWare server.

maxConns

For NetWare v2.x and v3.x, points to a static value indicating the maximum number of client connections the server will support. For NetWare v4.x, points to a dynamic value indicating the maximum number of simultaneous client connections the server has had since it was last started.

numVolumes

Points to the maximum number of volumes the server will support.

SFTLevel

Points to the SFT level the server supports:

1 hot disk error fix

2 disk mirroring and transaction tracking

3 physical NetWare server mirroring

TTSLevel

Points to the TTS Level of NetWare server operating system.

NWGetFileServerVersionInfo

Get version numbers of server components. Available on NetWare versions 2, 3, and 4. You must be a console operator to call this function.


Returned Parameter Name
Description

serverName [48]

The name of NetWare server (48 bytes).

fileServiceVersion

Points to the major NetWare version number.

fileServiceSubVersion

Points to the minor NetWare version number.

maximumServiceConnections

For NetWare v2.x and v3.x, points to a static value indicating the maximum number of client connections the server will support. For NetWare v4.x, points to a dynamic value indicating the maximum number of simultaneous client connections the server has had since it was last started.

maxNumberVolumes

Points to the maximum number of volumes the server will support.

revision

Points to the NetWare revision number.

SFTLevel

Points to the SFT level the server:

1 hot disk error fix

2 disk mirroring and transaction tracking

3 physical NetWare server mirroring

TTSLevel

Points to the TTS Level of NetWare server operating system.

accountVersion

VAPVersion

queueVersion

printVersion

virtualConsoleVersion

8-bit component version numbers.

internetBridge

The internet bridge support version number.

NWGetNetworkSerialNumber

Get the server's serial number. Available on NetWare versions 3, and 4. You must be a console operator to call this function.


Returned Parameter Name
Description

serialNum

Points to the NetWare server's serial number.

appNum

Points to the application number.

NWGetOSVersionInfo

Get version and configuration information for a server. Available on all versions of NetWare 4. You do not need to be a console operator to call this function.


Returned Parameter Name
Description

vconsoleVersion

The console version number. Also tracks the packet format. Returned by many NetWare v4 FSE APIs.

vconsoleRevision

The console version revision number. Also tracks the packet format. Returned by many NetWare v4 FSE APIs.

OSMajorVersion

The major version number of the OS.

OSMinorVersion

The minor version number of the OS.

OSRevisionNum

The version revision letter of the OS.

accountingVersion

The version of the accounting subsystem.

VAPVersion

Unused.

queueingVersion

The queueing version number.

securityRestrictionsLevel

The security restriction version number.

bridgingSupport

The internet bridge support version number.

maxNumOfVolumes

Points to the maximum number of volumes the server will support.

numOfConnSlots

The maximum number of connections that can be used simultaneously on the server.

maxLoggedInConns

For NetWare v2.x and v3.x, points to a static value indicating the maximum number of client connections the server will support. For NetWare v4.x, points to a dynamic value indicating the maximum number of simultaneous client connections the server has had since it was last started.

maxNumOfNameSpaces

The maximum number of name spaces that can be simultaneously loaded on the serve

maxNumOfLans

The maximum number of LAN cards that can be used on the server.

maxNumOfMediaTypes

The maximum number of different media types allowed on the server.

maxNumOfProtocols

The maximum number of protocol stacks that can be used on the server.

maxMaxSubdirTreeDepth

The maximum depth of directories that can be used on the server.

maxNumOfDataStreams

The maximum number of data streams that can be used on the server.

maxNumOfSpoolPrinters

The maximum number of spool printers (default queue assignments) that can be used on the server.

serialNum

The serial number of the server.

applicationNum

Included for backward compatibility (was originally intended to provide copy protection for networked applications, but this functionality has been disabled).

LAN/Router

NWGetActiveLANBoardList

Returns an array of active LAN card numbers. Available on all versions of NetWare 4. You do not need to be a console operator to call this function.


Returned Parameter Name
Description

MaxNumOfLANs

Maximum number of LAN cards supported by the server.

LANLoadedCount

Number of active LAN cards (one card number value in the boardNums array for each active card).

boardNums[FSE_MAX_NUM_OF_LANS]

Array containing the card numbers for all active LAN cards. Call NWGetLANConfigInfo to get more information about each card.

NWGetLANConfigInfo

Get configuration and version information for a specified LAN card. Available on all versions of NetWare 4. You must be a console operator to call this function.


Returned Parameter Name
Description

DriverCFG_MajorVersion

The major version number of the configuration table.

DriverCFG_MinorVersion

The minor version of the configuration table.

DriverNodeAddress [6]

The node address of the LAN card (6 bytes, 12 hexadecimal digits).

DriverModeFlags

The mode supported by the driver:

0x0001 Indicates whether the driver was real or a dummy; set to 1.

0x0002 Set if the driver uses DMA.

0x0004 Indicates to routers to pass router table changes when they occur, rather than forwarding all RIP and SAP packets; set only if bit 4 is set.

0x0008 The driver supports multicasting.

0x0010 Set if the driver can bind with a protocol stack without providing a network number.

0x0030 The driver supports raw sends, no prepending any hardware header.

0x0400 Set if the HSM can handle fragmented RCBs.

0x2000 Set if the HSM can handle promiscuous RCBs.

0xC000 Indicates the driver node address, as follows:

00 Format is unspecified; the node address is assumed to be in the physical layers' native format

01 Illegal combination

10 Driver node address is canonical

11 Driver node address is noncanonical

DriverBoardNum

The logical card number (1 255) assigned to the LAN card by the LSL service.

DriverBoardInstance

The number of the physical card the logical card is using.

DriverMaxSize

The maximum send or receive packet size in bytes the card can handle.

DriverMaxRecvSize

The maximum packet size in bytes that the LAN card can receive.

DriverRecvSize

The maximum packet size in bytes a protocol stack can send or receive using this card.

DriverCardID

The number assigned to the LAN card by Novell (hardcoded into the driver).

DriverMediaID

The number identifying the link level envelope used by the MLID.

DriverMajorVersion

The major version number of the MLID.

DriverMinorVersion

The minor version number of the MLID.

DriverFlags

A bit map showing the architecture supported by the MLID:

0x0001 EISA

0x0002 ISA

0x0004 MCA

0x0100 Hub management

0x0600 Multicast filtering and format:

00 LAN medium defaults

01 Illegal combination

The following bits are set if the card can share:

0x0020 Primary interrupt

0x0040 Secondary interrupt

0x0080 DMA channel 0

0x0100 DMA channel 1

The following bits are set if:

0x0200 A command line information string to place in AUTOEXEC.NCF is available.

0x0400 To prevent default information from the AUTOEXEC.NCF, this bit overrides the setting

DriverLink

Set to NULL (not used).

DriverSharingFlags

Indicates which resources a card can share with other cards. Only the 8 low-order bits are used:

BitDescription

0 Card is shut down.

1 Card can share I/O port 0.

2 Card can share I/O port 1.

3 Card can share memory range 0.

4 Card can share memory range 1.

5 Card can share interrupt 0.

6 Card can share interrupt 1.

7 Card can share DMA channel 0.

8 Card can share DMA channel 1.

DriverSlot

The slot number of the card if installed in MCA or EISA machine; otherwise it is 0.

DriverIOPortsAndLengths [4]

WordDescription

1 Primary base I/O port

2 Number of I/O ports beginning with primary base I/O port

3 Secondary base I/O port

4 Number of I/O ports beginning with secondary base I/O port

DriverMemDecode0

The absolute primary memory address that the LAN card uses.

DriverLength0

The amount of memory in paragraphs the card uses starting at DriverMemDecode0

DriverMemDecode1

The absolute secondary memory address the card uses.

DriverLength1

The amount of memory in paragraphs the card uses, starting at DriverMemDecode1.

DriverInterrupt [2]

The primary interrupt in the first byte; secondary interrupt in the secondary byte. FFh means not used.

DriverDMAUsage [2]

The primary DMA channel used in the card in the first byte; secondary DMA channel in the second byte. FFh means not used.

DriverLogicalName [18]

The logical name of the LAN driver, given at load time.

DriverLinearMem [2]

The addresses of DriverMemDecode0 and DriverMemDecode1 in the first and second LONGS.

DriverChannelNum

With multichannel adapters, holds the channel number of the LAN card to use.

Disk

NWGetDiskChannelStats

Get configuration information for a specified disk channel. Available on NetWare 2. You must be a console operator to call this function.


Returned Parameter Name
Description

channelState

Indicates the state of the disk channel:

0x00 Channel is running

0x01 Channel is stopping

0x02 Channel is stopped

0x03 Channel is not functional

channelSyncState

Indicates the control state of the disk channel can have the values below:

0x00 Channel is not being used

0x02 NetWare is using the channel; noone else wants it.

0x04 NetWare is using the channel; someone else wants it

0x06 Someone else is using the channel; NetWare does not need it

0x08 Someone else is using the channel; NetWare needs it

0x0A Someone else has released the channel; NetWare should use it.

driverType

The type of disk driver software is installed in the disk channel.

driverMajorVersion

Indicates the major version of the disk driver software installed on the disk channel.

driverMinorVersion

Indicates the minor version of the disk driver software installed on the disk channel.

driverDescription [65]

NULL terminated string describing the disk driver software.

IOAddr1

Indicates the address the disk driver uses to control the disk channel.

IOAddr1Size

The size in bits of the memory indicated by IOAddr1.

IOAddr2

Indicates the address the disk driver uses to control the disk channel.

IOAddr2Size

The size in bits of the memory indicated by IOAddr2.

sharedMem1Seg [3]

The shared memory address.

sharedMem1Ofs

The shared memory address offset.

sharedMem2Seg [3]

The shared memory address.

sharedMem2Ofs

The shared memory address offset.

interrupt1Used

The interrupt number the disk driver uses to communicate with the disk channel.

interrupt1

The interrupt number the disk driver uses to communicate with the disk channel.

interrupt2Used

The interrupt number the disk driver uses to communicate with the disk channel.

interrupt2

The interrupt number the disk driver uses to communicate with the disk channel.

DMAChannel1Used

The DMA controller used by the disk driver to control the disk channel.

DMAChannel1

The DMA controller used by the disk driver to control the disk channel.

DMAChannel2Used

The DMA controller used by the disk driver to control the disk channel.

DMAChannel2

The DMA controller used by the disk driver to control the disk channel.

configDescription [80]

The NULL terminated string containing the channel=s current IO driver configuration.

NWGetFSDriveMapTable

Get server drive mapping and mirror tables and associated statistics. Available on NetWare 2. You must be a console operator to call this function.


Returned Parameter Name
Description

SFTSupportLevel

The SFT level offered by the server:

1 Hot disk error fix.

2 Disk mirroring and transaction tracking.

3 Physical NetWare server mirroring.

logicalDriveCount

The number of logical drives attached to the server. If the NetWare server supports SFT Level II or above and disks are mirrored, logicalDriveCount will be lower than the actual number of physical disk subsystems attached to the NetWare server. The NetWare server=s operating system considers mirrored disks to be one logical drive.

physicalDriveCount

The number of physical disk units attached to the server.

diskChannelTable [5]

A 5 byte table that indicates which disk channels exists on the server and what their drive types are. (Each channel is 1 byte.) A nonzero value in the Disk Channel Table indicates that the corresponding disk channel exists in the NetWare server. The drive types are:

1 XT

2 AT

3 SCSI

4 disk coprocessor

50 to 255 Value Added Disk Drive (VADD)

driveMappingTable [32]

A 32 byte table containing the primary physical drive to which each logical drive is mapped (0xFF = no such logical drive).

driveMirrorTable [32]

A 32 byte table containing the secondary physical drive to which each logical drive is mapped (0xFF = no such logical drive).

deadMirrorTable [32]

A 32 byte table containing the secondary physical drive to which each logical drive was last mapped (0xFF = logical drive was never mirrored). This table is used in conjunction with the Drive Mirror Table. If the entry in the Drive Mirror Table shows that a drive is not currently mirrored, the table can be used to determine which drive previously mirrored the logical drive. The Dead Mirror Table is used to remirror a logical drive after a mirror failure.

NWGetPhysicalDiskStats

Get attributes and statistics for a specified disk. Available on all versions of NetWare 4. You must be a console operator to call this function.


Returned Parameter Name
Description

diskChannel

The disk channel to which the disk unit is attached.

diskRemovable

Indicates whether a disk is removable (0 = nonremovable).

driveType

The type of drive, defined as follows:

1 XT

2 AT

3 SCSI

4 disk coprocessor

5 PS/2 with MFM Controller

6 PS/2 with ESDI Controller

7 Convergent Technology SBIC

50 to 255 Value Added Disk Drive

controllerDriveNumber

The drive number of the disk unit relative to the controller number.

controllerNumber

The address on the physical disk channel of the disk controller.

controllerType

The number identifying the type (make and model) of the disk controller.

driveSize

The size of the physical drive in blocks (1 block = 4,096 bytes). The drive size does not include the portion of the disk reserved for Hot Fix redirection.

driveCylinders

The number of physical cylinders on the drive.

driveHeads

The number of disk heads on the drive.

sectorsPerTrack

The number of sectors on each disk track (1 sector = 512 bytes).

driveDefinition [64]

The make and model of the drive (NULL terminated string).

hotFixStart

The first block of the disk Hot Fix Redirection Table. This field is meaningful only with SFT Level I or above. The redirection table is used to replace bad disk blocks with usable blocks in the event that a media failure occurs on the disk.

hotFixSize

The total number of redirection blocks set aside on the disk for Hot Fix redirection. Some or all of these blocks may be in use. hotFixSize is meaningful only with SFT NetWare Level I or above.

hotFixBlockAvailable

The number of available redirection blocks. hotFixBlockAvailable is meaningful only on SFT NetWare Level I or above.

hotFixDisabled

Indicates whether Hot Fix is enabled. hotFixDisabled is meaningful only with SFT NetWare Level I or above (0 = enabled).

Media Manager

NWGetLoadedMediaNumList

Get a list of numbers identifying loaded media. Available on all versions of NetWare 4. You must be a console operator to call this function.


Returned Parameter Name
Description

maxMediaTypes

The maximum number of media allowed. mediaListCount contains the number of media in mediaList.

mediaListCount

The number of valid IDs returned in mediaList.

mediaList [FSE_MEDIA_LIST_MAX]

An array containing the ID numbers of the returned media.

NWGetMediaMgrObjChildrenList

Geta list of children of a media object. Available on all versions of NetWare 4. You must be a console operator to call this function.


Returned Parameter Name
Description

objCount

Indicates the number of object IDs returned.

objs [FSE_MAX_OBJECTS]

An array containing a list of object IDs.

NWGetMediaMgrObjInfo

Get attributes of a media object. Available on all versions of NetWare 4.

You must be a console operator to call this function.


Returned Parameter Name
Description

label [64]

The name of the object.

identificationType

The Novell assigned number for the object.

identificationTimeStamp

The DOS timestamp of the object.

mediaType

The media type of the object, as follows:

0 Hard disk

1 CD ROM

2 WORM device

3 Tape device

4 Magneto optical device.

cartridgeType

The type of cartridge or magazine the device can use, as follows:

0x00000000 Fixed media

0x00000001 5.25 floppy

0x00000002 3.5 floppy

0x00000003 5.25 optical

0x00000004 3.5 optical

0x00000005 0.5 tape

0x00000006 0.25 tape

0x00000007 8 mm tape

0x00000008 4 mm tape

0x00000009 Bernoulli disk

unitSize

The current transfer unit size in bytes for the device.

blockSize

The size of a block for the device in bytes.

capacity

The capacity of the device in blocks.

preferredUnitSize

The preferred trans unit size for the device.

name [64]

The length preceded string representing the name of the object.

type

The media manager database type:

0 ADAPTER_OBJECT

1 CHANGER_OBJECT

2 RDEVICE_OBJECT

3 DEVICE_OBJECT

4 MDEVICE_OBJECT

4 RMEDIA_OBJECT

5 PARTITION_OBJECT

6 SLOT_OBJECT

7 HOTFIX_OBJECT

8 MIRROR_OBJECT

9 PARITY_OBJECT

10 VOLUME_SEG_OBJECT

11 VOLUME_OBJECT

12 CLONE_OBJECT

13 FMEDIA_OBJECT

14 UNKNOWN_OBJECT

status

Contains the status mask for the object:

0x00000001 OBJECT_ACTIVATED

0x00000002 OBJECT_CREATED

0x00000004 OBJECT_SCRAMBLED

0x00000010 OBJECT_RESERVED

0x00000020 OBJECT_BEING_IDENTIFIED

0x00000040 OBJECT_MAGAZINE_LOADED

0x00000080 OBJECT_FAILURE

0x00000100 OBJECT_REMOVABLE

0x00000200 OBJECT_READ_ONLY

0x00010000 OBJECT_IN_DEVICE

0x00020000 OBJECT_ACCEPTS_MAGAZIN

0x00040000 OBJECT_IS_IN_A_CHANGER

0x00080000 OBJECT_LOADABLE

0x00080000 OBJECT_BEING_LOADED

0x01000000 OBJECT_DEVICE_LOCK

0x02000000 OBJECT_CHANGER_LOCK

0x04000000 OBJECT_REMIRRORING

0x08000000 OBJECT_SELECTED

functionMask

The function mask:

0x0001 RANDOM_READ

0x0002 RANDOM_WRITE

0x0004 RANDOM_WRITE_ONCE

0x0008 SEQUENTIAL_READ

0x0010 SEQUENTIAL_WRITE

0x0020 RESET_END_OF_TAPE

0x0040 SINGLE_FILE_MARK

0x0080 MULTIPLE_FILE_MARK

0x0100 SINGLE_SET_MARK

0x0200 MULTIPLE_SET_MARK

0x0400 SPACE_DATA_BLOCKS

0x0800 LOCATE_DATA_BLOCKS

0x1000 POSITION_PARTITION

0x2000 POSITION_MEDIA

controlMask

The control mask:

0x0001 ACTIVATE_DEACTIVE

0x0002 MOUNT_DISMOUNT

0x0004 SELECT_UNSELECT

0x0008 LOCK_UNLOCK

0x0010 EJECT

0x0020 MOVE

parentCount

The number of parent objects for the device, usually 1.

siblingCount

The number of sibling objects for the device.

childCount

The number of child objects for the device.

specificInfoSize

The size of the data structures that will be returned.

objectUniqueID

The number which identifies the device in the media anager database.

mediaSlot

The number of the slot the device occupies.

NWGetMediaMgrObjList

Get an array of numbers referring to media objects. Available on all versions of NetWare 4. You must be a console operator to call this function.


Returned Parameter Name
Description

objs [FSE_MAX_OBJECTS]

Array containing a list of object IDs.

NWGetMediaNameByMediaNum

Get the name corresponding to a media object number. Available on all versions of NetWare 4. You must be a console operator to call this function.


Returned Parameter Name
Description

mediaName

Points to the name of the specified media object.

File System

NWGetVolumeInfoByLevel

Get configuration information and statistics for a volume. Available on all versions of NetWare 4. You do not need to be a console operator to call this function.


Returned Parameter Name

Description

volumeType

0 VINetWare386

1 VINetWare286

2 VINetWare386v30

3 VINetWare386v31

statusFlagBits

Bit Description

0 Suballocation enabled.

1 Compression enabled.

3 Migration enabled.

4 Auditing enabled.

5 Read only enabled.

sectorSize

Sector size in bytes.

sectorsPerCluster

Number of sectors per cluster.

volumeSizeInClusters

Size of the volume, in clusters.

freedClusters

The number of clusters currently free for allocation. This does not include space currently available from deleted (limbo) files, nor space that could be reclaimed from the suballocation file system.

subAllocFreeableClusters

The space that could be reclaimed from the suballocation file system.

freeableLimboSectors

The disk space, in clusters, that could be freed from deleted files.

nonFreeableLimboSectors

The disk space, in clusters, currently in deleted files, not aged enough to be classified as FreeableLimboClusters. These will be migrated to the status of FreeableLimboCluster after time.

nonFreeableAvailSubAllocSectors

The space available to the suballocation file system, but not freeable to return as clusters.

notUsableSubAllocSectors

The disk space wasted by the suballocation file system. These clusters cannot be allocated by the suballocation system or used as regular clusters.

subAllocClusters

The disk space being used by the suballocation file system.

dataStreamsCount

The number of data streams for real files with data allocated to them.

limboDataStreamsCount

The number of data streams for deleted files with data allocated to them.

compressedDataStreamsCount

The number of data streams for compressed real files.

compressedLimboDataStreamsCount

The count of data streams for compressed deleted files.

unCompressableDataStreamsCount

The data streams found not compressible (real and deleted).

NWGetVolumeSegmentList

Get list of volume segments for a specified volume. Available on all versions of NetWare 4. You do not need to be a console operator to call this function.


Returned Parameter Name

Description

numOfVolumeSegments

The number of volume segments on the volume.

volumeSegmentDeviceNum

The device the segment is located on.

volumeSegmentOffset

The offset of the segment in bytes.

volumeSegmentSize

The segment size in bytes.

Promises, Promises

In Part I of this DevNote, I said I would give you an algorithm for a NetWare-version-independent utility to get all the available configuration data for a server. I don't have space to give it here, so it will have to wait for another issue.

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates