site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com The mistake is in referring to it at all, which he already understands. -- Terry _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On Jun 3, 2008, at 1:21 AM, Uli Kusterer <witness.of.teachtext@gmx.net> wrote: Am 14.05.2008 um 11:35 schrieb Manish Chaturvedi: This time I can read struct proc, struct filedesc using kread() which in turn uses kvm_read() to access the kernel virtual memory, but when I am declaring struct file fl in method process_file() to read individual file structures, I am getting compilation error “e rror: aggregate `file fl' has incomplete type and cannot be define d”. Unlike struct proc and struct filedesc I am not able to kread the file structure, which is not private on Mac10.3. lsof uses the structures successfully , then why it is not accessible to my programme. Is there is any special privilege required to do the same ? Please help ! I would guess you just forgot the header that includes the "struct file" deFINITion. You see, to not add too many dependencies that cause a lot of recompiling, some people just deCLARE a struct in the header, without including the other header that deFINEs it. That way, the people who include that header and don't need to use that struct directly don't have to include that header at all, and don't get recompiled in that case. As I said previously, "struct file" is forward declared in a couple of headers, but is never used or instanced by the kernel, even privately. It was deprecated when we did the fine grain locking of the proc structure. This email sent to site_archiver@lists.apple.com