MAC_REGISTER(9S) Data Structures for Drivers MAC_REGISTER(9S)
- networking device driver registration
SYNOPSIS #include <sys/mac_provider.h> #include <sys/mac_ether.h>
illumos DDI specific
structure is used by GLDv3 networking device drivers
implementing the mac(9E)
The structure is allocated by a call to mac_alloc(9F)
after which the
various structure members should be set. Once they have been set, the
structure can be used by a GLDv3 device driver to register with the MAC
framework by calling the mac_register(9F)
function. Once mac_register(9F)
has been called, the structure can be freed through a call to mac_free(9F)
const char *m_type_ident;
member is set during a call to mac_alloc(9F)
. Device drivers
should not modify this field.
member identifies the kind of networking device that this
driver represents. The following constants should be used to identify the
device type: MAC_PLUGIN_IDENT_ETHER
The device driver implements IEEE 802.3 Ethernet.
value is a private value that the device driver may set and
will be provided as an argument in many of the mac(9E)
often this is set to the driver's soft state for a specific instance.
member should point to the device driver's dev_info
that specific instance. This structure is provided during the driver's attach(9E)
member should be set to zero. The GLDv3 framework will
determine the appropriate instance.
member should be set to a byte array that describes the
source MAC address of the device. This is usually the default MAC address
as programmed by the device manufacturer in that instance of the device.
member is an optional property and should be set to NULL by
most device drivers. If set, this address will be the destination for
member contains the GLDv3 entry points implemented by the
device driver. See mac_callbacks(9S)
for a full explanation of the
structure, its members, and their responsibilities. See mac(9E)
broader picture of how the entry points are used.
property is the minimum service data unit. It represents the
minimum size packet that the device can transmit, ignoring its own headers.
Thus for an Ethernet device, this value would exclude the Ethernet header
and any VLAN headers. If this is set to zero, then that means that either
the MAC protocol does not require a minimum size or that the device driver
and hardware will ensure that any minimum size is taken care of.
property is the maximum service data unit. It represents the
maximum size packet that the device can transmit, ignoring its own headers.
For an Ethernet based device, this would exclude the size of the Ethernet
header and a VLAN headers. This value is often called the maximum
transmission unit (MTU).
member is used for data specific to the type specified in the m_type_ident
member. For all devices of type MAC_PLUGIN_IDENT_ETHER
should be set to NULL.
member indicates the size of the member m_pdata
. For all
devices of type MAC_PLUGIN_IDENT_ETHER
, this should be set to 0.
member is an optional member that lists device-specific
properties. These properties will be queried through functions like mc_getprop(9E)
, and mc_setprop(9E)
. If the driver does
not have any private properties, it should be set to NULL. Otherwise, it
should be set to a NULL-terminated array of character strings where each
entry is the name of a distinct property. See mac(9E)
for more information
on private properties.
property indicates the amount of additional bytes of
information that may be included beyond the basic MAC header. For example,
with an Ethernet device, if the hardware supports a VLAN tag, then this
property would be set to the size of a VLAN tag, indicating that it
supported the additional bytes in a single packet beyond the Ethernet
header and the m_max_sdu
SEE ALSO attach(9E)
OmniOS May 10, 2016 OmniOS