'\" te .\" Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. .TH mac_callbacks 9S "26 Jul 2010" "SunOS 5.11" "Data Structures for Drivers" .SH NAME mac_callbacks \- MAC callbacks data structure .SH SYNOPSIS .LP .nf #include .fi .SH INTERFACE LEVEL .sp .LP Solaris architecture specific (Solaris DDI) .SH DESCRIPTION .sp .LP The \fBmac_callbacks\fR data structure is used by MAC device drivers to expose their entry points to the MAC layer. A pointer to an instance of the \fBmac_callbacks\fR structure is passed through the \fIm_callbacks\fR field of the \fBmac_register\fR(9S) structure as part of the registration of a device driver instance through \fBmac_register\fR(9F). .SH STRUCTURE MEMBERS .sp .in +2 .nf uint_t mc_callbacks; /* Denotes which callbacks are set */ mac_getstat_t mc_getstat; /* Get the value of a statistic */ mac_start_t mc_start; /* Start the device */ mac_stop_t mc_stop; /* Stop the device */ mac_setpromisc_t mc_setpromisc; /* Enable or disable promiscuous mode */ mac_multicst_t mc_multicst; /* Enable or disable a multicast addr */ mac_unicst_t mc_unicst; /* Set the unicast MAC address */ mac_tx_t mc_tx; /* Transmit a packet */ mac_ioctl_t mc_ioctl; /* Process an unknown ioctl */ mac_getcapab_t mc_getcapab; /* Get capability information */ mac_set_prop_t mc_setprop; /* Set property value */ mac_get_prop_t mc_getprop; /* Get property value */ mac_prop_info_t mc_propinfo; /* Get property attributes */ .fi .in -2 .sp .LP Below are descriptions of the members of the \fBmac_callbacks\fR structure that are visible to the device driver. .sp .ne 2 .mk .na \fB\fImc_callbacks\fR\fR .ad .sp .6 .RS 4n Flags specifying which ones of the optional entry points are implemented by the driver. The following flags are supported: .sp .ne 2 .mk .na \fB\fBMC_IOCTL\fR\fR .ad .sp .6 .RS 4n Set by the driver when the \fBmc_ioctl()\fR entry point is present. .RE .sp .ne 2 .mk .na \fB\fBMC_GETCAPAB\fR\fR .ad .sp .6 .RS 4n Set by the driver when the \fBmc_getcapab()\fR entry point is present. .RE .sp .ne 2 .mk .na \fB\fBMC_SETPROP\fR\fR .ad .sp .6 .RS 4n Set by the driver when the \fBmc_setprop()\fR entry point is present. .RE .sp .ne 2 .mk .na \fB\fBMC_GETPROP\fR\fR .ad .sp .6 .RS 4n Set by the driver when the \fBmc_getprop()\fR entry point is present. .RE .sp .ne 2 .mk .na \fB\fBMC_PROPINFO\fR\fR .ad .sp .6 .RS 4n Set by the driver when the \fBmc_propinfo()\fR entry point is present. .RE .sp .ne 2 .mk .na \fB\fBMC_PROPERTIES\fR\fR .ad .sp .6 .RS 4n Set by a driver which implements all properties entry points (\fBmc_setprop()\fR, \fBmc_getprop()\fR, and \fBmc_propinfo()\fR). Setting \fBMC_PROPERTIES\fR is the equivalent of setting the three flags \fBMC_SETPROP\fR, \fBMC_GETPROP\fR, and \fBMC_PROPINFO\fR. .RE .RE .sp .ne 2 .mk .na \fB\fImc_getstat\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .ne 2 .mk .na \fB\fImc_start\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .ne 2 .mk .na \fB\fImc_stop\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .ne 2 .mk .na \fB\fImc_setpromisc\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .ne 2 .mk .na \fB\fImc_multicst\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .ne 2 .mk .na \fB\fImc_unicst\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .ne 2 .mk .na \fB\fImc_tx\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .ne 2 .mk .na \fB\fImc_ioctl\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .ne 2 .mk .na \fB\fImc_getcapab\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .ne 2 .mk .na \fB\fImc_setprop\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .ne 2 .mk .na \fB\fImc_getprop\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .ne 2 .mk .na \fB\fImc_propinfo\fR\fR .ad .sp .6 .RS 4n pointer to driver entry point .RE .sp .LP See \fBmac\fR(9E) for more information about MAC driver entry points. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/header _ Interface StabilityCommitted .TE .SH SEE ALSO .sp .LP \fBattributes\fR(5), \fBmac_register\fR(9F), \fBmac_register\fR(9S)