#ifndef _SS_POLICYDB_H_
#define _SS_POLICYDB_H_
#include "symtab.h"
#include "avtab.h"
#include "sidtab.h"
#include "ebitmap.h"
#include "mls_types.h"
#include "context.h"
#include "constraint.h"
struct perm_datum { … };
struct common_datum { … };
struct class_datum { … };
struct role_datum { … };
struct role_trans_key { … };
struct role_trans_datum { … };
struct filename_trans_key { … };
struct filename_trans_datum { … };
struct role_allow { … };
struct type_datum { … };
struct user_datum { … };
struct level_datum { … };
struct cat_datum { … };
struct range_trans { … };
struct cond_bool_datum { … };
struct cond_node;
struct type_set { … };
struct ocontext { … };
struct genfs { … };
#define SYM_COMMONS …
#define SYM_CLASSES …
#define SYM_ROLES …
#define SYM_TYPES …
#define SYM_USERS …
#define SYM_BOOLS …
#define SYM_LEVELS …
#define SYM_CATS …
#define SYM_NUM …
#define OCON_ISID …
#define OCON_FS …
#define OCON_PORT …
#define OCON_NETIF …
#define OCON_NODE …
#define OCON_FSUSE …
#define OCON_NODE6 …
#define OCON_IBPKEY …
#define OCON_IBENDPORT …
#define OCON_NUM …
struct policydb { … } __randomize_layout;
extern void policydb_destroy(struct policydb *p);
extern int policydb_load_isids(struct policydb *p, struct sidtab *s);
extern int policydb_context_isvalid(struct policydb *p, struct context *c);
extern int policydb_class_isvalid(struct policydb *p, unsigned int class);
extern int policydb_type_isvalid(struct policydb *p, unsigned int type);
extern int policydb_role_isvalid(struct policydb *p, unsigned int role);
extern int policydb_read(struct policydb *p, void *fp);
extern int policydb_write(struct policydb *p, void *fp);
extern struct filename_trans_datum *
policydb_filenametr_search(struct policydb *p, struct filename_trans_key *key);
extern struct mls_range *policydb_rangetr_search(struct policydb *p,
struct range_trans *key);
extern struct role_trans_datum *
policydb_roletr_search(struct policydb *p, struct role_trans_key *key);
#define POLICYDB_CONFIG_MLS …
#define REJECT_UNKNOWN …
#define ALLOW_UNKNOWN …
#define OBJECT_R …
#define OBJECT_R_VAL …
#define POLICYDB_MAGIC …
#define POLICYDB_STRING …
struct policy_file { … };
struct policy_data { … };
static inline int next_entry(void *buf, struct policy_file *fp, size_t bytes)
{ … }
static inline int put_entry(const void *buf, size_t bytes, size_t num,
struct policy_file *fp)
{ … }
static inline char *sym_name(struct policydb *p, unsigned int sym_num,
unsigned int element_nr)
{ … }
extern u16 string_to_security_class(struct policydb *p, const char *name);
extern u32 string_to_av_perm(struct policydb *p, u16 tclass, const char *name);
#endif