site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Tue, 20 Nov 2007, Quinn wrote: In that case I would just write it to a file (-: Although I haven't done it in Darwin since 10.3, I find vn_rdwr() pretty handy for doing this. I find it's easier to open the file in userland and pass the file descriptor into the kernel than do the open, etc. from inside the kernel. You can easily get a vnode pointer from the file desciptor. As Quinn said, xnu-792 (or maybe xnu-1226 now) sources are the doc. grep on vn_rdwr() in xnu-792.x.y/bsd/kern should give you some hints. rick _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... At 1:30 -0600 20/11/07, Kynan Shook wrote: So, what is a good way to get the data out of the kernel? I'm looking for fast and simple here - it's only a project, and will only ever be used on my machine, so minimizing the time spent on implementation is the priority. [good stuff snipped] OTOH, for a research project you should be able to make it work. You can get the vnode for a path using vnode_lookup. You can open it using vnode_open. And you can write to it using VNOP_WRITE. You don't even have to take a dependency on the kernel; these are all KPIs. This email sent to site_archiver@lists.apple.com