Skip Navigation Links | |
Exit Print View | |
man pages section 9: DDI and DKI Kernel Functions Oracle Solaris 11 Information Library |
csx_AccessConfigurationRegister(9F)
csx_Parse_CISTPL_BYTEORDER(9F)
csx_Parse_CISTPL_CFTABLE_ENTRY(9F)
csx_Parse_CISTPL_DEVICEGEO(9F)
csx_Parse_CISTPL_DEVICEGEO_A(9F)
csx_Parse_CISTPL_DEVICE_OA(9F)
csx_Parse_CISTPL_DEVICE_OC(9F)
csx_Parse_CISTPL_LINKTARGET(9F)
csx_Parse_CISTPL_LONGLINK_A(9F)
csx_Parse_CISTPL_LONGLINK_C(9F)
csx_Parse_CISTPL_LONGLINK_MFC(9F)
ddi_get_soft_iblock_cookie(9F)
ddi_intr_get_supported_types(9F)
ddi_prop_lookup_byte_array(9F)
ddi_prop_lookup_int64_array(9F)
ddi_prop_lookup_string_array(9F)
ddi_prop_update_byte_array(9F)
ddi_prop_update_int64_array(9F)
ddi_prop_update_string_array(9F)
ldi_prop_lookup_byte_array(9F)
ldi_prop_lookup_int64_array(9F)
ldi_prop_lookup_string_array(9F)
mac_prop_info_set_default_link_flowctrl(9F)
mac_prop_info_set_default_str(9F)
mac_prop_info_set_default_uint8(9F)
mac_prop_info_set_range_uint32(9F)
net_event_notify_unregister(9F)
net_instance_notify_register(9F)
net_instance_notify_unregister(9F)
net_instance_protocol_unregister(9F)
net_protocol_notify_register(9F)
nvlist_lookup_boolean_array(9F)
nvlist_lookup_boolean_value(9F)
nvlist_lookup_nvlist_array(9F)
nvlist_lookup_string_array(9F)
nvlist_lookup_uint16_array(9F)
nvlist_lookup_uint32_array(9F)
nvlist_lookup_uint64_array(9F)
nvpair_value_boolean_array(9F)
pci_plist_lookup_int16_array(9F)
pci_plist_lookup_int32_array(9F)
pci_plist_lookup_int64_array(9F)
pci_plist_lookup_int8_array(9F)
pci_plist_lookup_string_array(9F)
pci_plist_lookup_uint16_array(9F)
pci_plist_lookup_uint32_array(9F)
pci_plist_lookup_uint64_array(9F)
pci_plist_lookup_uint8_array(9F)
scsi_get_device_type_scsi_options(9F)
scsi_get_device_type_string(9F)
scsi_sense_cmdspecific_uint64(9F)
usb_get_current_frame_number(9F)
usb_get_max_pkts_per_isoc_request(9F)
usb_pipe_get_max_bulk_transfer_size(9F)
usb_pipe_stop_intr_polling(9F)
usb_pipe_stop_isoc_polling(9F)
- MAC driver service routines
#include <sys/mac_provider.h> mac_register_t *mac_alloc(uint_t version);
void mac_free(mac_register_t *mregp);
int mac_register(mac_register_t *mregp, mac_handle_t *mhp);
int mac_unregister(mac_handle_t mh);
void mac_tx_update(mac_handle_t mh);
void mac_link_update(mac_handle_t mh, link_state_t new_state);
void mac_rx(mac_handle_t mh, void *reserved, mblk_t *mp_chain);
void mac_init_ops(struct dev_ops *ops, const char *name);
void mac_fini_ops(struct dev_ops *ops);
MAC version
MAC handle
pointer to a MAC handle
pointer to a mac_register_t(9S) structure
reserved argument
chain of message blocks containing a received packet
media link state
device operations structure
device driver name
Solaris architecture specific (Solaris DDI)
The mac_alloc() function allocates a new mac_register(9S) structure and returns a pointer to it. The allocated structure may contain some MAC-private elements. These private elements are initialized by the MAC layer before mac_alloc() returns, and the other elements of the structure are initialized to 0. The device driver must initialize the structure members as described by mac_register before passing a pointer to the structure to mac_register. The version argument should be set to MAC_VERSION_V1.
The mac_free() function frees a mac_register structure previously allocated by mac_alloc().
The mac_register() function is called from the device driver's attach(9E) entry point, and is used to register the MAC-based device driver with the MAC layer. The mac_register() entry point is passed an instance of the mac_registerstructure previously allocated by mac_alloc().
On success, mac_register() returns 0 and sets mhp to point to a new MAC handle corresponding to the new MAC instance. This MAC handle is subsequently passed by the driver to the framework as an argument to other MAC routines such as the ones described here. The attach() entry point of the driver should return DDI_SUCCESS in this case. On failure, mac_register() returns a non-zero error as described by Intro(2). The attach() entry point of the driver should return DDI_FAILURE in this case.
The mac_unregister() function is called by the driver from its detach(9E) entry point to unregister the instance from the MAC layer. It should pass the MAC handle which was previously obtained from mac_register(). mac_unregister() returns 0 on success, in which case the driver's detach() entry point should return DDI_SUCCESS. mac_unregister() returns a non-zero error as described by Intro(2) on failure. In this case the driver's detach() entry point should return DDI_FAILURE.
The mac_tx_update() function should be called by the driver to reschedule stalled outbound packets. Whenever the driver's mc_tx(9E) has returned a non-empty chain of packets, it must later mac_tx_update() to inform the MAC layer that it should retry the packets that previously could not be sent. mac_tx_update() should be called as soon as possible after resources are again available, to ensure that MAC resumes passing outbound packets to the driver's mc_tx() entry point.
The mac_link_update() function is called by the device driver to notify the MAC layer of changes in the media link state. The new_state argument must be set to one of the following:
The media link is up.
The media link is down.
The media link is unknown.
The mac_rx() function is called by the driver's interrupt handler to pass a chain of one or more packets to the MAC layer. Packets of a chain are linked with the b_next pointer. The driver should avoid holding mutex or other locks during the call to mac_rx(). In particular, locks that could be taken by a transmit thread may not be held during a call to mac_rx().
The mac_init_ops() function must be invoked from the _init(9E) entry point of the device driver before a call to mod_install(9F). It is passed a pointer to the device driver's operations structure, and the name of the device driver.
The mac_fini_ops() function must be called from _fini(9E) before the driver is unloaded after invoking mod_remove(9F), or before returning from _init() in the case of an error returned by mod_install().
The mac_alloc() function returns a pointer to a new mac_register(9S) structure.
The mac_register() and mac_unregister() functions return a non-zero error, as defined by Intro(2).
See attributes(5) for descriptions of the following attributes:
|
Intro(2), attributes(5), attach(9E), detach(9E), _fini(9E), _init(9E), mac(9E), mc_tx(9E), mod_install(9F), mod_remove(9F), dev_ops(9S), mac_register(9S)