[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: [PROGRAMMERING] [C] Læse fra proc



> On Fri, 2004-01-23 at 12:55, Martin Schiotz wrote:
> > Det skal ikke være nogen hemmelighed at det er en trådløs driver jeg
> > roder med.
> > Hvis jeg f.eks. skriver:
> > watch -n 1 'cat /proc/net/wireless | less'
> > Får jeg info om signal styrker hvert sek.. Nu ved jeg ikke hvordan cat
> > er implementeret, men det foregår måske også udfra et request til den
> > trådløse driver ?
> 
> Hvis du kigger på filstørrelsen med 'ls -l /proc/net/wireless' vil du se
> at filen er på 0 bytes.
Du har ret!
> 
> Hvis du kigger i filen net/core/wireless.c i Linux kernen (omkring linie
> 334 i 2.4.24) vil du se hvordan indholdet af denne fil bliver genereret.
> 
> http://www.linuxforum.com/linux-kernel-programming/x716.html har en
> introduktion til PROC_FS programmering.

Ja, og i virkeligheden har jeg vel egentlig også implementeret mit driver modul på denne måde. Jeg har nemlig anvendt noget kode fra driveren, og den fil i /proc, som jeg skriver til er også 0 bytes med ls

Nu går det vist op for mig, hvad der foregår :-) 

Dvs. mit næste spørgsmål er så nok, hvordan for jeg så transporteret info (uden at bruge /proc) fra driveren til et user space program. Dvs. hvor det er driveren der bestemmer, når user space programmet skal opdateres med ny info ?

Mvh.
Martin

> 
> Mvh
> ./Brix
> --
> Henrik Brix Andersen <sslug@sslug>
> 
> 




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 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] *