MAC_GETINFO(9F) Kernel Functions for Drivers MAC_GETINFO(9F)
NAME
mac_getinfo - get device driver information for a MAC provider
SYNOPSIS
#include <sys/mac_provider.h> int mac_getinfo(
dev_info_t *dip,
ddi_info_cmd_t cmd,
void *arg,
void **resp);
INTERFACE LEVEL
illumos DDI specific
PARAMETERS
dip The MAC driver's dip.
cmd Command argument to
getinfo(9E).
arg Command specific argument.
resp Pointer to store the command specific response.
DESCRIPTION
The
mac_getinfo() function is the default
getinfo(9E) entry point
provided by the
mac(9E) framework.
Generally a MAC provider is free to leave the
getinfo(9E) entry point
unset and allow the framework to provide a default implementation.
However, if a driver wants to expose additional device nodes or relies
on some special mapping of device instance to MAC instance then it must
provide its own
getinfo(9E) entry point. Such a driver may then call
the
mac_getinfo() function to handle requests for MAC reserved nodes,
propagating the return value. See the
Custom Device Nodes section of
mac(9E) for more details.
CONTEXT
The
mac_getinfo() function should be used during the execution of a
driver's
getinfo(9E) entry point.
RETURN VALUES
mac_getinfo() returns DDI_SUCCESS on success or DDI_FAILURE otherwise.
SEE ALSO
getinfo(9E),
mac(9E),
mac_devt_to_instance(9F),
mac_private_minor(9F)illumos January 30, 2023 illumos