[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] kernel space til user space



On Wed, Nov 26, 2003 at 03:51:33PM +0100, sslug@sslug wrote:
> Hej Alle
> 
> Jeg er ved at modifisere et driver modul (kernel space), således at
> bestemte oplysninger om modtagne pakker skrives til en fil. Jeg er dog
> lidt i tvivl om hvordan dette gøres smartes/nemmest.
> 
> Jeg har indtil videre bare lavet oplysningerne tilgængelige i user space
> via ioctl (get) kald, som peger på en struct. Et andet user space program
> kan så hente oplysningerne. Dette virker fint, men hvordan ved jeg hvornår
> oplysningerne i blevet ændret (når en ny pakke modtages i driveren) ?
> 
> Man kan jo blive ved med at spørge via ioctl kald om structuren har ændret
> sig. Dette virker bare upraktisk ?
Jeps... ioctl betragtes også som en dårlig løsning, generelt.

> Kan dette gøre smart vha. ioctl ?
> 
> Eller bør jeg sætte mig ind hvordan proc virker ?
Det syntes jeg klart du burde. Det er let at lave en cyklisk buffer i
proc. Jeg har en relativt simpel patch der gør det (noget disk-logging
til en /proc fil).

> Er der andre måder ?
Ja, men jeg tror klart at /proc løsningen er den letteste :-)

-- 
/-----------------------------------------------------\
| Klaus S. Madsen      | "Failure is not an option... |
| ICQ: 45400164        |  It comes bundled with your  |
| www.hjernemadsen.org |  Microsoft products!"        |
\-----------------------------------------------------/


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:10 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *