Re: Limitations Within a Driver
On Monday, November 26, 2001, at 11:20 , Sean Morrell wrote: justin@mac.com writes: You can probably get this to work, but I think, in general, it's A Bad Idea. What, exactly, are you trying to achieve? Oh, I was just looking for another way of configuring my device driver from user space. The sysctl mechanism was suggested by a gentlemen a few days ago. Sysctls are probably a bad idea; in particular, they deal primarily with the BSD part of the kernel, and making them visible to the IOKit side is going to be a hassle. In addition, even BSDs don't typically use sysctls for this purpose. But I don't believe it will work in my situation. This device is one of a series. Several devices of the same model can be connected on a single system. And there is no way of identifying each device uniquely, other than USB address. So I would need a set of settings for every (model, USB address). I don't see sysctl being applicable here. Tell me if I'm wrong. I just thought it might be easier to have the configuration done via a pipe or message queue. Any suggestions? Pipes and message queues are, again, BSD-isms, and something you'd want to avoid in an IOKit gizmo. Pipes, FWIW, are typically used between user-mode processes, not in the kernel. For your purposes, there are two possibilities: - if your driver is going to look like an existing BSD-like thing (e.g., there's a device node for it in the file system), you can use ioctls to communicate with it. This requires it be open, which may not suit you. - IOKit provides something called the UserClient interface, which may be what you want. Search the archives for details (I'm no expert here). You'll want to look in the darwin-developers archives as well (e.g., at www.darwinfo.org). Regards, Justin -- /~\ The ASCII Justin C. Walker, Curmudgeon-at-large \ / Ribbon Campaign X Against HTML / \ Email!
participants (1)
-
justin@mac.com