Defining Common Information; Typical Softc Data Structure - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

Figure 3–1: Typical softc Data Structure
Common Information
*
Enhanced Hardware Management Information
*
Media State Information
**
Base Register
*
Multicast Table Information
*
Interrupt Handler ID
*
CSR Pointer Information
*
FIFO Maintenance Information
**
Bus-Specific Information
**
Broadcast Flag
**
Debug Flag
**
Interrupt and Timeout Information
**
Autosense Kernel Thread
**
Context Information
Polling Context Flag
**
w3_eeprom Structure
**
*
Simple Lock Structure
A single asterisk denotes information that all network device drivers provide
in the associated softc data structure, and a double asterisk denotes
information that is specific to the hardware or bus.

3.1 Defining Common Information

The common information in a local area network driver's softc data
structure is contained in the ether_driver data structure, which consists
of information such as counter blocks, media state, media values, and so
forth. The following code shows the declaration and definition of the common
information in the if_el device driver's el_softc data structure. Make
sure that the common part of your softc data structure has the same
declaration and definitions.
struct el_softc {
struct
ether_driver *is_ed;
3–2 Defining the softc Data Structure
ZK-1273U-AI
1

Advertisement

Table of Contents
loading

Table of Contents