Setting Up The El_Configure Routine - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

Declares the lan_config_data structure, which contains all
6
information specific to the el driver. The lan_configure common
code uses this structure.
Declares an array of cfg_subsys_attr_t data structures and calls
7
it el_attributes.
Describes the PCMCIA_Option attribute, which specifies the option
8
data for the PCMCIA bus.
Describes the ISA_Option attribute, which specifies the option data
9
for the ISA bus.
Describes the Polling attribute, which is specific to this device driver.
10
It indicates the style of interrupt processing. The operation code
specifies CFG_OP_CONFIGURE and CFG_OP_QUERY. This means that the
attribute can only be set at configuration time and, after that, only
queried. You can specify a value in the sysconfigtab file fragment
(which is appended to the /etc/sysconfigtab database). The cfgmgr
framework obtains this value from the /etc/sysconfigtab database
and stores it in the el_polling variable.
Describes the Polls_Per_Second attribute, which is specific to this
11
device driver. It indicates the polls per second for interrupt processing.
Similar to the Polling attribute, you can only specify a value for
this attribute at configuration time. The cfgmgr framework obtains
this value from the /etc/sysconfigtab database and stores it in
the el_pollint variable.
Ends the array by specifying the null string.
12

4.2 Setting Up the el_configure Routine

The following code shows how to set up the el_configure( ) routine:
int el_configure(cfg_op_t op,
cfg_attr_t *indata,
size_t indatalen,
cfg_attr_t *outdata,
size_t outdatalen)
{
return (lan_configure (op, &el_data));
}
Declares an argument called op to contain a constant that describes the
1
configuration operation to be performed on the driver. This argument
evaluates to one of the following valid constants: CFG_OP_CONFIGURE,
CFG_OP_UNCONFIGURE, CFG_OP_QUERY, or CFG_OP_RECONFIGURE.
Declares a pointer to a cfg_attr_t data structure called indata,
2
which consists of input to the el_configure( ) routine. The cfgmgr
framework fills in this data structure. The cfg_attr_t data structure
1
2
3
4
5
6
Implementing the Configure Section 4–3

Advertisement

Table of Contents
loading

Table of Contents