- Main Page
- Data Structures
- Files
- Directories

- Search for |

- File List
- Globals

# kern_sysctl.h

Go to the documentation of this file.

    00001 /*****************************************************************************************
    00002  Copyright (c) 2002-2004 The UbixOS Project
    00003  All rights reserved.
    00004
    00005  Redistribution and use in source and binary forms, with or without modification, are
    00006  permitted provided that the following conditions are met:
    00007
    00008  Redistributions of source code must retain the above copyright notice, this list of
    00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
    00010  form must reproduce the above copyright notice, this list of conditions, the following
    00011  disclaimer and the list of authors in the documentation and/or other materials provided
    00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
    00013  contributors may be used to endorse or promote products derived from this software
    00014  without specific prior written permission.
    00015
    00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
    00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
    00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00025
    00026  $Id: kern__sysctl_8h-source.html 88 2016-01-12 00:11:29Z reddawg $
    00027
    00028 *****************************************************************************************/
    00029
    00030 #ifndef _KERNSYSCTL_H
    00031 #define _KERNSYSCTL_H
    00032
    00033 #include <sys/sysproto.h>
    00034 #include <sys/thread.h>
    00035
    00036 #define CTL_MAXNAME     24      /* largest number of components supported */
    00037
    00038 /*
    00039  * Top-level identifiers
    00040  */
    00041 #define CTL_UNSPEC          0           /* unused */
    00042 #define CTL_KERN            1           /* "high kernel": proc, limits */
    00043 #define CTL_VM              2           /* virtual memory */
    00044 #define CTL_VFS             3           /* filesystem, mount type is next */
    00045 #define CTL_NET             4           /* network, see socket.h */
    00046 #define CTL_DEBUG           5           /* debugging parameters */
    00047 #define CTL_HW              6           /* generic cpu/io */
    00048 #define CTL_MACHDEP         7           /* machine dependent */
    00049 #define CTL_USER            8           /* user-level */
    00050 #define CTL_P1003_1B        9           /* POSIX 1003.1B */
    00051 #define CTL_UBIX           10           /* ubixos */
    00052
    00053 #define CTL_KERN_OPENFILES  1           /* kernel openfiles */
    00054
    00055 #define EINVAL         -1               /* */
    00056
    00057 struct sysctl_entry {
    00058   struct sysctl_entry *prev;
    00059   struct sysctl_entry *next;
    00060   struct sysctl_entry *children;
    00061   char                 name[32];
    00062   int                  id;
    00063   void                *value;
    00064   int                  val_len;
    00065   };
    00066
    00067 int kern_sysctl(int *name,u_int namelen,void *old,size_t *oldlenp,void *new,size_t newlen,size_t *retval,int flags);
    00068 int sysctl_add(int *,int,char *,void *,int);
    00069 int sysctl_init();
    00070
    00071 extern bool sysctl_enabled;
    00072 #endif
    00073
    00074 /***
    00075  END
    00076  ***/
    00077