Inside a KEXT, I need to do some processing where I would get either a proc_t or just a pid. If I go the pid route, I would do a sysctl() of sorts.
Unfortunately, I can't do either. proc_t is undefined and sysctl() isn't either. sysctlbyname() can be called but kinfo_proc isn't defined. If I try to use proc_t, the compiler complains about forward definition of [struct proc]
I'm assuming that sysctl() is there to be used in user mode but is there any way I can use proc_t? I tried to use the XNU/osfmk/bsd include dir but then it won't compile because of redefinitions and other errors.
It's a little disconcerting and I'm still trying to wrap my head around what I can and cannot do. Surely this can be done but I just don't quite know how.