NPAOptionStruct
Contains the HAM's command line option data on a per option basis.
struct NPAOptionStruct { BYTE name[32]; LONG parameter0; LONG parameter1; LONG parameter2; WORD type; WORD flags; BYTE string[16]; };
For the relationship between this parameter and the option type selected, see Option Types vs. Parameter Definitions.
NOTE:Return values to this parameter are valid only after NPA_Register_Options has been called.
Typically, this field is used in specifying memory decode ranges and port lengths. See Option Types vs. Parameter Definitions for the relationship between this parameter and the option type selected.
For the Product ID option, Option Types vs. Parameter Definitions shows the various formats for product ID values (as applicable).
NOTE:Return values to this parameter are valid only after NPA_Register_Options has been called.
See Option Types vs. Parameter Definitions for the relationship between this parameter and the option selected.
NOTE:Return values to this parameter are valid only after NPA_Register_Options has been called.
The following is a list of the flags defined for this field:
All other bits in this field are reserved by NetWare.
If the flags parameter is set to Value Required, the developer can use this field to read the command line option “name=”. This field must contain n-2, where n is the maximum length of string plus the length count byte and the NULL terminator byte. In this case, when the information is returned back, the length byte will be updated to indicate the actual size of the string being returned. When flags is set to Value Required and the user was prompted to enter a value for this option, the entered ASCII string is placed in this field.
The figure below illustrates the string used for various bus types.
Figure 10-1 String fields for different bus types
LOHI byte order refers to a little-endian byte order.
The PnP ISA Specification specifies the use of the 32-bit encoded EISA product ID format for PnP ISA product IDs.
type |
Option |
parameter0 |
parameter1 |
parameter2 |
Remarks |
---|---|---|---|---|---|
0x0001 |
Interrupt Option |
Contains the IRQ handle. See HAM_ISR. |
0x01 -Put at the end of ISR chain (The default is the front of the ISR chain.) 0x02- Adjust RealModeInterrupt mask. This enables real mode (DOS) Interrupts. 0x04-edge (0) or level (1) triggered Interrupts (NetWare 4 only). |
To NWPA: Contains the busTag that is returned by NPAB_Search_Adapter or by parsing the Product ID option (see below). To HAM: Used by NetWare. |
String contains the ASCII code for the hexadecimal value of the lower WORD specified in parameter0. |
0x0002 |
Port Option |
Value of the port address being added. |
Range in bytes. |
To NWPA: Contains the busTag that is returned by NPAB_Search_Adapter or by parsing the Product ID option (see below). |
String contains the ASCII code for the hexadecimal value specified in parameter0. |
0x0003 |
DMA Option |
Value of the DMA channel being added. |
Not used. Set to 0. |
To NWPA: Contains the busTag that is returned by NPAB_Search_Adapter or by parsing the Product ID option (see below). |
String contains the ASCII code for the hexadecimal value specified in parameter0. |
0x0004 |
Memory decode option |
Contains the shared memory physical address used by the adapter for onboard memory that is mapped into NetWare's logical address table. |
Contains the number of 16-byte paragraphs of system memory. |
To NWPA: Contains the busTag that is returned by NPAB_Search_Adapter or by parsing the Product ID option (see below). To HAM: Contains the shared memory logical address of the mapped memory for NPA_Register_Options only. |
|
0x0005 |
Slot option |
Value of the slot being added. |
Not used. Set to 0. |
To NWPA: Contains the busTag that is returned by NPAB_Search_Adapter or by parsing the Product ID option (see below). |
String contains the ASCII code for the decimal representation of the hexadecimal value specified in parameter0. |
0x0006 |
Card option |
Value of the card being added. |
Not used. Set to 0. |
Not used. Set to 0. |
String contains the ASCII code for the hexadecimal value specified in parameter0. |
0x0007 |
Reserved by NetWare |
Reserved by NetWare. |
Reserved by NetWare. |
Reserved by NetWare. |
|
0x0008 |
Product ID option |
To NWPA: Contains the bus type returned from NPAB_Get_Bus_Type. To HAM: Contains the busTag. |
To NWPA: Contains a pointer to an array of bytes that contain a bus architecture-dependent parameter that uniquely identifies an adapter board/peripheral/system option. See Figure 10-1. To HAM: Contains the slot number. |
To NWPA: Contains the size of the array pointed to by parameter1. To HAM: Contains the uniqueID. |
|
0x0009 to 0x01FF |
Reserved by NetWare |
Reserved by NetWare. |
Reserved by NetWare. |
Reserved by NetWare. |
|
0x0200 to 0xFFFF |
For vendor use as needed |
For vendor use as needed. |
For vendor use as needed |
For vendor use as needed. |
Vendors must register with Developer Services to use these options in released driver code. |
Using this structure, the HAM can select the command line options that it wants NWPA to prompt the system operator for.
The HAM must fill out one of these structures and call NPA_Add_Option for each option it supports. With each successive call to NPA_Add_Option, NWPA adds the current option to a select-list. After the HAM has added all of its command line options, it calls NPA_Parse_Options, which parses the command line to determine which options in the select-list were actually chosen. Within the context of NPA_Parse_Options, NWPA iteratively calls the HAM's HAM_Check_Option routine for each option (provided that the options are of differing types) that was actually selected from the command line. HAM_Check_Option can direct NWPA to either accept the option by returning zero or reject the option by returning non-zero. If the option is accepted, NWPA places it in a use-list. The HAM then calls NPA_Register_Options to direct NWPA to physically register the options in its use-list for the HAM.
NWPA does not place multiple options of the same type, such as multiple interrupts, in its use-list for a single parse of the command line. Therefore, if the host adapter supports multiple options of the same type and the HAM wants to add/parse/register them, then the HAM must do the following: