Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting process info for a kext



on 6/10/03 4:49 PM, Garth Cummings at email@hidden wrote:

> If a function is not in Kernel.framework/Headers/, you can't use it in
> a kernel extension. And, if a function is defined for kernel use only,
> you can't use it in user space.
>

And in my case I've tried to use one of those functions, namely
'kernel_sysctl' which would *seem* to be a kernel replacement for
'sysctl'... yet it doesn't seem to work.

So, I'm still hoping someone can give me some advice on getting process
information from within a kernel extension. Anyone?

thanks much,
Chris

>> I have an existing kext that needs to be modified slightly to look at
>> process information. The process information I need is performed
>> elsewhere
>> by calling 'sysctl' ala:
>>
>> mib[0] = CTL_KERN;
>> mib[1] = KERN_PROC;
>> mib[2] = KERN_PROC_ALL;
>> error = sysctl(mib, 3, procInfo, &buffersize, NULL, NULL);
>>
>> This code works fine in the user land application, but now I want to
>> do the
>> same in the kext. It doesn't appear that I can directly call 'sysctl'
>> from
>> a kext, so can anyone help me determine the proper way of retrieving
>> this
>> information? Advice is greatly appreciated.
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: getting process info for a kext (From: Garth Cummings <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.