<commit_before>/* $chaos: interface.h,v 1.2 2002/10/22 21:03:31 per Exp $ */
/* Abstract: stormG3 kernel interface. */
/* Author: <NAME> <<EMAIL>> */

/* Copyright 2002 chaos development. */
/* Use freely under the terms listed in the file LICENSE. */

/**
 * @file             interface.h
 * @brief            The stormG3 kernel interface.
 *
 * All functions exported to kernel modules and user processes are put
 * into this file.
 */

#ifndef __STORM_INTERFACE_H__
#define __STORM_INTERFACE_H__

/* C99 types. */
#include <stdint.h>

/* Code that should only be accessible from within the kernel and the
   kernel modules. */
#if (defined __STORM_KERNEL_MODULE__) || (defined __STORM_KERNEL__)

/**
 * @brief               Dump the contents of a memory region.
 * @param memory        The address of the memory to dump.
 * @param length        The number of uint32s to dump.
 *
 * The memory is dumped in hexadecimal format.<commit_msg>New prototype: capability_add New prototype: capability_has<commit_after>/* $chaos: interface.h,v 1.3 2002/10/23 07:25:21 per Exp $ */
/* Abstract: stormG3 kernel interface. */
/* Author: <NAME> <<EMAIL>> */

/* Copyright 2002 chaos development. */
/* Use freely under the terms listed in the file LICENSE. */

/**
 * @file             interface.h
 * @brief            The stormG3 kernel interface.
 *
 * All functions exported to kernel modules and user processes are put
 * into this file.
 */

#ifndef __STORM_INTERFACE_H__
#define __STORM_INTERFACE_H__

/* C99 types. */
#include <stdint.h>

/* Code that should only be accessible from within the kernel and the
   kernel modules. */
#if (defined __STORM_KERNEL_MODULE__) || (defined __STORM_KERNEL__)

/**
 * @brief               Add the given capability to the given process.
 * @param process_id    The process to modify.
 * @param capability_class
 *                      The class of the capability (for example "kernel").
 * @param capability_name
 *                      The unique name of the capability (for example 
 *                      "super_user").
 * @return              STORM_RETURN_SUCCESS if successful.
 */
extern return_t capability_add (process_id_t process_id,
                                const char *capability_class,
                                const char *capability_name);
    
/**
 * @brief               Has the given process the given capability. 
 * @param process_id    The process to check.
 * @param capability_class
 *                      The class of the capability (for example "kernel").
 * @param capability_name 
 *                      The name of the capability to test for.
 * @param result        The result of the check.
 * @return              STORM_RETURN_SUCCESS if result contains the result.
 *                      of the check.
 */
extern return_t capability_has (process_id_t process_id, 
                                const char *capability_class,
                                const char *capability_name,
                                bool *result);

/**
 * @brief               Dump the contents of a memory region.
 * @param memory        The address of the memory to dump.
 * @param length        The number of uint32s to dump.
 *
 * The memory is dumped in hexadecimal format.
{'fraction_non_alphanumeric': 0.08438558669541114, 'fraction_numerical': 0.016014782876501387, 'mean_word_length': 2.1780821917808217, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3290778', 'n_tokens_mistral': 901, 'n_tokens_neox': 845, 'n_words': 337}