DriverKit - SetProperties

Hi,

I'm currently port old driver to DriverKit framework.

This driver use the properties mechanism to change the state of the device from user space. I would like also use it, but I can not force the call to overridden SetProperties function on driver site.

Is it possible that SetProperties will be called when client call IOConnectSetCFProperties on given service? or I have to use the ExternalMethod mechanism. Or I will be possible to pass some dictionary structure which will mimic the SetProperty Call.

Thank you for your answer.

Best Regards, Andrzej

Replies

For this application, the best answer is likely to implement a userclient. You can find a sample for this here: https://developer.apple.com/documentation/driverkit/communicating_between_a_driverkit_extension_and_a_client_app?language=objc

This should allow you to send and receive arbitrary data from your dext, which should allow you to implement settings for your dext.

  • Thank you for your answer. I'm aware of the existence of a user client. I've already verified that this approach is working, but it requires quite a big reimplementation of the driver, which I have.

    As UserClient implements the IOService, I would like to force the call of overridden setProperties via IOConnectSetCFProperties call from the client-side, also It will be enough for me to pass the dictionary via ExternalMethod call, but CFDictionary seems to be impossible to pass.

Add a Comment