On 1/25/06, Hsieh Steve <stevecfhsieh@xxxxxxxxx> wrote: > Hi, all > I have some problem to access file in kernel space > > since I want to get the info about current connection status(tcp/udp flow, > local in or forwading ) in my module > with ip_contrack/netfilter not compiled in > I know no other ways to get this info but to access /proc/net/tcp or > proc/net/udp .... > but both sys_read() and proc_read() are not exposed as a kernel symbol, > I get no way to access the proc/net/tcp from kernel..... > any function available to access file in kernel? You can't call sys_* functions from kernel as they are not exported and only for system calls. For Accessing File from kernel space (although its not a good thing) you can see this thread (http://mail.nl.linux.org/kernelnewbies/2005-10/msg00249.html) ! > or is there other method for me to get connection information in kernel > There might be some other way of getting connection information in kernel, but I can't tell the way of doing this as I havn't worked on network side of kernel :) -- Fawad Lateef -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/