NPAB_Search_Adapter

Takes a bus type and a pointer to a product ID and returns a bus tag and unique identifier indicating where the specified product (adapter board) was found.

Thread Context:Blocking

Syntax

    LONG NPAB_Search_Adapter (
       LONG   npaHandle,
       LONG  *scanSequence,
       LONG   busType,
       LONG   productIDLength,
       BYTE  *productID,
       LONG  *busTag,
       LONG  *uniqueID
       );
    
    

Parameters

npaHandle
(IN) The HAM's handle for using the NPA APIs, assigned during NPA_Register_HAM_Module.
scanSequence
(IN/OUT) Upon input, contents initialized to -1 to start the first search iteration. Upon output, receives a system-generated sequence value to be passed into subsequent calls to this function.
busType
(IN) Points to the bus type on which to perform the search:

Value

Description

0

ISA / ISA PnP bus

1

PC MCA bus

2

PC EISA bus

3

PC Card (PCMCIA) bus

4

PCI bus

8

CardBus

productIDLength
(IN) Byte-length of the product ID string.
productID
(IN) Points to a bus architecture-dependent parameter that uniquely identifies an adapter board/peripheral/system option. For example, for an EISA bus, the EISA product ID is defined in the EISA Specification document. See NPAOptionStruct for an illustration of productID.
busTag
(OUT) Points to an architecture-dependent value that is used by the system to identify the bus on which the adapter was found in the current search iteration.
uniqueID
(OUT) Points to an architecture-dependent value that identifies the specific device or function. Iterative calls to this function return information for each instance of the productID and compatible products, including multiple instances on a single board (each has a different function number). The slot number associated with the adapter can be obtained from uniqueID by using NPAB_Get_Instance_Number.

Return Values

The following table lists return values and descriptions.

0

Successful

3

Memory error. Unable to allocate enough memory to complete the operation.

4

Parameter error. Error in one or more parameters passed to the function or the value of one or more parameters exceeded the specified range.

5

Unsupported operation. Not supported for the given bus type.

6

No device or function matching the given bus type and product ID combination was found.

Remarks

The HAM calls this function iteratively to find all adapter instances with the specified product ID. The function returns the bus tag and the system unique ID for each adapter instance.

This function can only be used if the HAM's adapter has a unique product ID associated with it that can be read by NetWare's bus interface (NBI). Also, the product ID must be retrievable according to some accepted standard, such as EISA, MCA, or PCI.