Re: [mpls-linux-general] writting into proc file
Status: Beta
Brought to you by:
jleu
From: James R. L. <jl...@mi...> - 2002-01-04 15:00:39
|
Take a look at how the entries in /proc/sys/ are handled. I know the ipv4 stack has a couple of those. Jim On Fri, Jan 04, 2002 at 02:28:54PM +0530, vvk...@hs... wrote: > > > Hi Folks ! > Can anybody explain how will be the mechanism to write into file > in the /proc filesystem from kernel space ........... > > In the 2.4.x linux kernel , for less than PAGE_SIZE data transfer , > i am using the following mechanism to register the entry in the /PROC > filesytem... > > struct proc_dir_entry *entry=create_proc_entry("xyz", S_IRUGO | S_IWUGO , > NULL ); > > if ( entry ) > { > entry->read_proc = xyz_read_proc; > entry->write_proc = xyz_write_proc; > } > > are these mean to say that accessing this file from userspace........or kernel > space.......... > > Is this mean to say that , when user invokes "read" or "write" system directly > or indirectly with ANSI library > > will be available for user to access this file ? > > I want to write the content into a file ..i.e in /proc .... from kernel > space......... > > What will be various options to acheive this ? > > can anybody send a small template for this , will be greatly > appreciated.......... > > Thanks in advance......... > > With thanx and regards, > Ramakrishna kvv. > > > > _______________________________________________ > mpls-linux-general mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general -- James R. Leu |