 |
Index for Section 9 |
|
 |
Alphabetical listing for L |
|
 |
Bottom of page |
|
lan_set_common_attributes(9r)
NAME
lan_set_common_attributes - Network: Sets the Hardware Management
attributes that are common among network drivers
SYNOPSIS
void lan_set_common_attributes(
void **attr_tbl,
struct ether_driver *is_ed );
ARGUMENTS
attr_tbl
The address of one of the attribute tables (either current_val or
default_val) found in a net_hw_mgmt data structure.
is_ed
The address of the common driver data structure. This contains the
ifnet structure and the hardware address.
DESCRIPTION
The lan_set_common_attributes() routine initializes the basic network
attributes based on information found in the network device's ifnet data
structure. As a convenience, the network driver calls this function to
initialize the following attributes:
· name
· category
· sub_category
· MAC_address
· MTU_size
· media_speed
· loopback_mode
· promiscuous_mode
· interface_number
NOTES
Make sure that this routine is called only after lan_ehm_init() and
if_attach() have been called.
EXAMPLE
The following example shows how to use lan_set_common_attributes():
struct nd_softc {
struct ether_driver *is_ed;
struct net_hw_mgmt ehm;
...
} sc;
struct ifnet *ifp = &sc.is_ed->ess_ac.ac_if;
lan_ehm_init (&sc.ehm, NET_EHM_VERSION_ID);
lan_set_attribute (sc.ehm.current_val, NET_MODEL_NDX, "3C509");
if_attach (ifp);
lan_set_common_attributes (sc.ehm.current_val, sc.is_ed);
RETURN VALUES
None
SEE ALSO
Routines: lan_ehm_init(9r), lan_ehm_free(9r), lan_set_attribute(9r),
lan_register_adapter(9r)
Data Structures: net_hw_mgmt(9s)
 |
Index for Section 9 |
|
 |
Alphabetical listing for L |
|
 |
Top of page |
|