* Question about procfs function
@ 2004-01-25 21:23 Leonardo Henrique Machado
2004-01-26 16:34 ` Pablo Neira
0 siblings, 1 reply; 2+ messages in thread
From: Leonardo Henrique Machado @ 2004-01-25 21:23 UTC (permalink / raw)
To: netfilter-devel
Where can I find a complete tutorial about procfs?
I need to print a whole table in a procfs file.
I have created the file but I cannot understand
one of it's functions:
proc = proc_net_create(procfs_name, 0, procfs_getinfo);
procfs_getinfo is a very confusing function! I would like
to save a linked list in a buffer and after that I'll print
it in the procfs buffer file.
I know that procfs_getinfo (or whatever name you gave it)
must return a integer representing the size of the buffer
that will store my table. Anyway, where can I find good
tutorials and examples about using this procfs buffer
function?
Is there a better place to ask about it?
//leoh
main(){int j=1234;char t[]=":@abcdefghijklmnopqrstuvwxyz.\n"
,*i = "iqgbgxmlvivuc\n:wwnfwsdoi"; char *strchr(char *,int);
while(*i){j+=strchr(t,*i++)-t;j%=sizeof t-1;putchar(t[j]);}}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question about procfs function
2004-01-25 21:23 Question about procfs function Leonardo Henrique Machado
@ 2004-01-26 16:34 ` Pablo Neira
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira @ 2004-01-26 16:34 UTC (permalink / raw)
To: netfilter-devel
Hi leonardo,
Leonardo Henrique Machado wrote:
>Where can I find a complete tutorial about procfs?
>
>
This question is not netfilter related at all, better the linux kernel
maillist, anyway have a look at:
Linux Device Drivers, 2nd edition
http://www.xml.com/ldd/chapter/book/
and
Linux Kernel Modules Programming (mostly for kernel 2.2, so some things
won't work for your 2.4 and 2.6 kernel but it's a reference anyway).
http://www.faqs.org/docs/kernel/
>procfs_getinfo is a very confusing function! I would like
>to save a linked list in a buffer and after that I'll print
>it in the procfs buffer file.
>
>
I think that there's some examples in those docs.
Pablo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-26 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-25 21:23 Question about procfs function Leonardo Henrique Machado
2004-01-26 16:34 ` Pablo Neira
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.