[Click] File operations in Click

Roman Chertov rchertov at purdue.edu
Wed Jul 16 22:03:04 EDT 2008


Jelena Mirkovic wrote:
> I've been trying to write a kernel module in Click that reads address  
> info from a file, then manipulates (drops or forwards) packets for  
> the specified addresses. I've had problems with using fopen -  
> basically click-install informs me that fopen is unknown symbol even  
> though I've included stdio.h in my file. I seem to remember Linux  
> kernel has a problem manipulating files. Is there an easy way to open  

It is disallowed to use system calls inside the kernel.  It is possible 
to still use them with some trickery but is best not to do so.

Take a look at the Script element; it might be what you are looking for.

Roman

> and read a file from a Click kernel module?
> 
> Thanks
> -------------------------------------
> Jelena Mirkovic
> Computer Scientist
> USC Information Sciences Institute
> 4676 Admiralty Way, Suite 1001
> Marina del Rey, CA 90292
> 310-448-9170
> 
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> 


More information about the click mailing list