77 simnet_ioc_create, secpolicy_dl_config},
78 {SIMNET_IOC_DELETE, DLDCOPYIN, sizeof (simnet_ioc_delete_t),
79 simnet_ioc_delete, secpolicy_dl_config},
80 {SIMNET_IOC_INFO, DLDCOPYINOUT, sizeof (simnet_ioc_info_t),
81 simnet_ioc_info, NULL},
82 {SIMNET_IOC_MODIFY, DLDCOPYIN, sizeof (simnet_ioc_modify_t),
83 simnet_ioc_modify, secpolicy_dl_config}
84 };
85
86 DDI_DEFINE_STREAM_OPS(simnet_dev_ops, nulldev, nulldev, simnet_attach,
87 simnet_detach, nodev, simnet_getinfo, D_MP, NULL,
88 ddi_quiesce_not_supported);
89
90 static struct modldrv simnet_modldrv = {
91 &mod_driverops, /* Type of module. This one is a driver */
92 SIMNETINFO, /* short description */
93 &simnet_dev_ops /* driver specific ops */
94 };
95
96 static struct modlinkage modlinkage = {
97 MODREV_1, &simnet_modldrv, NULL
98 };
99
100 /* MAC callback function declarations */
101 static int simnet_m_start(void *);
102 static void simnet_m_stop(void *);
103 static int simnet_m_promisc(void *, boolean_t);
104 static int simnet_m_multicst(void *, boolean_t, const uint8_t *);
105 static int simnet_m_unicst(void *, const uint8_t *);
106 static int simnet_m_stat(void *, uint_t, uint64_t *);
107 static void simnet_m_ioctl(void *, queue_t *, mblk_t *);
108 static mblk_t *simnet_m_tx(void *, mblk_t *);
109 static int simnet_m_setprop(void *, const char *, mac_prop_id_t,
110 uint_t, const void *);
111 static int simnet_m_getprop(void *, const char *, mac_prop_id_t,
112 uint_t, void *);
113 static void simnet_m_propinfo(void *, const char *, mac_prop_id_t,
114 mac_prop_info_handle_t);
115
116 static mac_callbacks_t simnet_m_callbacks = {
117 (MC_IOCTL | MC_SETPROP | MC_GETPROP | MC_PROPINFO),
|
77 simnet_ioc_create, secpolicy_dl_config},
78 {SIMNET_IOC_DELETE, DLDCOPYIN, sizeof (simnet_ioc_delete_t),
79 simnet_ioc_delete, secpolicy_dl_config},
80 {SIMNET_IOC_INFO, DLDCOPYINOUT, sizeof (simnet_ioc_info_t),
81 simnet_ioc_info, NULL},
82 {SIMNET_IOC_MODIFY, DLDCOPYIN, sizeof (simnet_ioc_modify_t),
83 simnet_ioc_modify, secpolicy_dl_config}
84 };
85
86 DDI_DEFINE_STREAM_OPS(simnet_dev_ops, nulldev, nulldev, simnet_attach,
87 simnet_detach, nodev, simnet_getinfo, D_MP, NULL,
88 ddi_quiesce_not_supported);
89
90 static struct modldrv simnet_modldrv = {
91 &mod_driverops, /* Type of module. This one is a driver */
92 SIMNETINFO, /* short description */
93 &simnet_dev_ops /* driver specific ops */
94 };
95
96 static struct modlinkage modlinkage = {
97 MODREV_1, { &simnet_modldrv, NULL }
98 };
99
100 /* MAC callback function declarations */
101 static int simnet_m_start(void *);
102 static void simnet_m_stop(void *);
103 static int simnet_m_promisc(void *, boolean_t);
104 static int simnet_m_multicst(void *, boolean_t, const uint8_t *);
105 static int simnet_m_unicst(void *, const uint8_t *);
106 static int simnet_m_stat(void *, uint_t, uint64_t *);
107 static void simnet_m_ioctl(void *, queue_t *, mblk_t *);
108 static mblk_t *simnet_m_tx(void *, mblk_t *);
109 static int simnet_m_setprop(void *, const char *, mac_prop_id_t,
110 uint_t, const void *);
111 static int simnet_m_getprop(void *, const char *, mac_prop_id_t,
112 uint_t, void *);
113 static void simnet_m_propinfo(void *, const char *, mac_prop_id_t,
114 mac_prop_info_handle_t);
115
116 static mac_callbacks_t simnet_m_callbacks = {
117 (MC_IOCTL | MC_SETPROP | MC_GETPROP | MC_PROPINFO),
|