1 2/* Author : Stephen Smalley, <sds@epoch.ncsc.mil> */ 3 4/* FLASK */ 5 6/* 7 * A symbol table (symtab) maintains associations between symbol 8 * strings and datum values. The type of the datum values 9 * is arbitrary. The symbol table type is implemented 10 * using the hash table type (hashtab). 11 */ 12 13#ifndef _SEPOL_POLICYDB_SYMTAB_H_ 14#define _SEPOL_POLICYDB_SYMTAB_H_ 15 16#include <sepol/policydb/hashtab.h> 17 18/* The symtab_datum struct stores the common information for 19 * all symtab datums. It should the first element in every 20 * struct that will be used in a symtab to allow the specific 21 * datum types to be freely cast to this type. 22 * 23 * The values start at 1 - 0 is never a valid value. 24 */ 25typedef struct symtab_datum { 26 uint32_t value; 27} symtab_datum_t; 28 29typedef struct { 30 hashtab_t table; /* hash table (keyed on a string) */ 31 uint32_t nprim; /* number of primary names in table */ 32} symtab_t; 33 34extern int symtab_init(symtab_t *, unsigned int size); 35extern void symtab_destroy(symtab_t *); 36 37#endif /* _SYMTAB_H_ */ 38 39/* FLASK */ 40