/******************************* */
/* Rule Set Based Access Control */
/* Author and (c) 1999: Amon Ott */
/* debug definitions             */
/* Last modified: 08/Feb/99      */
/******************************* */

#ifndef __RSBAC_DEBUG_H
#define __RSBAC_DEBUG_H

#include <linux/init.h>

#define RSBAC_DEBUG_ADF_NAME "dbugadf"
#define RSBAC_DEBUG_ADF_NAME_LEN 7

extern int rsbac_debug_ds;
extern int rsbac_debug_write;
extern int rsbac_debug_aef;
extern int rsbac_debug_no_write;
extern boolean log_levels_no_write;
extern int rsbac_debug_adf_default;
extern int rsbac_debug_adf[];
extern int rsbac_change_nr;

extern void rsbac_init_debug(void) __init;
extern boolean rsbac_parse_koptions(char *);

#if defined(CONFIG_RSBAC_MAINT) || defined(CONFIG_RSBAC_AUTO_WRITE)
extern int rsbac_write_debug(boolean);
extern boolean rsbac_debug_adf_dirty;
#endif /* CONFIG_RSBAC_MAINT || CONFIG_RSBAC_AUTO_WRITE */

#if defined(CONFIG_RSBAC_AUTO_WRITE) && (CONFIG_RSBAC_AUTO_WRITE > 0)
extern int rsbac_debug_auto;
#endif /* CONFIG_RSBAC_AUTO_WRITE > 0 */

#if defined(CONFIG_RSBAC_RMSG)
#define RSBAC_LOG rsbac_printk
#define RSBAC_DEF_MESS_LOGLEVEL 4
extern int rsbac_printk(const char *, ...);
extern int rsbac_log(int, char *, int);
#else
#define RSBAC_LOG printk
#endif

/* switch log level for request */
extern void rsbac_adf_log_switch(enum rsbac_adf_request_t, enum rsbac_log_level_t);

#ifdef CONFIG_RSBAC_PM
extern int rsbac_debug_ds_pm;
extern int rsbac_debug_aef_pm;
extern int rsbac_debug_adf_pm;
#endif

#ifdef CONFIG_RSBAC_MS
extern int rsbac_debug_adf_ms;
#endif

#if defined(CONFIG_RSBAC_RC) || defined(CONFIG_RSBAC_RC_MAINT)
extern int rsbac_debug_ds_rc;
extern int rsbac_debug_aef_rc;
extern int rsbac_debug_adf_rc;
#endif

#if defined(CONFIG_RSBAC_AUTH) || defined(CONFIG_RSBAC_AUTH_MAINT)
extern int rsbac_debug_ds_auth;
extern int rsbac_debug_aef_auth;
extern int rsbac_debug_adf_auth;
extern int rsbac_auth_enable_login;
#endif

#if defined(CONFIG_RSBAC_ACL) || defined(CONFIG_RSBAC_ACL_MAINT)
extern int rsbac_debug_ds_acl;
extern int rsbac_debug_aef_acl;
extern int rsbac_debug_adf_acl;
#endif

#endif
