Writing Device Drivers

ioctl(9E)

To determine whether there is a model mismatch between the application and the driver, the driver uses the FMODELS mask to determine the model type from the ioctl(9E) mode argument. The following values are OR-ed into mode to identify the application data model:

Look at the code examples in the previous chapter to see how this can be handled using either ddi_model_convert_from() or the data structure macros.