Linux Kernel Procfs Guide

Erik (J.A.K.) Mouw

Delft University of Technology
Faculty of Information Technology and Systems

            
            PO BOX 5031
            2600 GA
            Delft
            The Netherlands
          

This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

For more details see the file COPYING in the source distribution of Linux.


Table of Contents
Preface
1. Introduction
2. Managing procfs entries
2.1. Creating a regular file
2.2. Creating a symlink
2.3. Creating a directory
2.4. Removing an entry
3. Communicating with userland
3.1. Reading data
3.2. Writing data
3.3. A single call back for many files
4. Tips and tricks
4.1. Convenience functions
4.2. Modules
4.3. Mode and ownership
5. Example