16cd6a6acSopenharmony_ci/* 26cd6a6acSopenharmony_ci * Copyright 2011 Tresys Technology, LLC. All rights reserved. 36cd6a6acSopenharmony_ci * 46cd6a6acSopenharmony_ci * Redistribution and use in source and binary forms, with or without 56cd6a6acSopenharmony_ci * modification, are permitted provided that the following conditions are met: 66cd6a6acSopenharmony_ci * 76cd6a6acSopenharmony_ci * 1. Redistributions of source code must retain the above copyright notice, 86cd6a6acSopenharmony_ci * this list of conditions and the following disclaimer. 96cd6a6acSopenharmony_ci * 106cd6a6acSopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright notice, 116cd6a6acSopenharmony_ci * this list of conditions and the following disclaimer in the documentation 126cd6a6acSopenharmony_ci * and/or other materials provided with the distribution. 136cd6a6acSopenharmony_ci * 146cd6a6acSopenharmony_ci * THIS SOFTWARE IS PROVIDED BY TRESYS TECHNOLOGY, LLC ``AS IS'' AND ANY EXPRESS 156cd6a6acSopenharmony_ci * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 166cd6a6acSopenharmony_ci * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 176cd6a6acSopenharmony_ci * EVENT SHALL TRESYS TECHNOLOGY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 186cd6a6acSopenharmony_ci * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 196cd6a6acSopenharmony_ci * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 206cd6a6acSopenharmony_ci * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 216cd6a6acSopenharmony_ci * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 226cd6a6acSopenharmony_ci * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 236cd6a6acSopenharmony_ci * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 246cd6a6acSopenharmony_ci * 256cd6a6acSopenharmony_ci * The views and conclusions contained in the software and documentation are those 266cd6a6acSopenharmony_ci * of the authors and should not be interpreted as representing official policies, 276cd6a6acSopenharmony_ci * either expressed or implied, of Tresys Technology, LLC. 286cd6a6acSopenharmony_ci */ 296cd6a6acSopenharmony_ci 306cd6a6acSopenharmony_ci#ifndef CIL_BUILD_AST_H_ 316cd6a6acSopenharmony_ci#define CIL_BUILD_AST_H_ 326cd6a6acSopenharmony_ci 336cd6a6acSopenharmony_ci#include <stdint.h> 346cd6a6acSopenharmony_ci 356cd6a6acSopenharmony_ci#include "cil_internal.h" 366cd6a6acSopenharmony_ci#include "cil_flavor.h" 376cd6a6acSopenharmony_ci#include "cil_tree.h" 386cd6a6acSopenharmony_ci#include "cil_list.h" 396cd6a6acSopenharmony_ci 406cd6a6acSopenharmony_ciint cil_add_decl_to_symtab(struct cil_db *db, symtab_t *symtab, hashtab_key_t key, struct cil_symtab_datum *datum, struct cil_tree_node *node); 416cd6a6acSopenharmony_ci 426cd6a6acSopenharmony_ciint cil_gen_node(struct cil_db *db, struct cil_tree_node *ast_node, struct cil_symtab_datum *datum, hashtab_key_t key, enum cil_sym_index sflavor, enum cil_flavor nflavor); 436cd6a6acSopenharmony_ciint cil_parse_to_list(struct cil_tree_node *parse_cl_head, struct cil_list *ast_cl, enum cil_flavor flavor); 446cd6a6acSopenharmony_ci 456cd6a6acSopenharmony_ciint cil_gen_block(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, uint16_t is_abstract); 466cd6a6acSopenharmony_civoid cil_destroy_block(struct cil_block *block); 476cd6a6acSopenharmony_ciint cil_gen_blockinherit(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 486cd6a6acSopenharmony_civoid cil_destroy_blockinherit(struct cil_blockinherit *inherit); 496cd6a6acSopenharmony_ciint cil_gen_blockabstract(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 506cd6a6acSopenharmony_civoid cil_destroy_blockabstract(struct cil_blockabstract *abstract); 516cd6a6acSopenharmony_ciint cil_gen_in(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 526cd6a6acSopenharmony_civoid cil_destroy_in(struct cil_in *in); 536cd6a6acSopenharmony_ciint cil_gen_class(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 546cd6a6acSopenharmony_civoid cil_destroy_class(struct cil_class *class); 556cd6a6acSopenharmony_ciint cil_gen_classorder(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 566cd6a6acSopenharmony_civoid cil_destroy_classorder(struct cil_classorder *classorder); 576cd6a6acSopenharmony_ciint cil_gen_perm(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor, unsigned int *num_perms); 586cd6a6acSopenharmony_civoid cil_destroy_perm(struct cil_perm *perm); 596cd6a6acSopenharmony_ciint cil_gen_perm_nodes(struct cil_db *db, struct cil_tree_node *current_perm, struct cil_tree_node *ast_node, enum cil_flavor flavor, unsigned int *num_perms); 606cd6a6acSopenharmony_ciint cil_fill_perms(struct cil_tree_node *start_perm, struct cil_list **perm_strs); 616cd6a6acSopenharmony_ciint cil_fill_classperms(struct cil_tree_node *parse_current, struct cil_classperms **cp); 626cd6a6acSopenharmony_civoid cil_destroy_classperms(struct cil_classperms *cp); 636cd6a6acSopenharmony_civoid cil_fill_classperms_set(struct cil_tree_node *parse_current, struct cil_classperms_set **cp_set); 646cd6a6acSopenharmony_civoid cil_destroy_classperms_set(struct cil_classperms_set *cp_set); 656cd6a6acSopenharmony_ciint cil_fill_classperms_list(struct cil_tree_node *parse_current, struct cil_list **expr_list); 666cd6a6acSopenharmony_civoid cil_destroy_classperms_list(struct cil_list **cp_list); 676cd6a6acSopenharmony_ciint cil_gen_classpermission(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 686cd6a6acSopenharmony_civoid cil_destroy_classpermission(struct cil_classpermission *cp); 696cd6a6acSopenharmony_ciint cil_gen_classpermissionset(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 706cd6a6acSopenharmony_civoid cil_destroy_classpermissionset(struct cil_classpermissionset *cps); 716cd6a6acSopenharmony_ciint cil_gen_map_class(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 726cd6a6acSopenharmony_ciint cil_gen_classmapping(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 736cd6a6acSopenharmony_civoid cil_destroy_classmapping(struct cil_classmapping *mapping); 746cd6a6acSopenharmony_ciint cil_gen_common(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 756cd6a6acSopenharmony_ciint cil_gen_classcommon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 766cd6a6acSopenharmony_civoid cil_destroy_classcommon(struct cil_classcommon *clscom); 776cd6a6acSopenharmony_ciint cil_gen_sid(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 786cd6a6acSopenharmony_civoid cil_destroy_sid(struct cil_sid *sid); 796cd6a6acSopenharmony_ciint cil_gen_sidcontext(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 806cd6a6acSopenharmony_civoid cil_destroy_sidcontext(struct cil_sidcontext *sidcon); 816cd6a6acSopenharmony_ciint cil_gen_sidorder(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 826cd6a6acSopenharmony_civoid cil_destroy_sidorder(struct cil_sidorder *sidorder); 836cd6a6acSopenharmony_ciint cil_gen_user(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 846cd6a6acSopenharmony_civoid cil_destroy_user(struct cil_user *user); 856cd6a6acSopenharmony_ciint cil_gen_userattribute(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 866cd6a6acSopenharmony_civoid cil_destroy_userattribute(struct cil_userattribute *attr); 876cd6a6acSopenharmony_ciint cil_gen_userattributeset(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 886cd6a6acSopenharmony_civoid cil_destroy_userattributeset(struct cil_userattributeset *attrset); 896cd6a6acSopenharmony_ciint cil_gen_userlevel(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 906cd6a6acSopenharmony_civoid cil_destroy_userlevel(struct cil_userlevel *usrlvl); 916cd6a6acSopenharmony_ciint cil_gen_userrange(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 926cd6a6acSopenharmony_civoid cil_destroy_userrange(struct cil_userrange *userrange); 936cd6a6acSopenharmony_ciint cil_gen_userbounds(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 946cd6a6acSopenharmony_ciint cil_gen_userprefix(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 956cd6a6acSopenharmony_civoid cil_destroy_userprefix(struct cil_userprefix *userprefix); 966cd6a6acSopenharmony_ciint cil_gen_selinuxuser(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 976cd6a6acSopenharmony_ciint cil_gen_selinuxuserdefault(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 986cd6a6acSopenharmony_civoid cil_destroy_selinuxuser(struct cil_selinuxuser *selinuxuser); 996cd6a6acSopenharmony_ciint cil_gen_role(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1006cd6a6acSopenharmony_civoid cil_destroy_role(struct cil_role *role); 1016cd6a6acSopenharmony_ciint cil_gen_roletype(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1026cd6a6acSopenharmony_civoid cil_destroy_roletype(struct cil_roletype *roletype); 1036cd6a6acSopenharmony_ciint cil_gen_userrole(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1046cd6a6acSopenharmony_civoid cil_destroy_userrole(struct cil_userrole *userrole); 1056cd6a6acSopenharmony_ciint cil_gen_roletransition(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1066cd6a6acSopenharmony_civoid cil_destroy_roletransition(struct cil_roletransition *roletrans); 1076cd6a6acSopenharmony_ciint cil_gen_roleallow(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1086cd6a6acSopenharmony_civoid cil_destroy_roleallow(struct cil_roleallow *roleallow); 1096cd6a6acSopenharmony_ciint cil_gen_roleattribute(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1106cd6a6acSopenharmony_civoid cil_destroy_roleattribute(struct cil_roleattribute *role); 1116cd6a6acSopenharmony_ciint cil_gen_roleattributeset(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1126cd6a6acSopenharmony_civoid cil_destroy_roleattributeset(struct cil_roleattributeset *attrset); 1136cd6a6acSopenharmony_ciint cil_gen_rolebounds(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1146cd6a6acSopenharmony_ciint cil_gen_avrule(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, uint32_t rule_kind); 1156cd6a6acSopenharmony_civoid cil_destroy_avrule(struct cil_avrule *rule); 1166cd6a6acSopenharmony_ciint cil_gen_avrulex(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, uint32_t rule_kind); 1176cd6a6acSopenharmony_ciint cil_gen_permissionx(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1186cd6a6acSopenharmony_civoid cil_destroy_permissionx(struct cil_permissionx *permx); 1196cd6a6acSopenharmony_ciint cil_gen_type_rule(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, uint32_t rule_kind); 1206cd6a6acSopenharmony_civoid cil_destroy_type_rule(struct cil_type_rule *rule); 1216cd6a6acSopenharmony_ciint cil_gen_type(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1226cd6a6acSopenharmony_civoid cil_destroy_type(struct cil_type *type); 1236cd6a6acSopenharmony_ciint cil_gen_typeattribute(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1246cd6a6acSopenharmony_civoid cil_destroy_typeattribute(struct cil_typeattribute *type); 1256cd6a6acSopenharmony_ciint cil_gen_bool(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, int tunableif); 1266cd6a6acSopenharmony_civoid cil_destroy_bool(struct cil_bool *boolean); 1276cd6a6acSopenharmony_ciint cil_gen_tunable(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1286cd6a6acSopenharmony_civoid cil_destroy_tunable(struct cil_tunable *tunable); 1296cd6a6acSopenharmony_ciint cil_gen_constrain_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **stack); 1306cd6a6acSopenharmony_ciint cil_gen_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **stack); 1316cd6a6acSopenharmony_ciint cil_gen_boolif(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, int tunable_if); 1326cd6a6acSopenharmony_civoid cil_destroy_boolif(struct cil_booleanif *bif); 1336cd6a6acSopenharmony_ciint cil_gen_tunif(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1346cd6a6acSopenharmony_civoid cil_destroy_tunif(struct cil_tunableif *tif); 1356cd6a6acSopenharmony_ciint cil_gen_condblock(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor); 1366cd6a6acSopenharmony_civoid cil_destroy_condblock(struct cil_condblock *cb); 1376cd6a6acSopenharmony_ciint cil_gen_alias(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor); 1386cd6a6acSopenharmony_civoid cil_destroy_alias(struct cil_alias *alias); 1396cd6a6acSopenharmony_ciint cil_gen_aliasactual(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor); 1406cd6a6acSopenharmony_civoid cil_destroy_aliasactual(struct cil_aliasactual *aliasactual); 1416cd6a6acSopenharmony_ciint cil_gen_typeattributeset(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1426cd6a6acSopenharmony_civoid cil_destroy_typeattributeset(struct cil_typeattributeset *attrtypes); 1436cd6a6acSopenharmony_ciint cil_gen_expandtypeattribute(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1446cd6a6acSopenharmony_civoid cil_destroy_expandtypeattribute(struct cil_expandtypeattribute *expandattr); 1456cd6a6acSopenharmony_ciint cil_gen_typebounds(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1466cd6a6acSopenharmony_ciint cil_gen_typepermissive(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1476cd6a6acSopenharmony_civoid cil_destroy_typepermissive(struct cil_typepermissive *typeperm); 1486cd6a6acSopenharmony_ciint cil_gen_typetransition(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1496cd6a6acSopenharmony_civoid cil_destroy_name(struct cil_name *name); 1506cd6a6acSopenharmony_civoid cil_destroy_typetransition(struct cil_nametypetransition *nametypetrans); 1516cd6a6acSopenharmony_ciint cil_gen_rangetransition(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1526cd6a6acSopenharmony_civoid cil_destroy_rangetransition(struct cil_rangetransition *rangetrans); 1536cd6a6acSopenharmony_ciint cil_gen_sensitivity(struct cil_db *idb, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1546cd6a6acSopenharmony_civoid cil_destroy_sensitivity(struct cil_sens *sens); 1556cd6a6acSopenharmony_ciint cil_gen_category(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1566cd6a6acSopenharmony_civoid cil_destroy_category(struct cil_cat *cat); 1576cd6a6acSopenharmony_ciint cil_set_to_list(struct cil_tree_node *parse_current, struct cil_list *ast_cl); 1586cd6a6acSopenharmony_civoid cil_destroy_catset(struct cil_catset *catset); 1596cd6a6acSopenharmony_ciint cil_gen_catorder(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1606cd6a6acSopenharmony_civoid cil_destroy_catorder(struct cil_catorder *catorder); 1616cd6a6acSopenharmony_ciint cil_gen_sensitivityorder(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1626cd6a6acSopenharmony_civoid cil_destroy_sensitivityorder(struct cil_sensorder *sensorder); 1636cd6a6acSopenharmony_ciint cil_gen_senscat(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1646cd6a6acSopenharmony_civoid cil_destroy_senscat(struct cil_senscat *senscat); 1656cd6a6acSopenharmony_ciint cil_gen_level(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1666cd6a6acSopenharmony_civoid cil_destroy_level(struct cil_level *level); 1676cd6a6acSopenharmony_ciint cil_fill_levelrange(struct cil_tree_node *low, struct cil_levelrange *lvlrange); 1686cd6a6acSopenharmony_ciint cil_gen_levelrange(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1696cd6a6acSopenharmony_civoid cil_destroy_levelrange(struct cil_levelrange *lvlrange); 1706cd6a6acSopenharmony_civoid cil_destroy_constrain_node(struct cil_tree_node *cons_node); 1716cd6a6acSopenharmony_ciint cil_gen_constrain(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor); 1726cd6a6acSopenharmony_civoid cil_destroy_constrain(struct cil_constrain *cons); 1736cd6a6acSopenharmony_ciint cil_gen_validatetrans(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor); 1746cd6a6acSopenharmony_civoid cil_destroy_validatetrans(struct cil_validatetrans *validtrans); 1756cd6a6acSopenharmony_ciint cil_fill_context(struct cil_tree_node *user_node, struct cil_context *context); 1766cd6a6acSopenharmony_ciint cil_gen_context(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1776cd6a6acSopenharmony_civoid cil_destroy_context(struct cil_context *context); 1786cd6a6acSopenharmony_ciint cil_gen_filecon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1796cd6a6acSopenharmony_civoid cil_destroy_filecon(struct cil_filecon *filecon); 1806cd6a6acSopenharmony_ciint cil_gen_ibpkeycon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1816cd6a6acSopenharmony_civoid cil_destroy_ibpkeycon(struct cil_ibpkeycon *ibpkeycon); 1826cd6a6acSopenharmony_ciint cil_gen_ibendportcon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1836cd6a6acSopenharmony_civoid cil_destroy_ibendportcon(struct cil_ibendportcon *ibendportcon); 1846cd6a6acSopenharmony_ciint cil_gen_portcon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1856cd6a6acSopenharmony_civoid cil_destroy_portcon(struct cil_portcon *portcon); 1866cd6a6acSopenharmony_ciint cil_gen_nodecon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1876cd6a6acSopenharmony_civoid cil_destroy_nodecon(struct cil_nodecon *nodecon); 1886cd6a6acSopenharmony_ciint cil_gen_genfscon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1896cd6a6acSopenharmony_civoid cil_destroy_genfscon(struct cil_genfscon *genfscon); 1906cd6a6acSopenharmony_ciint cil_gen_netifcon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1916cd6a6acSopenharmony_civoid cil_destroy_netifcon(struct cil_netifcon *netifcon); 1926cd6a6acSopenharmony_ciint cil_gen_pirqcon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1936cd6a6acSopenharmony_civoid cil_destroy_pirqcon(struct cil_pirqcon *pirqcon); 1946cd6a6acSopenharmony_ciint cil_gen_iomemcon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1956cd6a6acSopenharmony_civoid cil_destroy_iomemcon(struct cil_iomemcon *iomemcon); 1966cd6a6acSopenharmony_ciint cil_gen_ioportcon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1976cd6a6acSopenharmony_civoid cil_destroy_ioportcon(struct cil_ioportcon *ioportcon); 1986cd6a6acSopenharmony_ciint cil_gen_pcidevicecon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 1996cd6a6acSopenharmony_civoid cil_destroy_pcidevicecon(struct cil_pcidevicecon *pcidevicecon); 2006cd6a6acSopenharmony_ciint cil_gen_devicetreecon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 2016cd6a6acSopenharmony_civoid cil_destroy_devicetreecon(struct cil_devicetreecon *devicetreecon); 2026cd6a6acSopenharmony_ciint cil_gen_fsuse(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 2036cd6a6acSopenharmony_civoid cil_destroy_fsuse(struct cil_fsuse *fsuse); 2046cd6a6acSopenharmony_civoid cil_destroy_param(struct cil_param *param); 2056cd6a6acSopenharmony_ciint cil_gen_macro(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 2066cd6a6acSopenharmony_civoid cil_destroy_macro(struct cil_macro *macro); 2076cd6a6acSopenharmony_ciint cil_gen_call(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 2086cd6a6acSopenharmony_civoid cil_destroy_call(struct cil_call *call); 2096cd6a6acSopenharmony_civoid cil_destroy_args(struct cil_args *args); 2106cd6a6acSopenharmony_ciint cil_gen_optional(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 2116cd6a6acSopenharmony_civoid cil_destroy_optional(struct cil_optional *optional); 2126cd6a6acSopenharmony_ciint cil_gen_policycap(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 2136cd6a6acSopenharmony_civoid cil_destroy_policycap(struct cil_policycap *polcap); 2146cd6a6acSopenharmony_ciint cil_gen_ipaddr(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 2156cd6a6acSopenharmony_civoid cil_destroy_ipaddr(struct cil_ipaddr *ipaddr); 2166cd6a6acSopenharmony_ciint cil_gen_bounds(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor); 2176cd6a6acSopenharmony_civoid cil_destroy_bounds(struct cil_bounds *bounds); 2186cd6a6acSopenharmony_ciint cil_gen_default(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor); 2196cd6a6acSopenharmony_civoid cil_destroy_default(struct cil_default *def); 2206cd6a6acSopenharmony_ciint cil_gen_handleunknown(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 2216cd6a6acSopenharmony_civoid cil_destroy_handleunknown(struct cil_handleunknown *unk); 2226cd6a6acSopenharmony_ciint cil_gen_mls(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 2236cd6a6acSopenharmony_civoid cil_destroy_mls(struct cil_mls *mls); 2246cd6a6acSopenharmony_ciint cil_gen_defaultrange(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 2256cd6a6acSopenharmony_civoid cil_destroy_defaultrange(struct cil_defaultrange *def); 2266cd6a6acSopenharmony_ciint cil_gen_src_info(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node); 2276cd6a6acSopenharmony_civoid cil_destroy_src_info(struct cil_src_info *info); 2286cd6a6acSopenharmony_ci 2296cd6a6acSopenharmony_ciint cil_fill_cats(struct cil_tree_node *curr, struct cil_cats **cats); 2306cd6a6acSopenharmony_civoid cil_destroy_cats(struct cil_cats *cats); 2316cd6a6acSopenharmony_ciint cil_fill_context(struct cil_tree_node *user_node, struct cil_context *context); 2326cd6a6acSopenharmony_ciint cil_fill_integer(struct cil_tree_node *int_node, uint32_t *integer, int base); 2336cd6a6acSopenharmony_ciint cil_fill_integer64(struct cil_tree_node *int_node, uint64_t *integer, int base); 2346cd6a6acSopenharmony_ciint cil_fill_ipaddr(struct cil_tree_node *addr_node, struct cil_ipaddr *addr); 2356cd6a6acSopenharmony_ciint cil_fill_level(struct cil_tree_node *sens, struct cil_level *level); 2366cd6a6acSopenharmony_ci 2376cd6a6acSopenharmony_ciint cil_build_ast(struct cil_db *db, struct cil_tree_node *parse_tree, struct cil_tree_node *ast); 2386cd6a6acSopenharmony_ci 2396cd6a6acSopenharmony_ci#endif /* CIL_BUILD_AST_H_ */ 240