/* * Copyright (c) 2002 Pedro Bastos * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the author nor the name of his contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY PEDRO BASTOS AND HIS CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * */ #ifndef _CONF_H_ #define _CONF_H_ typedef int (*F_HOOK)(); /* * Structure defining all options that the user may set/unset, their respective * reference names, the bitmask to test again run_flags and the function that * we should call to satisfy that option. */ struct _conf_param { const char *refer_name; const unsigned short int bitmask; const F_HOOK FUNCTION; }; extern struct _conf_param conf_param[]; /* * Flags for use under run_flags. */ #define UP_F 0x1 /* whenever to call display_uptime */ #define DA_F 0x2 /* whenever to call display_sysdate */ #define LO_F 0x4 /* whenever to call display_sysload */ #define US_F 0x8 /* whenever to call display_sysusers */ #define OP_F 0x10 /* whenever to call display_opsys */ #define PR_F 0x20 /* whenever to call display_sysprocs */ #define ME_F 0x40 /* whenever to call display_sysmem */ #define IF_F 0x80 /* whenever to call display_ifs */ /* * Flags for use under int_flags. */ #define DI_F 0x1 /* whenever we should exit */ #define FO_F 0x2 /* whenever we should fork */ extern int run_flags; /* flags defining what sync_run should do */ extern int int_flags; /* flags defining machmon internal procedures */ #endif