Simple question on files & sockets in kernel space.

From: Ben Greear (
Date: Tue Oct 09 2001 - 00:16:06 EST

I would like to be able to read/write a file in the
regular file system (like /tmp/mystuff.txt) from the
kernel space. In user-space, I'd use open() and then
read() and write(). Can someone suggest a piece of kernel
code or documentation that does something like this?

I would also like to get a TCP/IP socket and read/write
to it in a similar manner. Basically, I want the familiarity
of user-space, but I have to implement most of the functionality
in the kernel.


Ben Greear <>       <Ben_Greear AT>
President of Candela Technologies Inc
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:23 EST