 |
Index for Section 9 |
|
 |
Alphabetical listing for L |
|
 |
Bottom of page |
|
lan_set_attribute(9r)
NAME
lan_set_attribute - Network: Sets a Hardware Management attribute to the
specified value
SYNOPSIS
void lan_set_attribute(
void **attr_tbl,
int index,
void *new_value );
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.
index
The index in the attributes table to update. The indices are listed in
io/dec/netif/lan_common.h and can be any of the following values:
NET_NAME_NDX /* Name string attribute */
NET_CAT_NDX /* Category string attribute */
NET_SUBCAT_NDX /* Sub-category string attribute */
NET_MODEL_NDX /* Model Name string attribute */
NET_HWREV_NDX /* Hardware Revision string attribute */
NET_FWREV_NDX /* Firmware Revision string attribute */
NET_MAC_NDX /* MAC Address string attribute */
NET_MTU_NDX /* Maximum Frame Size integer attribute */
NET_SPEED_NDX /* Megabits Per Second integer attribute */
NET_METHOD_NDX /* Media Selection Method string attribute */
NET_MEDIA_NDX /* Media Type string attribute */
NET_LOOP_NDX /* Loopback integer attribute */
NET_PROMISC_NDX /* Promiscuous Mode integer attribute */
NET_FDX_NDX /* Full Duplex Status integer attribute */
NET_MCLIST_NDX /* Multicast Address List string attribute */
NET_IFNDX_NDX /* Ifnet Index integer attribute */
new_value
The new value for the attribute (either the address of a character
string for string attributes, or the actual value for integer
attributes).
DESCRIPTION
The lan_set_attribute() routine updates the indicated attribute in the
specified attribute table with the new value indicated.
NOTES
The value passed in for integer attributes is not treated as the address of
the attribute; rather, it is treated as the value of the attribute. The
value passed in for string attributes must be the address of a buffer
containing a text string.
CAUTIONS
This routine can only be called after lan_ehm_init() has been called to
initialize the attribute tables found in the net_hw_mgmt data structure.
EXAMPLE
Following is an example of using lan_set_attribute():
struct net_hw_mgmt ehm;
lan_ehm_init (&ehm, NET_EHM_VERSION_ID);
lan_set_attribute (ehm.current_val, NET_MODEL_NDX, "3C509");
lan_set_attribute (ehm.current_val, NET_SPEED_NDX, 10);
RETURN VALUES
None
FILES
<io/dec/netif/lan_common.h>
SEE ALSO
Routines: lan_ehm_init(9r), lan_ehm_free(9r),
lan_set_common_attributes(9r), lan_register_adapter(9r)
Data Structures: net_hw_mgmt(9s)
 |
Index for Section 9 |
|
 |
Alphabetical listing for L |
|
 |
Top of page |
|