問題タブ [driverkit]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
2 に答える
1609 参照

macos-catalina - Mac OS catalina 用のドライバーキット拡張機能を作成する方法

いずれかのデバイス用のドライバー キット拡張機能を作成しようとしています。Mac OS Catalina 用のドライバーキット拡張機能の作成方法に関する情報はありません。私が入手した唯一のドキュメントは

DriverKit リファレンス: https://developer.apple.com/documentation/driverkit?language=objc

& WWDC ビデオ: https://developer.apple.com/videos/play/wwdc2019/702/

ドライバー キット拡張機能とそれをインストールするためのシステム拡張機能の記述方法に関するサンプルはありますか。前もって感謝します。

0 投票する
1 に答える
83 参照

macos - DEXT で終了イベントを取得する方法 - Catalina DEXT ドライバーの問題

Mac OS の KEXT と DEXT は初めてです。開発目的で KEXT ドライバーを DEXT に移植しようとしています。私の質問は: USB デバイスを取り外すと、KEXT の場合、デバイスが終了したことを示す message() 呼び出しを介して kIOMessageServiceIsTerminated を受け取ります。DEXT では、messages() 関数 (または同様の関数) が表示されませんでした。DEXT でこのようなシナリオを設計するにはどうすればよいですか (例: DEXT で終了イベントを取得する方法)。

0 投票する
1 に答える
928 参照

c++ - How should "NewUserClient" be implemented

I am trying to interact with a dext from an application. I am able to find the service using IOServiceOpen and I get a call to NewUserClient of my dext (I can see the type parameter passed being output in the log). After this I am a bit lost. Reading here about NewUserClient I can see that one should use Create to create a new Service object.

The Discussion part here says The keys in the propertiesKey dictionary describe the new service.

Should this dictionary be placed in the plist file for the system extension as a top level entry, or should the dictionary be placed with the key in IOKitPersonalities?

Can I leave the IOServiceDEXTEntitlements key with an empty value to not impose any restrictions about entitlements on the application that is connecting to the system extension?

My plist looks like this (with the MyUserClientProperties key / dict in two places).

Do I need to pass SUPERDISPATCH as the last argument to Create?

From "OSX and iOS kernel programming" chapter 5 page 81:

The ingenuity of the I/O Kit design is that user client objects are themselves a driver object: the IOUserClient class inherits from IOService and, as with any other IOService instance, each user client has a provider class that, for a user client, is the instance of the driver that the application is controlling.

While the above might only be correct for kext (?) I would assume that things work in the same way for a dext,

From Create documentation: Use the kIOUserClassKey key to specify the name of the custom IOService subclass that you want the system to instantiate.

Why is another IOService class needed to be instantiated? What is the purpose of this class? Is it the provider for my class that inherits from IOUserClient? If so how can I make the instance of my driver (the one that implements NewUserClient) the provider?

From Create documentation: Use the kIOClassKey to specify the name of the custom IOUserClient subclass to return to clients of your service.

Is the type of the class that will be created and assigned to the third argument of Create? If so, is that the one I should assign IOUserClient* pointer to, which is passed to NewUserClient?

No matter what I try I always get an assert, but I cannot see what is causing it.