Lines Matching defs:node

549 static void cil_write_src_info_node(FILE *out, struct cil_tree_node *node)
551 struct cil_src_info *info = node->data;
561 void cil_write_ast_node(FILE *out, struct cil_tree_node *node)
563 if (!node->data) {
567 switch(node->flavor) {
569 fprintf(out, "%s\n", (char *)node->data);
573 struct cil_block *block = node->data;
575 if (!node->cl_head)
581 struct cil_blockinherit *inherit = node->data;
586 struct cil_in *in = node->data;
588 if (!node->cl_head)
594 struct cil_optional *optional = node->data;
596 if (!node->cl_head)
602 struct cil_booleanif *bif = node->data;
608 if (!node->cl_head)
614 struct cil_tunableif *tif = node->data;
620 if (!node->cl_head)
626 struct cil_condblock *cb = node->data;
628 if (!node->cl_head)
634 struct cil_macro *macro = node->data;
644 if (!node->cl_head)
650 struct cil_call *call = node->data;
659 if (!node->cl_head)
665 struct cil_blockabstract *abstract = node->data;
670 struct cil_mls *mls = node->data;
675 struct cil_handleunknown *unknown = node->data;
689 struct cil_default *def = node->data;
705 struct cil_default *def = node->data;
721 struct cil_default *def = node->data;
737 struct cil_defaultrange *def = node->data;
761 struct cil_class *class = node->data;
763 write_node_list(out, node->cl_head);
768 struct cil_classorder *classorder = node->data;
775 struct cil_class *common = node->data;
777 write_node_list(out, node->cl_head);
782 struct cil_classcommon *cc = node->data;
787 struct cil_classpermission *cp = node->data;
792 struct cil_classpermissionset *cps = node->data;
799 struct cil_class *map = node->data;
801 write_node_list(out, node->cl_head);
806 struct cil_classmapping *mapping = node->data;
813 struct cil_permissionx *permx = node->data;
822 struct cil_sid *sid = node->data;
827 struct cil_sidcontext *sidcon = node->data;
837 struct cil_sidorder *sidorder = node->data;
844 struct cil_bool *boolean = node->data;
849 struct cil_tunable *tunable = node->data;
854 struct cil_sens *sens = node->data;
859 struct cil_alias *alias = node->data;
864 struct cil_aliasactual *aliasactual = node->data;
869 struct cil_cat *cat = node->data;
874 struct cil_alias *alias = node->data;
879 struct cil_aliasactual *aliasactual = node->data;
884 struct cil_catset *catset = node->data;
891 struct cil_catorder *catorder = node->data;
898 struct cil_senscat *senscat = node->data;
906 struct cil_sensorder *sensorder = node->data;
913 struct cil_level *level = node->data;
920 struct cil_levelrange *lvlrange = node->data;
927 struct cil_user *user = node->data;
932 struct cil_userattribute *attr = node->data;
937 struct cil_userattributeset *attr = node->data;
947 struct cil_userrole *userrole = node->data;
955 struct cil_userlevel *userlevel = node->data;
965 struct cil_userrange *userrange = node->data;
975 struct cil_bounds *bounds = node->data;
980 struct cil_userprefix *prefix = node->data;
987 struct cil_selinuxuser *selinuxuser = node->data;
998 struct cil_selinuxuser *selinuxuser = node->data;
1009 fprintf(out, "(role %s)\n", datum_to_str(node->data));
1013 fprintf(out, "(roleattribute %s)\n", datum_to_str(node->data));
1017 struct cil_roleattributeset *attr = node->data;
1027 struct cil_roletype *roletype = node->data;
1035 struct cil_bounds *bnds = node->data;
1040 fprintf(out, "(type %s)\n", datum_to_str(node->data));
1044 fprintf(out, "(typealias %s)\n", datum_to_str(node->data));
1048 struct cil_aliasactual *aliasactual = node->data;
1053 fprintf(out, "(typeattribute %s)\n", datum_to_str(node->data));
1057 struct cil_typeattributeset *attr = node->data;
1067 struct cil_expandtypeattribute *attr = node->data;
1077 struct cil_typepermissive *tp = node->data;
1084 struct cil_bounds *bounds = node->data;
1089 struct cil_roleallow *roleallow = node->data;
1097 struct cil_roletransition *roletrans = node->data;
1107 struct cil_avrule *rule = node->data;
1126 struct cil_avrule *rule = node->data;
1148 struct cil_type_rule *rule = node->data;
1165 struct cil_nametypetransition *rule = node->data;
1176 struct cil_rangetransition *rule = node->data;
1189 struct cil_constrain *cons = node->data;
1196 struct cil_constrain *cons = node->data;
1203 struct cil_validatetrans *vt = node->data;
1214 struct cil_validatetrans *vt = node->data;
1225 struct cil_context *context = node->data;
1232 struct cil_filecon *filecon = node->data;
1273 struct cil_ibpkeycon *ibpkeycon = node->data;
1284 struct cil_portcon *portcon = node->data;
1308 struct cil_nodecon *nodecon = node->data;
1328 struct cil_genfscon *genfscon = node->data;
1366 struct cil_netifcon *netifcon = node->data;
1381 struct cil_ibendportcon *ibendportcon = node->data;
1391 struct cil_pirqcon *pirqcon = node->data;
1401 struct cil_iomemcon *iomemcon = node->data;
1411 struct cil_ioportcon *ioportcon = node->data;
1426 struct cil_pcidevicecon *pcidevicecon = node->data;
1436 struct cil_devicetreecon *devicetreecon = node->data;
1446 struct cil_fsuse *fsuse = node->data;
1465 struct cil_policycap *polcap = node->data;
1470 struct cil_ipaddr *ipaddr = node->data;
1478 fprintf(out, "(<?RULE:%s>)\n", cil_node_to_string(node));
1496 static int __write_parse_ast_node_helper(struct cil_tree_node *node, __attribute__((unused)) uint32_t *finished, void *extra_args)
1501 if (!node->data) {
1502 if (node->cl_head)
1507 char *str = (char *)node->data;
1518 fprintf(args->out, "%s\n", (char *)node->data);
1524 static int __write_parse_ast_first_child_helper(struct cil_tree_node *node, void *extra_args)
1527 struct cil_tree_node *parent = node->parent;
1536 static int __write_parse_ast_last_child_helper(struct cil_tree_node *node, void *extra_args)
1539 struct cil_tree_node *parent = node->parent;
1556 static int __write_cil_ast_node_helper(struct cil_tree_node *node, uint32_t *finished, void *extra_args)
1560 if (node->flavor == CIL_SRC_INFO) {
1561 cil_write_src_info_node(args->out, node);
1567 cil_write_ast_node(args->out, node);
1569 if (node->flavor == CIL_CLASS || node->flavor == CIL_COMMON || node->flavor == CIL_MAP_CLASS) {
1576 static int __write_cil_ast_first_child_helper(struct cil_tree_node *node, void *extra_args)
1579 struct cil_tree_node *parent = node->parent;
1588 static int __write_cil_ast_last_child_helper(struct cil_tree_node *node, void *extra_args)
1591 struct cil_tree_node *parent = node->parent;
1607 int cil_write_ast(FILE *out, enum cil_write_ast_phase phase, struct cil_tree_node *node)
1616 rc = cil_tree_walk(node, __write_parse_ast_node_helper, __write_parse_ast_first_child_helper, __write_parse_ast_last_child_helper, &extra_args);
1618 rc = cil_tree_walk(node, __write_cil_ast_node_helper, __write_cil_ast_first_child_helper, __write_cil_ast_last_child_helper, &extra_args);