Figure 3–2: Mapping Alternate Names
#define is_ac
#define ztime
#define ctrblk
#define is_addr
3.2 Enabling Support for Enhanced Hardware Management
Enhanced hardware management (EHM) is a feature of Tru64 UNIX
Version 5.0 that allows a system administrator to view, and possibly modify,
various attributes of the hardware on either a local or a remote system.
To support this facility, device drivers and bus drivers must provide their
specific, predefined attributes to a centralized management entity. Examples
of these attributes for network drivers include the type of LAN device, its
hardware address, the type of media it is attached to, and how fast it can
operate. The LAN subsystem supplies access routines for defining and
exporting these attributes.
To use these routines, a network driver must declare a net_hw_mgmt data
structure as shown by the following code:
struct net_hw_mgmt
Declares a net_hw_mgmt data structure and calls it ehm.
1
3.3 Defining Media State Information
The media state information contained in a network driver's softc data
structure consists of information about the lan_media data structure.
The following code shows the declaration and definition of the media state
information in the if_el device driver's el_softc data structure:
struct
lan_media
#define lm_media_mode
#define lm_media_state lan_media.lan_media_state
#define lm_media
Declares a lan_media data structure and calls it lan_media. The
1
lan_media data structure contains media state values.
Defines an alternate name for referencing the lan_media_mode
2
member of the lan_media data structure. The value that is stored in
3–4 Defining the softc Data Structure
ether_driver
arpcom
.
.
.
.
.
.
ac_if
ess_ac
ess_ztime
ac_hwaddr
.
ess_ctrblk
.
.
.
.
.
ehm;
1
lan_media;
1
lan_media.lan_media_mode
lan_media.lan_media
4
#define is_if
#define ac_enaddr
ZK-1274U-AI
2
3
Need help?
Do you have a question about the Tru64 UNIX and is the answer not in the manual?
Questions and answers